Skip to content

feat(ui): rebuild Session history on subturtle-ui - #69

Open
SomiVista wants to merge 1 commit into
claude/start-session-screen-subturtle-uifrom
claude/session-history-screen-subturtle-ui
Open

feat(ui): rebuild Session history on subturtle-ui#69
SomiVista wants to merge 1 commit into
claude/start-session-screen-subturtle-uifrom
claude/session-history-screen-subturtle-ui

Conversation

@SomiVista

Copy link
Copy Markdown
Collaborator

Rebuilds /sessions as the design's timeline.

Stacked on #68 (Start a session, which adds the StSegmentedControl this page uses) — retarget to new-design once 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 StSegmentedControl 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 the RPC's own total.

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.

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 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 never rendered. It keyed off session._isText, a field nothing in the app ever assigns (grep finds exactly one reference — the read). 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 metadata line, which the design moves to the detail page — keeping the guard would leave dead code behind.

Pagination

Adds a page-local StPagination in components/common/, keeping pilotui Pagination's v-model + change-page contract. App-local rather than a subturtle-ui export because the design system defines no pagination component — the same call InlineNotice records.

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 build and yarn test:unit (43 passing) green.

⚠️ Same caveat as #68: the .dc.html artboard could not be reached from this session, so layout fidelity to the actual design is unverified.

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant