Repository navigation
fix(channels): leave Option+Up/Down to text fields outside the composer - #2765
cheng-block wants to merge 2 commits into
Conversation
Previous and next conversation (Option+Up/Down, with Shift for unread only) ran from any text field, so Option+Up/Down in the Canvas editor or a channel details field switched channels instead of moving the caret. Stepping now also checks inFieldOutsideComposer(), the check Escape's mark-read already uses, so it still runs from the message composer and terminals still keep the key. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Cheng Peng <cheng@block.xyz> Co-authored-by: Cursor <cursoragent@cursor.com>
The test checks that stepping stays available in the message composer
and is unavailable in other text fields. It never presses a key, and on
macOS the composer handles plain Option+Up/Down itself, so the old name
("steps from the message composer") promised more than the test checks.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Cheng Peng <cheng@block.xyz>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 No must-fix design issues found in source at This is a contained fix for caret movement and selection in Canvas and other text fields, within the launch bug-fix policy. All four stepping shortcuts reuse the existing field guard; composer eligibility and terminal/modal handling remain intact. The regression checks field versus composer focus. Source review only; tests inspected, not rerun. Native caret/selection and composer behavior are author-reported. No screenshots supplied; themes, widths, enlarged text, state visuals and live keyboard/focus were not independently exercised. |
|
🤖 Could you add a screenshot or short video of the change to the PR? Design uses these for faster reviews. |
Added under Screenshots in the description. They come from the debug build I tested. |
Why
In the Canvas editor (Channel actions > View canvas > Edit), Option+Up/Down opened the previous or next channel instead of moving the caret. Option+Shift+Up/Down jumped to an unread channel instead of extending the selection.
The four stepping shortcuts run from any text field, so they work while you type a message. The dispatcher then cancels the field's own caret move. Mark conversation as read already avoids this with
inFieldOutsideComposer(), but stepping never got that check.What
The stepping shortcuts now leave the key to text fields outside the message composer.
How
wheninsrc/bundled/channels/index.tsxnow also requires!inFieldOutsideComposer(). Terminals keep their own check.data-composer-surface, so stepping from a composer is unchanged.docs/channels.mdnow names these text fields where it lists when stepping leaves the key alone.Risk
Only the four stepping shortcuts change, and only in text fields outside the composer. Dialog fields, such as Settings, were never affected.
mainat8dca3d8be, and the channels, shortcuts andEditableInputtests pass.index.tsx,index.test.tsxanddocs/channels.mdin other places. They merge cleanly with this branch.Testing
Screenshots
Debug build of this PR: in the Canvas editor, Option+Shift+Up selects the line "bravo" instead of switching channels.
In-app check
Verified in the macOS app by Cheng.
Build: this PR at
2e4535ecb, merged locally with my other open PRs ontomainatc037057a1, run as a debug app bundle withBUZZ_DEV_VIEWER= just desktop-bundle.Open a channel in the middle of the sidebar, with unread channels below it.
main.main.On
main, step 2 opens the previous channel. If steps 4 and 5 move the caret instead, the desktop sent the arrow as a control character.maindoes the same.buzz-review-completed