Repository navigation
Keep keyboard focus after Scroll to end or removing a queued message - #391
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
Thanks for this. Before we can merge, please add a before/after screenshot or a short screen recording of the change working in the running app (the issue asks for one), plus a line on how you tested it. Two things to fix too:
|
The app sends the cancel first and drops the row when the thread updates, so focusing the clicked row's own button left it on a control that unmounts. Focus the next row's Remove (or the reply box) right away instead. Scroll to end now hands focus to the reply box only for keyboard activation (click detail 0); a pointer tap no longer opens the on-screen keyboard. Both behaviours are covered in the interaction tests.
|
Thanks. Both points are fixed in 9411b02.
Queued removal, right after the click — before: ring on the row being removed; after: ring on the surviving row: After the thread update drops the row — before: focus dropped to the page; after: focus stayed on the surviving Remove: Scroll to end from the keyboard — before: How I tested it: I ran the app with the real components, activated Remove and Scroll to end from the keyboard, and captured the focus state before and after the delayed row removal. |
|
Merged, thanks @tianxingjian2406, and thanks for the quick fix on both focus points. |






Fixes #330
What changed
data-session-ui="reply-composer"on the ReplyComposer wrapper. Focus cannot land on another Composer instance, for example the subagent pane's composer.Testing
scroll-to-end-pill.test.tsx,queued-messages-interaction.test.tsx) mount the real components on happy-dom and readdocument.activeElementafter each action. They fail without the fix and pass with it.bun run typecheck,bun test components app lib, andbun run lintrun clean (the known ghostty-web WASM baseline failure aside).Need help on this PR? Tag
@codesmith-botwith what you need.