Repository navigation
Board selection, keyboard and focus fixes - #1944
Merged
Merged
Conversation
React Flow's own selected prop is never true on a canvas whose nodes are controlled, so the ring the sheet draws for a selected card matched nothing. The frame now marks selected cards' wrappers itself and the ring, its far-zoom twin and a forced-colours highlight are drawn from that mark.
Selecting a card from a session row, a session's name or the ribbon leaves focus on the button the mouse pressed, and that button kept Delete because only single characters were handed back to the deck. Delete now goes back with the letters, so it removes the selected card; the button keeps Space and Enter, and a button reached by Tab keeps every key as before.
Opening the sheet gives its × focus by program, so the button was not one the mouse had pressed and kept every key, and the handler returned before the exception that lets ? close the sheet. ? now closes the sheet whatever in it has focus, except a text field, and the auto-repeat of the press that opened it does not shut it again.
No shortcut read the key's auto-repeat, so holding Space flipped pause and resume about thirty times a second and left the stream in whichever state the key came up on, and T, L, D and U flickered the theme and the panels the same way. Repeats are now ignored for every shortcut but J and K, which keep stepping through the board while held; a repeated Space is still cancelled.
…s sheet The sheet said Undo brings a removed card back, but the banner that carried Undo is gone and nothing offers one. The row now names the session list (L), which is the real way back and what the detail panel's Remove button already says.
React Flow renders the cards, and Tab visits them, in the order the frame hands them over, which was the order their agents were first heard of. A subagent spawned after another session started landed after that session, so Tab jumped from one session into the next and back for the rest of its subagents. The frame now hands them over down each column of sessions and then across, and inside a session the root and then each rank of subagents from the top.
…it away Closing Usage, This machine, Claude accounts, the detail panel or the session list with its own × or ‹ from the keyboard left focus on the page body, so the next Tab started again at the skip link and a screen reader said nothing. Focus now goes to the topbar button that opens the panel, and for the detail panel to the card it was about, or the canvas when that card is not drawn. A mouse press still leaves focus where it was, so Space keeps pausing the stream instead of reopening the panel.
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.
What changes
selectedprop is never true on a canvas whose nodes are controlled, so.agent-node.selectedand its far-zoom twin matched nothing and a selected card looked like every other card. The frame now marks selected cards' wrappers withrf-selectedand the ring is drawn from that: the session-hue outline and lift up close, the face's ring at a distance, and the highlight colour in a forced-colours theme (where the lift that tells selection from focus is dropped).<body>. Focus now goes to the topbar button that opens the panel, and for the detail panel to the card it was about (or the canvas if that card is not drawn). A mouse press still leaves focus where it was, so Space keeps pausing the stream.?closes the shortcuts sheet it opened from the keyboard. The sheet gives its × focus on opening, which kept the key.?now closes the sheet whatever in it has focus, except a text field, and the auto-repeat of the press that opened it does not shut it again.Verification
npm run typecheckclean.card-selection-ring.test.ts(no class on a selected card's wrapper, no rule drawing the ring from one)panel-close-focus.test.ts(no hand-off existed)delete-after-button-select.test.ts(Delete never reached the removal with a mouse-focused button)key-sheet-question-toggle.test.ts(the second?left the sheet open)held-shortcut-repeat.test.ts(togglePause ran six times for one held Space)key-help-delete-way-back.test.ts(the row promised Undo)canvas-tab-order.test.ts(arrival order: A, B, A's subagents)deck-keys-harness.ts) rather than reading its text.card-focus-ring-869,canvas-keyboard,topbar-interaction,left-column-824,toggle-state,machine-panel-escape,details-on-select-814.?then?closes the sheet; a held?leaves it open; the Delete row reads the new text.