Repository navigation
fix(studio): focus the composer after the approval panel closes, hide Steer when unsupported - #2320
Merged
Merged
Conversation
peppescg
approved these changes
Oct 15, 2026
peppescg
left a comment
Contributor
There was a problem hiding this comment.
Thanks Daniel. Detecting steer support from the daemon looks right, and the focus hand-off is well covered by the three approval tests.
Nits:
apps/web/src/features/chat/chat-workspace.tsx:2863: on WebKit, clicking a button leaves focus onbody(as the comment inuse-approval-shortcuts.tsnotes), so the "reader moved focus elsewhere" guard doesn't hold for Safari mouse users. An ask that settles in the background, under an open panel, will pull focus into the composer and can clear a transcript selection; on a phone it may also open the keyboard after tapping a verdict in the sheet. Consider skipping the focus bump whenisMobile, and whenwindow.getSelection()holds a non-collapsed selection in the transcript.apps/web/src/features/shortcuts/shortcut-reference.tsx:49: this inlinesruntime.data?.capabilities.steer !== false. A comment saying it mirrorsuseSteerAvailable(it can't reuse the hook because it readsfreshDeploymentQuery) would keep the two from drifting.apps/web/src/features/chat/chat-composer.tsx:312:focus({ preventScroll: true })would avoid a scroll jump when the composer is already in view.
kantord
force-pushed
the
studio-followups/10-focus-and-steer
branch
4 times, most recently
from
October 15, 2026 09:29
04ee595 to
ba2841f
Compare
kantord
force-pushed
the
studio-followups/10-focus-and-steer
branch
2 times, most recently
from
October 15, 2026 13:00
8c26262 to
b9eea46
Compare
kantord
force-pushed
the
studio-followups/10-focus-and-steer
branch
from
October 15, 2026 13:26
b9eea46 to
6e014ce
Compare
Base automatically changed from
studio-followups/09-transcript-scroll-copy
to
main
October 15, 2026 14:01
… Steer when unsupported Focus that fell with a settled or retracted approval panel goes to the composer (never a verdict button); focus already moved elsewhere stays. When the daemon reports it cannot steer, the Steer option, the Shift+Enter steer path and the queued-message Steer item are hidden, and the stored preference is left untouched. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
kantord
force-pushed
the
studio-followups/10-focus-and-steer
branch
from
October 15, 2026 14:01
6e014ce to
f6b9030
Compare
Merged
2 tasks
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.
Summary
Part of #2303 ("Tiny follow-up fixes"); it does not close it. This is PR 10 of 14 in a stack of draft PRs, reviewed and merged in order.
What changed
ChatComposer:focusComposerSignal(mirrorsclearDraftSignal). The workspace bumps it from the approval-preview cleanup effect only if focus is on the body or inside the approval panel.useSteerAvailable(runtime.data?.capabilities.steer !== false; unknown keeps the stored preference).resolveComposerActionqueue for Enter and Shift+Enter while working; the queued strip hides Steer;describeShortcutsays steering is off.Behavior changes
No verdict button is ever auto-focused on a new ask (deliberate: a blind
wcould grant a persistent rule). With steering unsupported, messages while the agent works always queue.Screenshots
Before is the parent branch (#2319), after is this PR, with the same scenario code and offline mock data.
Composer unfocused:
document.activeElementisBODY.Composer focused:
TEXTAREA"Message Mecatl",:focus-visibletrue (a slightly darker border).steer: false)Both "Queue message" and "Steer agent" are offered.
Only "Queue message", and the description says this daemon cannot steer.
Also in this PR, on the same page:
steer: true)Both options are still offered.
Queue is shown selected and the stored value is left untouched.
Verification
Biome, typecheck, the full Studio test suite and
pnpm generated:checkpass on this branch, run on the assembled stack. The full Playwright suite passes on the stack tip (122 passed, 30 skipped, 0 failed, includingchat-approvalagainst a realmecatedbuild). New tests fail with their fix reverted (the "option present when steer is true" settings test is a regression guard). Not tested directly:shortcut-reference.tsxpassingsteerAvailableintodescribeShortcut, and the mobile bottom-sheet focus case.Not included
A separate "Always wait" option. The stale-run "ended before steering" notice is unchanged.
Fully or partially written by an AI agent.
🤖 Generated with Claude Code