Skip to content

feat(studio): port the prototype's session dialogs, menus, and side panels - #2255

Merged
kantord merged 11 commits into
feat/studio-chat-transcript-2207cfrom
feat/studio-chat-sessions-2207d
Oct 14, 2026
Merged

kantord merged 11 commits into
feat/studio-chat-transcript-2207cfrom
feat/studio-chat-sessions-2207d

Conversation

@peppescg

@peppescg peppescg commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This is the Session surfaces step of the chat alignment (#2207, part of #2210): step 4 of 4, after the approvals (#2251), the composer (#2253), and the transcript and delegation (#2254). It's stacked on #2254, so review that first. With this PR, #2207 is complete across #2251, #2253, #2254, and this PR.

The session surfaces now come from the prototype (stack-08): its details, saved-transcript, soul, worktree-picker, and Debug with AI dialogs; the chat options' order, with a Copy submenu for the whole conversation; a ⋯ menu on each chat in the list; the inspect-only rows; and the side panels' frame, the side thread, the line-numbered file preview, and the canvas toolbar.

The prototype's UI runs on Studio's session logic. These are unchanged:

  • session-inspection.tsx's reads and gates: every query, the capability and online checks, the worktree choice, its eviction when the picker closes or the session changes, and the relist only on a placement_selector_* rejection
  • the inspect-only and proven-chat classification (isInspectOnlySession, isProvenChatSession)
  • the debug consent text (debug-session.ts) and its binding to the open chat
  • the side thread's logic and its late-verdict guard
  • the content preview, local canvas, and local file preview data paths
  • the side panel frame's resize, width, focus, and Escape order
  • the session list's selection, inline rename, delete, and folder filing
  • the BFF routes GET /api/v1/soul and GET /api/v1/sessions/{id}/worktrees; no contract changes

What changed

Session dialogs (session-details-dialog.tsx, transcript-dialog.tsx, soul-dialog.tsx, worktree-picker-dialog.tsx, debug-session-dialog.tsx, new; session-inspection.tsx)

  • Each view of the session dialog takes its prototype dialog's layout: a title and a one-line description, then the view's body. SessionInspection keeps the data and the rules; each new file is a view over them.
  • Details: the ID in a box with Copy (disabled, with the daemon's reason, when copying is denied; the ID stays hidden then, as before), and one labelled row per fact. A debug chat names its target with its own Copy. The reasons other views are unavailable sit under a rule, with Debug with AI.
  • Saved transcript: a role badge per turn and an activity line per turn's tool calls; an incomplete transcript says so above them; an empty one says nothing replays.
  • Soul: source, trust, drift, and size badges, the body, and its SHA-256.
  • Worktrees: the prototype's cards (label, branch chip, short revision, bare), a note on what fork and clear bring, and Studio's two actions.
  • The switches between views become a compact pill strip under the header.
  • Debug with AI opens the prototype's consent dialog, over the same text; it still creates nothing until confirmed, and only for the open chat.

Chat options (chat-workspace.tsx, transcript-actions.tsx, transcript-text.ts, session-copy-menu-items.tsx, session-row-action-items.tsx, new)

  • The prototype's order and groups. New entries: Compact conversation (when the daemon allows it, the composer's same action), Switch worktree…, View transcript, and Soul, each opening that view directly; a Copy submenu with Select conversation (selects just the transcript), Copy conversation (each message under its author's name), Copy session ID, and, on a debug chat, Copy debug target ID.
  • On a phone the Copy actions sit inline under a label: a submenu has no room beside the menu at 390 px.

Session list (session-sidebar.tsx, lib/session-kinds.ts, new)

  • A chat row's hover icons become the prototype's ⋯ menu: Copy session ID, Copy debug target ID (debug chats), View transcript, Fork chat, Move to folder (folders, No folder, New folder…), Rename (still inline), and Delete. A denied item shows the daemon's reason under its name.
  • View transcript and Fork chat work on any row without leaving the open chat. Forking another row reads that row's model first.
  • On a phone the folder choices sit inline, for the same reason as the Copy actions.
  • An inspect-only row takes the prototype's eye glyph, kind chip, Read-only badge (its tooltip is the daemon's reason), and relative time.

Side panels (side-panel-shell.tsx, content-preview-panel.tsx, side-thread-panel.tsx, code-block.tsx, new)

  • The frame's header takes the prototype's glyph colour, maximize icon, and X close, and sits on the chat header's 64 px seam beside the chat. A panel narrower than 22rem hides "Esc to Close", so the title isn't truncated away.
  • File preview: code in the prototype's line-numbered CodeBlock (Shiki colours, in the page theme); Markdown, images, and text in the prototype's padding. Studio's one-line note stays, now pinned to the top.
  • Canvas: the prototype's toolbar: the view switch as a pill, Copy canvas, and Clear canvas; the browser-only note sits under the editor.
  • Side thread: a thread glyph, the options menu's icons, the prototype's message spacing, and the main composer's card (with the model pill row under it when there is one).

Docs

  • user-docs/operating/studio.md describes the dialogs' extra facts, the chat options' direct entries and Copy actions, the row menu, the inspect-only labels, the file preview's line numbers, and the canvas toolbar.

Differences from the prototype

  • One dialog, with view switches: the details, transcript, soul, and worktree views share one dialog with a strip of switches, and the chat options open each view directly as the prototype does. An inspect-only session has no chat options, so the strip is its only path to the other views; the session-inspection suites move between views without closing.
  • Names kept: "Inspect session" (the prototype's "Session details"), and the dialog titles "Saved transcript", "Soul inspection", and "Choose successor worktree". The session-inspection suites, the chat header journey, and the integration suite assert them.
  • State: the daemon's own word with the prototype's dot, not a mapped label.
  • Details facts: token usage stays; the prototype's tool-call count, limits, and server row are absent (Studio's contract carries neither the counts nor the limits).
  • Worktree actions: Studio's Clear in selected worktree and Fork in selected worktree instead of the prototype's "What to bring" choice and Switch; the prototype also renames a forked successor, which Studio doesn't do.
  • Debug with AI: in the chat options, not the row menu: Studio binds a debug chat to the open chat.
  • Row menu on a phone: the ⋯ stays visible, as in step 3's row actions, instead of the prototype's long-press sheet. Its folder choices, and the chat options' Copy actions, sit inline on a phone, where the prototype's submenus fall off the screen.
  • Inspect-only rows: opening one shows Studio's read-only landing with its details, not the prototype's transcript dialog; the rows stay in Studio's "Inspect-only sessions" group.
  • Side thread: Studio's thread is a fork that carries the chat's history, so it shows its own transcript; the prototype's root-message card and reply count would need the fork point, which Studio doesn't record.
  • File preview note: Studio keeps "Local preview · size · not sent to Mecatl"; the prototype dropped it. It tells the reader a dropped file hasn't been sent.
  • Canvas: Studio's Preview and Edit names (the prototype's Styled and Raw), as two toggle buttons; the canvas integration suite asserts them. No maximize control, as before.
  • Phone minimap: at 390 px, Studio's row actions stay clear of the minimap (step 3's gutter). The prototype's rail covers Reply in thread and Open in detail panel.

Visible change

  • The details, saved-transcript, soul, worktree, and debug dialogs.
  • The chat options' order, the Copy submenu, and the direct dialog entries.
  • The ⋯ menu on each chat in the list, and wider row titles.
  • The inspect-only rows' badges.
  • The side panel header, the side thread's composer, the line-numbered file preview, and the canvas toolbar.

No regression

Pinning tests

083c37c50 was committed first, alone. It passes on the base (57ea6b74d) and on this branch, unchanged. To check the base, the branch's implementation files were swapped back to the base's (git checkout 57ea6b74d -- apps/web/src) with the pins kept, and the three pin files passed (25 tests); then HEAD was restored.

  • session-surfaces.pinning.test.tsx (11 tests): the inspect-only and proven-chat classification (truth tables); the details' facts and its ID copy; a denied copy hides the ID and copies nothing; the saved transcript's order, roles, and incomplete mark; the soul's body and source, and an absent soul; the worktrees' label, branch, and revision, and the empty state; the relist after a selector rejection of a clear, with the choice cleared; the debug consent's cancel (nothing created) and its binding to the open chat; copying the session ID from the chat options.
  • session-sidebar.pinning.test.tsx (6 tests): selecting a row and aria-current; inline rename with the trimmed title; delete through the owner's confirm; filing into a folder, out of it, and into a new one; a denied rename and delete; the inspect-only group without chat actions.
  • side-panels.pinning.test.tsx (8 tests): the close control takes focus, Escape closes, and focus returns to the opener; an open menu takes Escape first; the chat surface's Escape order; the close control; the canvas edit and preview; the file preview's code, Markdown, image, text, and no-preview paths, and its local note; copying a side thread.

The row actions' and chat options' helpers reach an item whichever control holds it (an icon button, a top-level item, or a submenu item) and select it from the keyboard, so the pins pass on both trees. Those helpers were settled before this branch's implementation commit and folded into the pin commit.

New tests

  • session-surfaces.alignment.test.tsx (11 tests): the chat options open the transcript, soul, and worktree views directly, and hide what the connection or chat doesn't offer; Select conversation selects only the transcript and Copy conversation copies it with headings; the Copy actions inline on a phone; Compact conversation; a row's View transcript for another chat without leaving the open one (and no Debug with AI there); a row's Fork chat with that row's model; a row's ID and debug-target copies; the transcript's tool-call line and empty note; a debug chat's target and its copy; an untrusted, drifted soul.
  • side-panels.alignment.test.tsx (4 tests): line numbers in the code preview; the canvas's Copy, Clear, and pressed view; the panel's controls; an inspect-only row's kind and Read-only badges.
  • code-block.test.tsx, transcript-text.test.ts, lib/session-kinds.test.ts (6 tests), with the ported helpers.

Modified tests

None. These pass with their assertions unchanged: session-inspection.test.tsx, side-panel-shell.test.tsx, content-preview-panel.test.tsx, chat-workspace.integration.test.tsx, chat-workspace.transcript.integration.test.tsx, approval-interactions.test.tsx, steer-trace.test.tsx, chat-escape.test.tsx, and every e2e journey, including session-inspection.spec.ts, side-panel-shell.spec.ts, and chat-header-stop.spec.ts.

Gate counts

Both columns ran through the shared gate lock on the same machine. Base is 57ea6b74d (#2254's head; its counts are that PR's own head run), and this branch is 04e7f6f70.

Gate Base (57ea6b74d) This branch (04e7f6f70)
Biome 466 files 485 files
Typecheck and generated-artifact check clean clean
Server 24 files, 195 tests 24 files, 195 tests
Web 150 files, 1,190 tests 158 files, 1,236 tests
Browser (task studio:browser) 66 66

The 46 new web tests are the 25 pins, the 15 alignment tests, and the 6 ported helper tests. The browser run includes the session-inspection, side-panel, chat approval, header Stop, delivery-follow, message-minimap, session-activity, and auth-recovery journeys on desktop and mobile Chromium.

task docs passed: matlatl --strict reported 185 documents and 0 broken links. It also rewraps one line of user-docs/reference/server-cli.md, because the default workspace path depends on the checkout's path length; that change isn't part of this PR.

Screenshots

Captured with a throwaway Playwright journey (Chromium, not committed), with offline BFF routes. The chats are the prototype harness's own (the flaky-scheduler chat and its side thread), with the prototype's soul, worktrees, and placement, plus two inspect-only sessions (a scheduled run and a subagent). The file previews attach the prototype tour's logger.ts and jose-migration-guide.md, and a PNG of its chart. The clock is fixed at 2026-09-25 12:30 UTC, the time zone is Europe/Rome, and the locale is en-US. Every surface was shot at desktop 1280×800 and mobile 390×844, in light and dark.

Before is the base (57ea6b74d, #2254's head) and after is this branch's head (04e7f6f70). Each tree was captured twice; both pairs matched pixel for pixel on all 64 shots. Every before and after pair was pixel-compared, and red boxes mark the regions that differ. Before has no direct dialog entries, so each dialog is opened from Inspect session on both trees. Desktop composites are downscaled to 1600px wide.

The Prototype column comes from the prototype harness (stack-08): the gallery where it has the surface, and new captures for the Copy submenu, the row menu, the tour's Markdown and image previews, and the 390 px row actions. Its chats differ where noted, so it's a visual reference, not the same content.

Session dialogs

Session details

Intended change: the prototype's details dialog: a description, the ID in a box with Copy, and one labelled row per fact (title with its provenance chip, state with a dot, kind, permission mode, safety level, provider, model, effort, context window, placement, branch, revision, created, turns). Matches the prototype, except: the state stays the daemon's word, the token counts stay (Studio shows usage here), the prototype's tool-call count and limits are absent (Studio's contract has neither), and the strip of view switches under the header stays (see Differences).

Session details, desktop light

Dark and mobile

Desktop, dark:

Session details, desktop dark

Mobile, light:

Session details, mobile light

Mobile, dark:

Session details, mobile dark

Saved transcript

Intended change: the prototype's replay: a role badge per turn, an activity line for a turn's tool calls, and the chat's title and ID under the dialog title (before: a bordered card per saved row, including empty tool rows). Matches the prototype, except the dialog keeps Studio's title, "Saved transcript".

Saved transcript, desktop light

Dark and mobile

Desktop, dark:

Saved transcript, desktop dark

Mobile, light:

Saved transcript, mobile light

Mobile, dark:

Saved transcript, mobile dark

Soul inspection

Intended change: the prototype's soul view: source, trust, and size badges, the body in a monospace box, and its SHA-256 (before: "Provenance: user" and the raw text). Matches the prototype, except the title stays "Soul inspection".

Soul inspection, desktop light

Dark and mobile

Desktop, dark:

Soul inspection, desktop dark

Mobile, light:

Soul inspection, mobile light

Mobile, dark:

Soul inspection, mobile dark

Worktree picker

Intended change: the prototype's worktree cards: the label, the branch as a chip, and a short revision, with a note on what fork and clear bring. Matches the prototype's list. Studio keeps its two actions, Clear in selected worktree and Fork in selected worktree, where the prototype has a "What to bring" choice and Switch: same operations, one step fewer, and the relist rule's tests name them.

Worktree picker, desktop light

Dark and mobile

Desktop, dark:

Worktree picker, desktop dark

Mobile, light:

Worktree picker, mobile light

Mobile, dark:

Worktree picker, mobile dark

Debug with AI consent

Intended change: the prototype's consent dialog, over Studio's consent text. Matches the prototype; the only visible change is the title's trailing question mark.

Debug with AI consent, desktop light

Dark and mobile

Desktop, dark:

Debug with AI consent, desktop dark

Mobile, light:

Debug with AI consent, mobile light

Mobile, dark:

Debug with AI consent, mobile dark

Inspect-only session, opened

Intended change: an inspect-only session (a scheduled run here) opens on the same details dialog, with the list's new inspect-only rows behind it. Matches the prototype's details layout; the prototype opens an inspect-only row's transcript instead, Studio keeps its read-only landing.

Inspect-only session, opened, desktop light

Dark and mobile

Desktop, dark:

Inspect-only session, opened, desktop dark

Mobile, light:

Inspect-only session, opened, mobile light

Mobile, dark:

Inspect-only session, opened, mobile dark

Menus

Chat options

Intended change: the prototype's order and grouping: token usage; Show Tools, Expand details, the steer trace; Compact, Clear, Fork, Open local canvas (phone), Switch worktree…; a Copy submenu; View transcript, Inspect session, Soul, Debug with AI; Rename, Delete. Matches the prototype, except the item that opens the details is still named Inspect session (the prototype's "Session details"), the steer trace and Debug with AI stay, and on a phone the Copy actions sit inline under a "Copy" label.

Chat options, desktop light

Dark and mobile

Desktop, dark:

Chat options, desktop dark

Mobile, light:

Chat options, mobile light

Mobile, dark:

Chat options, mobile dark

Chat options, Copy

Intended change: Copy opens Select conversation, Copy conversation, and Copy session ID (before: Copy session ID alone, at the top level). Matches the prototype on desktop. On a phone they sit inline in the menu, because the prototype's submenu has no room beside the menu at 390 px and falls off the screen.

Chat options, Copy, desktop light

Dark and mobile

Desktop, dark:

Chat options, Copy, desktop dark

Mobile, light:

Chat options, Copy, mobile light

Mobile, dark:

Chat options, Copy, mobile dark

Session row menu

Intended change: a chat row's three hover icons (move, rename, delete) become the prototype's ⋯ menu: Copy session ID, View transcript, Fork chat, Move to folder, Rename, Delete. Rows also regain their title width. Matches the prototype, except Debug with AI isn't in the row menu (it stays bound to the open chat), the ⋯ stays visible on a phone instead of a long-press sheet, and Move to folder is inline on a phone. The prototype's phone column shows its list: its row actions open from a long press, which the harness can't send.

Session row menu, desktop light

Dark and mobile

Desktop, dark:

Session row menu, desktop dark

Mobile, light:

Session row menu, mobile light

Mobile, dark:

Session row menu, mobile dark

Session list

Inspect-only rows

Intended change: each inspect-only row takes the prototype's eye glyph, a kind chip, a Read-only badge whose tooltip is the daemon's reason, and the relative time (before: title and state). Matches the prototype's rows. Studio keeps its "Inspect-only sessions" group, where the prototype groups runs by recency under Scheduled; the prototype column shows its list.

Inspect-only rows, desktop light

Dark and mobile

Desktop, dark:

Inspect-only rows, desktop dark

Mobile, light:

Inspect-only rows, mobile light

Mobile, dark:

Inspect-only rows, mobile dark

Side panels

Side thread with replies

Intended change: the panel takes the prototype's frame: a thread glyph and title, the window controls (maximize and an X), a 64 px header on the chat header's seam, and the prototype's composer card. A narrow panel hides the "Esc to Close" hint so the title stays. Matches the prototype, except the thread still shows its own transcript without the prototype's root-message card and reply count: Studio's thread is a fork that carries the chat's history (see Differences).

Side thread with replies, desktop light

Dark and mobile

Desktop, dark:

Side thread with replies, desktop dark

Mobile, light:

Side thread with replies, mobile light

Mobile, dark:

Side thread with replies, mobile dark

File preview, code

Intended change: a code file opens in the prototype's line-numbered viewer, in the page's theme, under the prototype's header. Matches the prototype, except Studio keeps its one-line note ("Local preview · 1.8 KB · not sent to Mecatl"), which the prototype dropped.

File preview, code, desktop light

Dark and mobile

Desktop, dark:

File preview, code, desktop dark

Mobile, light:

File preview, code, mobile light

Mobile, dark:

File preview, code, mobile dark

File preview, Markdown

Intended change: the prototype's reading padding and type size for a Markdown file. Matches the prototype, with the same note.

File preview, Markdown, desktop light

Dark and mobile

Desktop, dark:

File preview, Markdown, desktop dark

Mobile, light:

File preview, Markdown, mobile light

Mobile, dark:

File preview, Markdown, mobile dark

File preview, image

Intended change: the prototype's padded, rounded image. Matches the prototype, with the same note. (Studio's fixture is a PNG of the prototype tour's chart; Studio's image previews accept raster images.)

File preview, image, desktop light

Dark and mobile

Desktop, dark:

File preview, image, desktop dark

Mobile, light:

File preview, image, mobile light

Mobile, dark:

File preview, image, mobile dark

Canvas

Intended change: the prototype's toolbar above the editor, with the view switch as a pill, Copy canvas, and Clear canvas; "Saved only in this browser." moves under the editor. Matches the prototype, except the views keep Studio's names, Preview and Edit (the prototype's Styled and Raw), and the canvas has no maximize control.

Canvas, desktop light

Dark and mobile

Desktop, dark:

Canvas, desktop dark

Mobile, light:

Canvas, mobile light

Mobile, dark:

Canvas, mobile dark

Phone check

Reply in thread at 390 px

No change intended. At 390 px the row actions, including Reply in side thread, sit clear of the minimap: the screenshot journey asserts that the element on top at the button's centre is the button itself, on both trees. The prototype's rail covers its Reply in thread and Open in detail panel at this width.

Reply in thread at 390 px, desktop light

Dark and mobile

Desktop, dark:

Reply in thread at 390 px, desktop dark

Mobile, light:

Reply in thread at 390 px, mobile light

Mobile, dark:

Reply in thread at 390 px, mobile dark

The prototype reference code is on stack-08, in apps/web/src/features/chat/: session-details-dialog.tsx, soul-dialog.tsx, transcript-dialog.tsx, transcript-text.ts, worktree-picker-dialog.tsx, debug-session-dialog.tsx, session-copy-menu-items.tsx, session-row-action-items.tsx, transcript-actions.tsx, side-thread-panel.tsx, file-preview.tsx, code-block.tsx, local-canvas-panel.tsx, side-panel.tsx, inspect-session-list.tsx, and lib/session-kinds.ts.

#2207 is complete across #2251 (approvals), #2253 (composer), #2254 (transcript and delegation), and this PR (session surfaces).

Review fixes

Fixes from the final regression and security review of the stack (stack #2227). Each one comes with a test that fails without the fix.

Finding Fix Commit Test (fails on 04e7f6f70, passes now)
Major: Canvas Clear wiped the canvas in one click with no undo Clear opens an AlertDialog ("Clear the canvas?"). Cancel or Escape keeps the notes. The user docs say Clear asks first. c8ed0f2f4 side-panels.alignment.test.tsx "asks before Clear wipes the canvas…"; the existing toolbar test now confirms the dialog before it checks the cleared canvas
Fork from the row menu had no in-flight guard A fork is in flight from its model read to its end. A second start returns early, and every Fork chat entry (row menus, chat options) is disabled meanwhile. 7b8056aa4 session-surfaces.alignment.test.tsx "forks only once while a fork is in flight" (on the old head: three forks)
Copy conversation labelled delivery notes as "You" A delivery note is headed "Scheduled task ". d8db757fc transcript-text.test.ts
The copyId gate was inconsistent When a daemon withholds IDs, the saved transcript shows the title only, the details show the debug target as Unavailable, and Copy debug target ID is disabled with the daemon's reason. 3427c08d4 session-surfaces.alignment.test.tsx "withholds every ID, the debug target's too…"
inspectionOpen stuck when the row disappeared Derived from inspection && inspectionSession, so shortcuts and Escape come back when the dialog unmounts. 7033b5fc6 session-surfaces.alignment.test.tsx "releases the shortcuts when an inspected row leaves the list"
Visual audit: side-thread model pill clipped at 1280px In the side thread, the pill and its row may shrink. The value truncates, and the trigger's title keeps the whole choice. 504a281d8 e2e/side-panel-shell.spec.ts "the side thread's model pill stays inside the panel" (old head: pill ends at 1308px in a 1280px viewport)

Gates at 983dcf706:

Gate Before (04e7f6f70) After
Web 158 files, 1,236 tests 158 files, 1,241 tests
Server 195 tests 195 tests
Browser 66 passed 68 passed
task docs — 185 documents, 0 broken links

No assertion was removed. One studio:check run failed once on chat-composer.alignment.test.tsx ("clears the stored draft…", a #2253 test this PR doesn't touch, with a socket hang up). It passed 5 times alone and in the two full reruns.

Screenshots

Before 04e7f6f70 | After 983dcf706 | Prototype stack-08.

Canvas Clear asks first. Deliberate deviation: the prototype clears in one click; Studio confirms because the canvas has no undo.

Canvas Clear, desktop light

More screenshots

Canvas Clear, mobile light
Canvas Clear, desktop dark
Canvas Clear, mobile dark

A debug chat that withholds IDs: row menu. Copy debug target ID is disabled with the daemon's reason, like Copy session ID. The prototype has no copyId gate.

Debug row menu, desktop light
Debug row menu, desktop dark

Saved transcript of that chat. The description names the chat without its ID.

Saved transcript, mobile light
Saved transcript, desktop light

Side-thread model pill at 1280px. It now ends inside the panel, with the value truncated. Mobile is pixel-identical to before.

Side-thread pill, desktop light
Side-thread pill, desktop dark

Re-verification (2026-10-11)

  • The canvas Clear confirmation dropped focus and let shortcuts through (minor). Confirming Clear empties the canvas, which disables the Clear button, so focus fell to the page and Escape no longer closed the canvas. Focus now returns to the canvas field, or to the Preview toggle in preview mode. The confirmation also registered no shortcut scope, so ? and mod+shift+o acted on the chat behind it; it now suppresses them while open. (87bdeb6bd) Tests: side-panels.alignment.test.tsx "keeps focus in the canvas after a keyboard Clear, in both views", "blocks app shortcuts while the Clear confirmation is open" (both fail without the fix). No visible change.

Gates on the restacked head 87bdeb6bd: studio:check passes (web 1,382, server 210 tests). At the stack top (#2256): studio:browser 118 passed, 30 skipped; the mecated --mock integration suite 8 passed. The browser suite takes 5.3 minutes on a CI runner.

Commit hashes cited earlier in this body predate the restacks; the current commits keep the same subjects. Hashes in Review fixes are updated.

Closes #2207

🤖 Generated with Claude Code

@peppescg
peppescg added this pull request to stack #2227 October 10, 2026 13:49
@peppescg
peppescg force-pushed the feat/studio-chat-sessions-2207d branch from 04e7f6f to e7e54db Compare October 11, 2026 14:57
@peppescg
peppescg force-pushed the feat/studio-chat-sessions-2207d branch from e7e54db to 6eb6710 Compare October 11, 2026 15:28
@peppescg
peppescg force-pushed the feat/studio-chat-sessions-2207d branch from 6eb6710 to 284bf2a Compare October 11, 2026 15:48
@peppescg
peppescg force-pushed the feat/studio-chat-sessions-2207d branch from 284bf2a to c4f776f Compare October 11, 2026 16:13
@peppescg
peppescg force-pushed the feat/studio-chat-sessions-2207d branch from c4f776f to 15be9fa Compare October 13, 2026 13:29
@peppescg
peppescg force-pushed the feat/studio-chat-sessions-2207d branch from 15be9fa to d432aa9 Compare October 13, 2026 13:54
@peppescg
peppescg force-pushed the feat/studio-chat-sessions-2207d branch from d432aa9 to e9eceb2 Compare October 13, 2026 15:03
@peppescg
peppescg force-pushed the feat/studio-chat-sessions-2207d branch from e9eceb2 to 87bdeb6 Compare October 14, 2026 08:45
@kantord
kantord force-pushed the feat/studio-chat-sessions-2207d branch 8 times, most recently from d4a2094 to 1d1179d Compare October 14, 2026 10:02
Pin the session surfaces' outcomes before their UI moves to the
prototype's dialogs and menus:

- each inspection view's data (details, saved transcript, soul,
  worktrees), a denied ID copy, and the selector rejection relist for a
  clear;
- the inspect-only and proven-chat classification;
- the debug consent's cancel and its binding to the open chat;
- copying the session ID from the chat options and the details;
- the chat list's select, inline rename, delete, folder filing, and the
  inspect-only group;
- the side panels' focus and Escape order, the file preview's data
  paths, the canvas, and copying a side thread.

Refs #2207

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
peppescg and others added 10 commits October 14, 2026 13:23
…anels

The session surfaces now come from the prototype (stack-08) on Studio's
session-inspection logic:

- The session dialog's views take the prototype's details, saved
  transcript, soul, and worktree picker layouts. SessionInspection still
  owns every read, capability gate, the worktree choice, and the relist
  on a selector-specific rejection; each view only renders its data.
- The Debug with AI consent is the prototype's dialog, over the same
  consent text, and still binds the debug chat to the open chat.
- The chat options take the prototype's order: Compact, Clear, Fork,
  Switch worktree, a Copy submenu (Select conversation, Copy
  conversation, Copy session ID, Copy debug target ID), View transcript,
  Inspect session, Soul, Debug with AI, Rename, and Delete.
- A chat list row's actions move into the prototype's row menu (copy,
  View transcript, Fork chat, Move to folder, Rename, Delete), and an
  inspect-only row takes the prototype's kind and Read-only badges.
- The side panel frame takes the prototype's header and window
  controls; the file preview numbers a code file's lines; the canvas
  gains its toolbar with Copy and Clear; the side thread takes the
  prototype's header and composer card.

Refs #2207

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… narrow panel

- On a phone, the chat options' Copy actions and a list row's Move to
  folder choices sit inline under a label: a submenu had no room beside
  the menu at 390 px and fell off the screen.
- A side panel narrower than 22rem hides its "Esc to Close" hint, so the
  panel's title (Thread, Local canvas) is not truncated away.

Refs #2207

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ide panels

Refs #2207

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Clear deleted every canvas note in one click, and the canvas has no
undo. It now opens a confirmation; Cancel or Escape keeps the notes.
The existing toolbar test confirms the dialog before it checks the
cleared canvas.

Refs #2207

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Fork chat in a row's menu read the row's model before it posted the
fork, and only the post counted as in flight. Forking from another row,
or the fork shortcut, during that read started a second (and third)
fork. A fork is now in flight from its first step to its end: a second
start returns early, and every Fork chat entry is disabled meanwhile.

Refs #2207

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Copy conversation headed a scheduled task's delivery note with the
user's name, so the copy said the user wrote the agent's report. A note
is now headed "Scheduled task <name>", as the transcript and the
minimap show it.

Refs #2207

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A chat whose daemon withholds IDs (capabilities.copyId) still showed
its ID in the saved transcript's description, and its debug target's ID
in the details and the row menu's Copy debug target ID. The transcript
names the chat by title only, the details say the target is
unavailable, and the menu item is disabled with the daemon's reason,
like Copy session ID.

Refs #2207

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The inspection dialog renders only while its row is in the chat list,
but "inspection open" came from the request alone. When the row left
the list (deleted in another tab, say), the dialog vanished while
shortcuts and Escape stayed suppressed. It is now open only while its
row resolves.

Refs #2207

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
At 1280px the model pill under the side thread's composer ran past the
panel's right edge ("Model Claude Sonnet 4.5 · Mediu"), because the
pill never shrinks. In the side thread the pill and its row may now
shrink: the model and effort truncate, and the trigger's title keeps
the whole choice. The chat composer's pill keeps its size and gains the
same title.

Refs #2207

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ation

Confirming Clear empties the canvas, which disables the Clear button, so
the dialog's focus return fell to the page. Escape then no longer closed
the canvas, and a keyboard user lost their place. Focus now returns to
the canvas field, or to the Preview toggle in preview mode.

The confirmation also registered no shortcut scope, so ? and
mod+shift+o acted on the chat behind it. It now suppresses app
shortcuts while open.

Refs #2207

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@kantord
kantord force-pushed the feat/studio-chat-sessions-2207d branch from 1d1179d to a64d1d3 Compare October 14, 2026 10:23
@kantord kantord mentioned this pull request Oct 14, 2026
41 tasks done

@kantord kantord left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. I reviewed the diff with an independent reviewer and a skeptic pass. No blockers found: delete, fork, clear, rename and the debug-consent dialog all act on a captured session id and are gated by daemon capabilities; copy and export only use already-rendered text; CI is green.

One optional polish item is in #2303, section E: forkListedChat navigates to the new chat even if the user went elsewhere during the fork. The other candidates (parent id shown when ID copying is gated off, Fork/Clear/Debug on a debug chat, row-menu "View transcript" gating) were checked and dropped: the daemon already disables Fork and Clear for debug chats, and session ids are not secret.

Fully or partially written by an AI agent.

@kantord
kantord merged commit c3e748c into main Oct 14, 2026
31 checks passed
@kantord
kantord deleted the feat/studio-chat-sessions-2207d branch October 14, 2026 10:47
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Oct 20, 2026
2 tasks
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.

Studio alignment: chat UI from the prototype on Studio's chat logic

2 participants