Skip to content

feat(studio): align the keyboard shortcuts reference with the prototype - #2250

Merged
kantord merged 4 commits into
mainfrom
feat/studio-shortcuts-2206a
Oct 14, 2026
Merged

kantord merged 4 commits into
mainfrom
feat/studio-shortcuts-2206a

Conversation

@peppescg

@peppescg peppescg commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This is the keyboard-shortcuts slice of the settings, shortcuts, and About alignment (#2206, part of #2210). Part (b) covers the settings sections, About, and starter prompts, and closes the issue. This PR is stacked on #2233.

The Shortcuts page now uses the prototype's layout (stack-08, prototypes #42). It adds a Conversation group, fixed and locked flags on registry entries, and live Enter and Shift+Enter wording that follows the user's Message during a run preference. It also adds the Image attachments row to the features list.

Every binding, combo, while-typing scope, modal-scope rule, and the dispatcher's scan order is unchanged. The "No regression" section below has the proof.

What changed

Registry (shortcut-registry.ts)

  • Conversation group: new, between Chats and Composer. It holds the keys that act on the open conversation:

    • Escape (close.esc), moved from General. chat-escape.ts handles it on chat surfaces only, and its row already said "the top chat layer".
    • Expand or collapse details (chat.expandDetails), moved from Chats.
  • Scan order: close.esc keeps its place in the array. Only its group changes, so ShortcutProvider scans in the same order as before.

  • fixed flag: marks rows that no useShortcut handler dispatches, because a component's own key handling owns them:

    • close.esc (chat-escape.ts)
    • composer.send and composer.newline (the composer's onKeyDown)

    A test keeps this flag equal to "not registered through useShortcut".

  • locked flag: marks close.esc, whose key is load-bearing. Studio has no rebinding UI, so the flag has no effect yet, as in the prototype.

  • describeShortcut(shortcut, enterBehavior): words the two composer rows from EnterSendBehavior:

    • "Send message — while the agent is replying: queue the message" (or "steer the agent")
    • "Insert a new line — while the agent is replying: steer the agent" (or "queue the message")

    It mirrors resolveComposerAction, and a test checks the two against each other. Every other row returns its registry description.

  • Unchanged: shortcutAllowedByScopes, matchesShortcut, shortcutWorksWhileTyping, keycaps, and the provider.

Help rows (help-features.ts)

Image attachments is a new row. It's enabled by the deployment's image capability, the same gate chat-workspace.tsx uses for a new chat. The hint points at the composer's image button, and a note under the rows says that a chat's model may still decline images.

Page (shortcut-reference.tsx)

  • The page uses the prototype's grammar:
    • PageShell at max-w-3xl with space-y-6
    • no icon tile
    • rounded-xl border bg-card p-5 cards with 14px uppercase muted headings
    • undivided space-y-2.5 rows
    • a gap-6 sm:grid-cols-2 grid
    • the prototype's intro sentence, adapted
    • the 128px label column in "Reading the numbers"
  • "Escape in a chat" moves below the shortcut cards, so "see Escape order below" on the Escape row is now true.
  • "Checking what's turned on…" is now role="status".
  • Each group card is a section labelled with its group name.

Docs

user-docs/operating/studio.md: the shortcuts page follows the Message during a run preference.

Visible change

  • The page loses the icon tile and the first-screen "Escape in a chat" card. The shortcut cards come first, in the prototype's style.
  • There are five groups: General (5), Chats (9), Scheduled (1), Conversation (2), and Composer (2). Before, there were four.
  • Enter and Shift+Enter say what they do while the agent replies, and they change when the preference changes.
  • The features card can list Image attachments, followed by a one-line deployment note.

Differences from the prototype

  • Rows: Studio lists only bindings it implements. These prototype rows aren't added because Studio has no such binding:
    • Tools (MCP panels)
    • chat.details, debug.open, agents.toggle, and composer.model
    • approval keys (Y/A/W/N/D and the arrows)
    • transcript PgUp/PgDn/Home/End/⌘A
    • queue gestures, mod+enter, shift+tab, and mod+shift+u
  • Escape's group: Escape sits under Conversation. The prototype keeps it under General, but Studio's Escape is chat-scoped.
  • Composer wording: "Send message — …" rather than "Send — …". The registry description stays the prefix, so the page still shows every registry description. EnterSendBehavior has two values, so there's no queue-only case.
  • Back link: "← Settings" stays. The settings accessibility test requires a 44px return link.
  • Title size: the title keeps Studio's shared 34px page title. The prototype uses 30px on this page.
  • Keycaps: Studio still renders Ctrl on Windows and Linux. The prototype always shows ⌘ and tells the reader to substitute.
  • Features: only enabled features are listed, and the heading stays "Features on this agent". The prototype lists every row with a "not enabled" badge, under "Features on this daemon". An existing test asserts that disabled rows are hidden.
  • Studio content kept: the "Escape in a chat" card and the usage-legend wording ("% cached", "this turn") stay.

No regression

Pinning tests

d067c9142 adds a "registry pin" suite to shortcut-registry.test.ts, alone. It passed on the base (b7ca46bbe), and pins:

  • each shortcut's id, combo, group, description, and while-typing scope, in array order
  • the keycaps on Mac and elsewhere
  • shortcutAllowedByScopes for every id: no scope, an empty scope, a self-only scope, and nested scopes
  • the exact set of ids dispatched through useShortcut, from a scan of the source

On this branch the suite passes unchanged except for one justified edit: the group of close.esc and chat.expandDetails goes from General/Chats to Conversation, as #2206 asks. Ids, combos, descriptions, while-typing scopes, keycaps, scope filtering, order, and the dispatched set are identical.

Modified tests

  • shortcut-registry.test.ts: the two group values above.
  • help-features.test.ts: the ordered id list gains "image" at the end, because the row is new. The other nine ids and their order are unchanged.

Added tests

  • shortcut-registry.test.ts:
    • group order
    • the exact fixed and locked sets
    • fixed equals "not dispatched"
    • describeShortcut for both preferences
    • other rows unchanged
    • agreement with resolveComposerAction
  • shortcut-reference.test.tsx:
    • the Conversation card's rows
    • the live wording for a stored queue and steer preference
    • Image attachments shown only with the capability
    • the status role
  • help-features.test.ts: the image row follows image.

All existing assertions are kept, including "every registry description appears on the page", the 44px return link, the offline and failure states, and disconnect refresh.

Gate counts

Gate Base (b7ca46bbe) This branch (310f67db3)
Biome 428 files 428 files
Server 24 files / 195 tests 24 files / 195 tests
Web 136 files / 980 tests 136 files / 996 tests
Browser 66 passed 66 passed

Test evidence

  • task studio:check: passed. Biome, typecheck, and the generated-artifact check are clean.
  • task studio:browser: 66 passed, on desktop and mobile Chromium.
  • task docs: passed, with matlatl --strict reporting 0 broken links.

Screenshots

These were captured with a throwaway Playwright journey (Chromium, not committed) using offline BFF routes and a fixed clock (2026-09-25 12:30 UTC), in Europe/Rome and en-US.

  • Capabilities on: skills, learned skills, memory, user model, reflection, scheduling, steer, and image.
  • Sizes: each surface was shot at desktop 1280×800 and mobile 390×844, in light and dark. "Whole page" uses a tall viewport (1280×2400, 390×4400), because the page scrolls an inner container.
  • Enter preference: set through studio.chat.composer.enterToSend before boot.
  • Before is the base (b7ca46bbe). After is this branch (310f67db3).
  • Prototype is stack-08, shot with the shared prototype harness and the same clock, locale, and sizes, with its preference key mecatl-studio.enter-send-behavior.

Each Studio tree was captured twice. The runs matched pixel for pixel, apart from 30 px of anti-aliasing in one after shot. Red boxes mark before/after differences. The prototype column is never boxed. Desktop composites are downscaled to 1600px wide.

These screenshots predate the restack onto main, which adds main's Scheduled card (Filter scheduled tasks, /) after Chats, where main lists it; the prototype lists it last.

Shortcuts page, first screen

Intended change, matches the prototype's layout: no icon tile, the prototype's intro sentence, and the shortcut cards first. The Escape notes move below the cards. Deliberate deviations: the "← Settings" link stays, and the title keeps Studio's shared 34px page-title size (the prototype uses 30px).

Shortcuts page, first screen, desktop light

Dark and mobile

Desktop, dark:

Shortcuts page, first screen, desktop, dark

Mobile, light:

Shortcuts page, first screen, mobile, light

Mobile, dark:

Shortcuts page, first screen, mobile, dark

Shortcuts page, whole page

Intended change, matches the prototype's card grammar: rounded-xl cards, 14px uppercase headings, undivided rows, and a 3xl reading width. The new Conversation card holds Escape and expand details, the Image attachments row and the deployment note appear, and "Reading the numbers" uses the prototype's 128px label column. Deliberate deviations: Studio lists only the rows it implements (no Tools, Scheduled, approval-key, or transcript-scroll rows), shows only enabled features, and keeps its "Escape in a chat" card and legend wording.

Shortcuts page, whole page, desktop light

Dark and mobile

Desktop, dark:

Shortcuts page, whole page, desktop, dark

Mobile, light:

Shortcuts page, whole page, mobile, light

Mobile, dark:

Shortcuts page, whole page, mobile, dark

Enter preference: Queue message (the default)

Intended change, matches the prototype's wording pattern: Enter reads "Send message — while the agent is replying: queue the message" and Shift+Enter reads "… steer the agent". Before showed only "Send message" and "Insert a new line". Deviation: Studio keeps "Send message" (the prototype says "Send"), and has no third queue-only value.

Enter preference: Queue message (the default), desktop light

Mobile

Mobile, light:

Enter preference: Queue message (the default), mobile light

Enter preference: Steer agent

Intended change, matches the prototype: the two composer rows swap to "steer the agent" on Enter and "queue the message" on Shift+Enter. Before is identical to the queue preference because the page did not read the setting.

Enter preference: Steer agent, desktop light

Mobile

Mobile, light:

Enter preference: Steer agent, mobile light

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 Result Commit Test
[nit] The image-decline note showed even when the deployment had images off Fixed 48f9bfd16 fix(studio): show the image-decline note only with the image row shortcut-reference.test.tsx: "notes that a chat's model may decline images only when the image row shows" (fails on dd96edcd4, passes on the fix)

The note under Features on this agent ("the open chat's model may still decline images the deployment allows") now renders only when the Image attachments row does. With images on, the page is pixel-identical to before.

Gates on 574118489: studio:check server 195/195, web 997/997 (+1 test); studio:browser 66 passed.

Screenshots

Images off, desktop light: the note is gone.

Features card, images off, desktop light

Dark, mobile, and images on (unchanged)

Features card, images off, desktop dark

Features card, images off, mobile light

Features card, images off, mobile dark

Images on, desktop light (pixel-identical to before):

Features card, images on, desktop light

Re-verification (2026-10-11)

Re-verified at this head: no change needed.

Gates on the restacked head 48f9bfd16: studio:check passes (web 1,059, 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.

Refs #2206

🤖 Generated with Claude Code

@peppescg
peppescg added this pull request to stack #2227 October 10, 2026 10:25
@peppescg
peppescg force-pushed the feat/studio-shortcuts-2206a branch from 310f67d to d7cd759 Compare October 11, 2026 14:57
@peppescg
peppescg force-pushed the feat/studio-shortcuts-2206a branch from d7cd759 to 6a50033 Compare October 11, 2026 15:48
@peppescg
peppescg force-pushed the feat/studio-shortcuts-2206a branch from 6a50033 to c8ce54c Compare October 13, 2026 13:29
@peppescg
peppescg force-pushed the feat/studio-shortcuts-2206a branch from c8ce54c to 48f9bfd Compare October 14, 2026 08:45
@kantord
kantord force-pushed the feat/studio-shortcuts-2206a branch 4 times, most recently from 9d173be to ea36d3f Compare October 14, 2026 09:41
Base automatically changed from fix/studio-chat-stop-mobile-2231 to main October 14, 2026 09:41
peppescg and others added 4 commits October 14, 2026 12:41
Pin every shortcut's id, combo, group, description, while-typing scope,
keycaps on both platforms, modal-scope filtering, and the set of ids the
app dispatches through useShortcut, so the Shortcuts page alignment can
prove it leaves every binding unchanged.

Refs #2206

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- Add a Conversation group for keys that act on the open conversation:
  Escape (handled by chat-escape.ts on chat surfaces) and expand details.
- Flag component-owned rows as `fixed` (Escape, Enter, Shift+Enter) and
  Escape as `locked`; a test keeps `fixed` equal to "no useShortcut
  handler".
- Word Enter and Shift+Enter live from the "Message during a run"
  preference through describeShortcut, matching resolveComposerAction.
- Add the Image attachments help row, gated on the image capability,
  with a note that a chat's model may still decline images.
- Restyle the page onto the prototype's cards: 3xl reading width, no
  icon tile, uppercase card headings, undivided rows, Escape notes
  below the groups so "see Escape order below" holds.

Every binding, combo, scope, and dispatch order is unchanged.

Refs #2206

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The note under "Features on this agent" says a chat's model may still
decline images the deployment allows. It rendered even when the
deployment had images off, so it described a row that was not there.
Render it only when the Image attachments row shows.

Refs #2206

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@kantord
kantord force-pushed the feat/studio-shortcuts-2206a branch from ea36d3f to 4573833 Compare October 14, 2026 09:41
@kantord
kantord merged commit 04a4ec9 into main Oct 14, 2026
31 checks passed
@kantord
kantord deleted the feat/studio-shortcuts-2206a branch October 14, 2026 09: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.

2 participants