Skip to content

fix(channels): leave Option+Up/Down to text fields outside the composer - #2765

Open
cheng-block wants to merge 2 commits into
block:mainfrom
cheng-block:cheng/fix-option-arrow-in-fields
Open

cheng-block wants to merge 2 commits into
block:mainfrom
cheng-block:cheng/fix-option-arrow-in-fields

Conversation

@cheng-block

@cheng-block cheng-block commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

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

  • The stepping when in src/bundled/channels/index.tsx now also requires !inFieldOutsideComposer(). Terminals keep their own check.
  • Every message composer's form carries data-composer-surface, so stepping from a composer is unchanged.
  • docs/channels.md now 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.

Testing

  • The unit test runs in jsdom, which only shows the key is no longer prevented. In-app steps 1 to 3 cover WebKit's own caret move.

Screenshots

Debug build of this PR: in the Canvas editor, Option+Shift+Up selects the line "bravo" instead of switching channels.

Canvas Edit tab with three lines, alpha, bravo, charlie; the line bravo is selected.

In-app check

Verified in the macOS app by Cheng.

Build: this PR at 2e4535ecb, merged locally with my other open PRs onto main at c037057a1, run as a debug app bundle with BUZZ_DEV_VIEWER= just desktop-bundle.

Open a channel in the middle of the sidebar, with unread channels below it.

  1. Open Channel actions > View canvas > Edit. Type three lines and put the caret mid-line in the second.
  2. Press Option+Up, then Option+Down. The caret moves to the line's start, then end. The channel stays.
  3. Press Option+Shift+Up. The text up to the line start is selected. The channel stays.
  4. In the message composer, press Option+Shift+Down. The unread channel below opens, as on main.
  5. In a thread's reply box, press Option+Shift+Down. An unread channel below opens, as on 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. main does the same.

buzz-review-completed

cheng-block and others added 2 commits November 5, 2026 23:52
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>
@tellaho

tellaho commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

🤖 No must-fix design issues found in source at 2e4535ecb.

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.

@tellaho

tellaho commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

🤖 Could you add a screenshot or short video of the change to the PR? Design uses these for faster reviews.

@cheng-block

Copy link
Copy Markdown
Contributor Author

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.

This branch has not been deployed

No deployments
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