feat(ui): rebuild Session history on subturtle-ui - #69
Open
SomiVista wants to merge 1 commit into
Open
Conversation
Rebuilds /sessions as the design's timeline: a date-and-duration rail beside a card carrying the type icon, the bundle title, a Voice/Text badge, the dialog count and a chevron into the session. The RPC, its pagination, the useInlineFeatureLock registration and the try/catch that flips to `locked` are unchanged; formatSessionDuration and goToBundles come across as they were. Search and an All/Voice/Text SegmentedControl filter the fetched page client-side — list-live-sessions takes only page and limit, so there is nothing to push server-side. The footer count reads from the RPC's own `total`. Locked replaces FeatureLocked on this page only: a rose notice carrying the existing session_history copy, three "Transcript locked" teaser rows, and the upgrade CTA. Two fixes fall out of the rebuild: - The Voice/Text badge keyed off `session._isText`, a field nothing in the app ever assigns, so it could never render. The discriminator is now `metadata.mode`, which the practice pages do write (`metadata: setup.request!`). - `isPracticeSession` is removed. Its only job was gating the row's aiCharacter / selectionMode / phrase-range line, which the design moves to the detail page, so keeping the guard would leave dead code behind. Adds a page-local StPagination in components/common/, keeping pilotui Pagination's v-model + change-page contract. It is app-local rather than a subturtle-ui export because the design system defines no pagination component — the same call InlineNotice records. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebuilds
/sessionsas the design's timeline.Stacked on #68 (Start a session, which adds the
StSegmentedControlthis page uses) — retarget tonew-designonce that merges.What it does
A date-and-duration rail beside a card carrying the type icon, the bundle title, a Voice/Text badge, the dialog count and a chevron into the session. Search and an All/Voice/Text
StSegmentedControlfilter the fetched page client-side —list-live-sessionstakes onlypageandlimit, so there is nothing to push server-side. The footer count reads the RPC's owntotal.The RPC, its pagination, the
useInlineFeatureLockregistration and the try/catch that flips tolockedare unchanged;formatSessionDurationandgoToBundlescome across as they were.Per the design, the row drops the Gemini/OpenAI provider pill and the metadata line (aiCharacter, selectionMode, range) — the detail page has them.
Locked state
Replaces
FeatureLockedon this page only: a rose notice carrying the existingsession_historycopy, three "Transcript locked" teaser rows, and the upgrade CTA.Two fixes fall out of the rebuild
session._isText, a field nothing in the app ever assigns (grepfinds exactly one reference — the read). The discriminator is nowmetadata.mode, which the practice pages do write (metadata: setup.request!).isPracticeSessionis removed. Its only job was gating the row's metadata line, which the design moves to the detail page — keeping the guard would leave dead code behind.Pagination
Adds a page-local
StPaginationincomponents/common/, keeping pilotuiPagination'sv-model+change-pagecontract. App-local rather than asubturtle-uiexport because the design system defines no pagination component — the same callInlineNoticerecords.Verified
Populated, locked, no-match and filtered states in a real browser, against seeded voice + text sessions and a temporarily granted Learner entitlement (removed afterwards).
yarn buildandyarn test:unit(43 passing) green.🤖 Generated with Claude Code