Skip to content

feat(scene): render the real sessions list in the sidebar, not a placeholder#1006

Merged
esengine merged 1 commit into
mainfrom
rust-scene-sidebar-real-sessions
May 16, 2026
Merged

feat(scene): render the real sessions list in the sidebar, not a placeholder#1006
esengine merged 1 commit into
mainfrom
rust-scene-sidebar-real-sessions

Conversation

@esengine
Copy link
Copy Markdown
Owner

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` (more accurate
    than the previous `/sessions to browse` instruction).
  • 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 (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 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

…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
@esengine esengine merged commit f597215 into main May 16, 2026
5 checks passed
@esengine esengine deleted the rust-scene-sidebar-real-sessions branch May 16, 2026 03:31
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