feat(scene): render the real sessions list in the sidebar, not a placeholder#1006
Merged
Conversation
…eholder
Closes the most obvious "placeholder" in the three-pane layout. The
sidebar previously read \`use /sessions to browse\` — accurate but
visually empty. Now it shows the actual saved sessions for the
current workspace with the active one highlighted, matching the
sidebar in the design mock.
## Wiring
- \`App.tsx\` initializes \`sessionsPickerList\` from
\`listSessionsForWorkspace(currentRootDir)\` on mount (was \`[]\` —
only populated when the picker opened).
- A \`useEffect\` re-reads the list whenever \`currentRootDir\` changes
(\`/cwd\` switching).
- New \`SceneTraceInput.sidebarSessionsJson\` + \`sidebarActiveSession\`
scalars — same primitive-deps pattern as the picker overlay's
\`sessionsJson\`. \`sidebarSessionsJson\` carries \`{ title, meta:
branch }\` per session; \`sidebarActiveSession\` is the active
session name for highlighting.
## Sidebar rendering
- Empty case: \`no saved sessions / type to start one\` (one accurate
hint instead of the previous \`/sessions to browse\` instruction
that didn't tell the user what was actually going on).
- Non-empty: one row per session, \`▸\` accent marker on the active
one, others dimmed. Caps at \`MAX_SIDEBAR_SESSIONS\` (8) with an
\`…N more\` overflow row.
- Meta line (\`branch\`) is intentionally omitted in this PR — the
24-cell sidebar gets cramped fast once you add a second line per
row. Showing meta inline alongside the name is a follow-up if it
matters.
## Tests
\`tests/scene-trace-frame.test.ts\` — 4 new cases:
- list rendered into sidebar when \`sidebarSessions\` is given
- active session row marked with \`▸\` and accent color
- placeholder when \`sidebarSessions\` is \`[]\`
- overflow row when > 8 sessions
\`npm run verify\` green via prepush gate.
Refs #868
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.
Closes the most obvious "placeholder" in the three-pane layout. The
sidebar previously read `use /sessions to browse` — accurate but
visually empty. Now it shows the actual saved sessions for the
current workspace with the active one highlighted, matching the
sidebar in the design mock.
Wiring
`listSessionsForWorkspace(currentRootDir)` on mount (was `[]` —
only populated when the picker opened).
(`/cwd` switching).
scalars — same primitive-deps pattern as the picker overlay's
`sessionsJson`. `sidebarSessionsJson` carries `{ title, meta:
branch }` per session; `sidebarActiveSession` is the active
session name for highlighting.
Sidebar rendering
than the previous `/sessions to browse` instruction).
one, others dimmed. Caps at `MAX_SIDEBAR_SESSIONS` (8) with an
`…N more` overflow row.
sidebar gets cramped fast once you add a second line per row.
Showing meta inline is a follow-up if it matters.
Tests
`tests/scene-trace-frame.test.ts` — 4 new cases (list rendered,
active row marker, empty-state placeholder, overflow at 8). 67
scene-trace tests green in total.
`npm run verify` green via prepush gate.
Refs #868