Skip to content

feat(scene): pull more design-mock content into sidebar, ctx pane, composer#1007

Closed
esengine wants to merge 1 commit into
mainfrom
rust-scene-design-fidelity
Closed

feat(scene): pull more design-mock content into sidebar, ctx pane, composer#1007
esengine wants to merge 1 commit into
mainfrom
rust-scene-design-fidelity

Conversation

@esengine
Copy link
Copy Markdown
Owner

Closes the "left/right/composer have different things from the mock"
gap. Builds on the layout + palette + sessions list work so far
(#1003, #1005, #1006) — this PR is purely producer-side content
additions, no schema or Rust render changes.

Sidebar (`SESSIONS` → `new chat / HISTORY` + footer)

The mock's sidebar has, top to bottom: a prominent `+ new chat ⌘N`
button, a search row, sessions under `PINNED` / `HISTORY` headers,
and a footer with rules / mcp / settings rows. We can't do a real
button or a persistent text input in a scene frame, but the
structure carries over:

  • Top: `+ new chat ⌘N` — accent-tinted bg, bold label, dimmed
    keybinding hint. Reads as the call-to-action even though clicking
    isn't a thing in TUI.
  • `HISTORY` header + sessions list. `●` marks the active session,
    `○` the others. Branch meta tucked dim after the title.
  • `height: "fill"` spacer pushes the footer to the bottom.
  • Footer: `⚙ settings ⌘,` and `◈ mcp servers N` rows. mcp count
    comes from `liveMcpServers.length` (a wired number) — rules is
    skipped this PR since we don't surface that count to scene yet.

Sessions cap is now 6 (was 8) so the new-chat row + history section

  • footer all fit in a 24-row terminal.

Context pane (tabs above the existing kv list)

Adds a tab strip `files tools memory rules` with `files` as the
active tab in bold accent. Switching between tabs isn't wired — this
is the visual hook for that follow-up. Adds an `mcp` row to the
existing model / cards / wallet kv list when the count is non-zero.

Composer (mode selector + hint row)

Mock has: `hint with kbd shortcuts → chips → textarea → mode + send
footer`. We do:

  • `composerHintRow`: `⏎ send ⇧⏎ newline / commands @ mention`,
    accent glyph + muted label per pair.
  • Existing composer `❯` row.
  • `modeSelectorRow`: `mode [review] auto yolo` with the active mode
    highlighted in a colored chip (accent / warning / danger for
    review / auto / yolo respectively — matches the trust-dial
    semantics).

`editMode` flows from `useEditGate` through `useSceneTrace`.

Tests

Existing 67 scene-trace tests rewritten to query by content (helper
funcs `composerOf`, `approvalRowOf`, `pickerSessionRows`,
`slashRowsOf`) rather than fixed indices — the main pane structure
changed (added 2 rows: hint + mode), and queries by position were
the load-bearing fragile bit.

`npm run verify` green via prepush gate.

What still falls short

  • Real tab switching in ctx pane — needs focused tab state +
    per-tab content branches.
  • Token meter (cache-hit %, used/cached/reserved gauges) — needs
    telemetry wiring.
  • Chips (`@reviewer`, `src/foo/bar.ts`) above composer — needs
    separate state for parsed @-mentions vs raw buffer text.
  • Real search input — can't do persistent input boxes in a single
    scene frame; needs a dedicated overlay.
  • Card head/body collapse — biggest remaining gap on main pane.

Refs #868

…mposer

Closes the "left/right/composer have different things from the mock"
gap. Builds on the layout + palette + sessions list work so far —
this PR is purely producer-side content additions, no schema or Rust
render changes.

## Sidebar (`SESSIONS` → `new chat / HISTORY` + footer)

The mock's sidebar has, top to bottom: a prominent "+ new chat ⌘N"
button, a search row, a session list under "PINNED" and "HISTORY"
section labels, and a footer with rules / mcp / settings rows. We
can't do a real button or a persistent text input in a scene-frame,
but the structure carries over:

- Top: `+ new chat   ⌘N` — accent-tinted bg, bold label, dimmed
  keybinding hint. Reads as the call-to-action even though clicking
  isn't a thing in TUI.
- Middle: `HISTORY` section header + sessions list. ● marks the
  active session, ○ the others (replaces the earlier ▸/blank pair —
  filled/hollow dots are more legible in the dotted-pixel font most
  terminals use). Branch meta tucked dim after the title.
- Spacer (`height: "fill"`) pushes the footer to the bottom.
- Footer: `⚙ settings ⌘,` and `◈ mcp servers  N` rows. mcp count
  comes from `liveMcpServers.length` (a wired number) — `rules` is
  skipped this PR since we don't surface that count to scene yet.

Sessions cap is now 6 (was 8) so the new-chat row + history section
+ footer all fit in a 24-row terminal.

## Context pane (tabs above the existing kv list)

Adds a tab strip `files  tools  memory  rules` with `files` as the
active tab in bold accent. Switching between tabs isn't wired (the
scene producer would need a focused tab in input + tab-content
branches per kind) — this is the visual hook for those follow-ups.

Adds an `mcp` row to the existing model / cards / wallet list when
the count is non-zero.

## Composer (mode selector + hint row)

Mock has: `hint with kbd shortcuts → chips → textarea → mode + send
footer`. We do:

- `composerHintRow`: `⏎ send  ⇧⏎ newline  / commands  @ mention`,
  accent glyph + muted label per pair.
- Existing composer `❯` row.
- `modeSelectorRow`: `mode  [review] auto yolo` with the active mode
  highlighted in a colored chip (accent / warning / danger for
  review / auto / yolo respectively — matches the trust-dial
  semantics).

`editMode` flows from `useEditGate` through `useSceneTrace`.

## Tests

Existing 67 scene-trace tests rewritten to query by content (helper
funcs `composerOf`, `approvalRowOf`, `pickerSessionRows`,
`slashRowsOf`) rather than fixed indices — the main pane structure
changed (added 2 rows: hint + mode), and queries by position were
the load-bearing fragile bit.

\`npm run verify\` green via prepush gate.

## What still falls short

- Real tab switching in ctx pane — needs focused tab state +
  per-tab content.
- Token meter (the cache-hit %, used/cached/reserved gauges from
  the mock) — needs telemetry wiring.
- Chips (`@reviewer`, `src/foo/bar.ts`) above composer — needs
  separate state for parsed @-mentions vs raw buffer text.
- Real search input — can't do persistent input boxes in a single
  scene frame; would need a dedicated overlay.
- Card head/body collapse — biggest remaining gap on main pane.

Refs #868
@esengine
Copy link
Copy Markdown
Owner Author

Closing — the design mock changed direction (single-column terminal stream per reasonix-v1, not three-pane). Restructuring under a fresh PR; reusable wiring (editMode / mcpServerCount / sidebarSessions) will be re-added there with the new layout shape.

@esengine esengine closed this May 16, 2026
@esengine esengine deleted the rust-scene-design-fidelity branch May 16, 2026 03:41
esengine added a commit that referenced this pull request May 16, 2026
The user supplied a new design mock (reasonix-v1 / "Reasonix TUI v1.html")
that's a complete shape change from the desktop-style mock we had
before:

- Single-column terminal stream (cards + boot block), no permanent
  sidebar / context pane.
- Fixed bottom dock: composer input row → meta row (kbd shortcuts)
  → status bar (multi-segment).
- Each card identified by a colored prefix glyph + label, no
  enclosing boxes (mock's explicit "design rule: NO enclosing boxes,
  every block uses a left-rail" — borders out, glyphs in).

This PR replaces \`buildTraceFrame\` end-to-end to match.

## Palette swap (theme.ts)

Old palette tokens (bg / bg2 / panel / card / border / borderStrong
/ fg / fg2 / muted / accent / accentStrong / success / warning /
danger / violet) → v1 oklch-derived hex set:

  bg          #0f1018   bg2  #161824
  fg          #e8e9f3   fg1  #a8aabd
  fg2         #6b6e85   fg3  #3d4055
  ds          #6b85ff   dsBright #8b9fff   dsPurple #a78bfa
  ok          #5eead4   warn #fbbf24   err #fb7185   info #60a5fa

Single source of truth — every styled run reads from PALETTE.

## Layout

Outer column (background bg):

- scroll area (height fill): boot block when no cards, otherwise
  one row per card with kind-colored glyph + label + summary.
- dock (intrinsic height): composer row → meta row → status bar.
  Approval, slash overlay, and sessions picker fold in above the
  composer row when active.

Three-pane sidebar/ctxpane code is gone — was the wrong shape for
the v1 mock. The "MISSION CONTROL" right rail in the mock is a
toggleable secondary view; we'll wire it as an opt-in render mode
later, not as the default layout.

## Specific row shapes

- Boot block (empty state): \`● REASONIX  DeepSeek code agent\`
  banner, then \`model\` / \`cwd\` / \`mcp\` rows, then a hint line
  with kbd-colored glyphs for \`/\` \`@\` \`!\`.
- Card row: \`<glyph> <LABEL>  <summary>\` per kind — YOU (blue),
  THINKING (purple), reasonix streaming (teal), tool (muted),
  diff (purple), error (err), warn (warn), plan/task (purple).
- Composer row: \`❯ <text> ▮ <text>\` on a bg2 line, fixed height 1.
- Meta row: left segments (\`↵ send · ⇧↵ newline · / cmd · @ file ·
  ! shell\`), spacer, right (\`esc cancel · ↑ history\`). Each kbd
  glyph in ds blue, label in fg2 muted — matches the mock's hint
  row exactly.
- Status bar: \`● reasonix · model X · mode review · busy/idle\` on
  the left; spacer; \`wallet ¥X · cwd ~/path\` on the right.
  Bg-tinted, fixed height 1.

## What still falls short of v1

- No ASCII REASONIX banner art (the 6-row block-letter logo). Too
  big for 80-col terminals; the compact \`● REASONIX  …\` banner
  ships instead, and a follow-up can add the art for wide terminals.
- Card head/body separation — each card is still one summary line.
  The mock has multi-line bodies (THINKING italic body, diff hunks,
  bash output). Wiring full bodies through to scene needs richer
  card payloads in \`SceneTraceCard\`, separate PR.
- Status bar ctx / tokens / cost / turn / git segments — need
  telemetry + git status wiring not yet exposed to scene.
- MISSION CONTROL right rail (PLAN / JOBS / CHANGES) — separate
  toggleable view.

## Tests

\`tests/scene-trace-frame.test.ts\` rewritten end-to-end against the
new structure (38 cases, all green) — shape tests use
\`scrollOf\` / \`dockOf\` / \`composerRowOf\` / \`statusRowOf\` /
\`metaRowOf\` helpers instead of fixed indices, so future row
reorderings don't churn the whole file.

\`RESERVED_ROWS\` (used by \`cardsForHeight\`) bumped 3 → 4 to reflect
the new dock: composer + meta + status = 3 rows; boot block adds 1
more on the cold-start path.

Closes-out #1007 (which was building on the wrong shape).

Refs #868

Co-authored-by: reasonix <reasonix@deepseek.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