Skip to content

fix(web): Tab from a new thread's composer reaches the project picker - #10

Merged
JoshuaHayesWasHere merged 4 commits into
mainfrom
t3/new-thread-tab-focus-project-picker
Nov 19, 2026
Merged

JoshuaHayesWasHere merged 4 commits into
mainfrom
t3/new-thread-tab-focus-project-picker

Conversation

@JoshuaHayesWasHere

@JoshuaHayesWasHere JoshuaHayesWasHere commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

A new thread tab with the highlighted project row in the picker focused after one Tab from the composer

I open a new thread tab with the keyboard and want to switch its project before typing. Tab from the composer skipped the project picker above it and went to the composer's own buttons, so the picker was out of reach without the mouse.

Now Tab from the composer goes to the highlighted project in the picker. The next Tab goes on to the button that Tab reached before. Up and down arrows move between projects, and Enter picks one. Shift+Tab walks the same path backward and then leaves the pane. Focus still starts in the composer, so typing right away works as before.

What changed

  • Web and desktop. On a new thread tab with the project picker showing, Tab runs composer, picker, then the composer's next button. The picker rows leave the page's own Tab order, so Tab from the header lands on the composer, and Shift+Tab from the composer leaves the pane. Tab keeps its existing jobs in the composer: completing a slash or @ menu, accepting a suggestion, indenting a list, and IME input.
  • The new tab launcher, mobile, and threads that already have messages are unchanged.

Evidence

Composer, Tab to the highlighted project, arrows down and up, Tab to the attach button, Shift+Tab back to the project, Shift+Tab to the composer, Shift+Tab out to the header:

Tab, arrow and Shift+Tab focus moving through a new thread tab

Recording as mp4: https://gist.githubusercontent.com/JoshuaHayesWasHere/e9a60f282f167691594504ad5fc1b433/raw/aafe2179f21c8b0cabd67b622ecf715d69aacf01/tab-order.mp4

Verification

Playbook: feature.

  • Drove a dev build in the browser panel. Focus starts in the composer. Tab focused the highlighted project row. The next Tab focused the attach button. Shift+Tab from the composer reached the header's New tab button, and Tab from there returned to the composer. Typing after Shift+Tab back into the composer still works.
  • draftHeroTabOrder.browser.test.tsx covers the full Tab, arrow and Shift+Tab order, including a list that scrolls.
  • Neon review fixes:
    • Shift+Tab looped between the composer and the picker, because the picker rows stayed in the page's Tab order. Fixed in 2b0a74e. The test asserts Shift+Tab reaches a control before the pane and Tab from it returns to the composer.
    • A scrolling picker list became a Tab stop of its own in Chromium. I reproduced it in the test first, with focus landing on the list, then fixed it in 9374e30.
    • Tab during IME composition. Fixed in 2b0a74e.
  • The existing test "a mounted thread view lets go of the thread structures it has replaced" failed 3 of 3 runs on the branch and passed on base. The inline key handler in ChatView kept replaced thread data alive. The handlers are now module functions (9374e30), and the test passes again.
  • Rebased onto main at 822cd86 (main was rewritten; the diff is unchanged). Before the final rebase, on the rebased head, Ctrl+T reused the open draft tab with focus in the composer, Tab focused the highlighted project, and the next Tab focused the attach button.
  • vp run check:changed: format, lint, knip, typecheck, react compiler and the changed tests pass, except "opens a linked Linear issue from an inactive thread's sidebar badge". That test fails the same way on base on this machine. It times out on a 404 from a localhost endpoint, and it passes in CI on main.

Not verified

  • The packaged desktop app. I tested the web build in Chromium only, not Firefox or Safari.
  • A picker with no project selected. The rows stay in the normal Tab order there, so nothing should change, but I did not try it.

Reviewed with neon-loop: 3 rounds with Gemini 4 Neon at high. Neon verdict: APPROVE.

Created with Claude Opus 5.5 in Claude Code, running in T3 Code.

… first

On a new-thread tab the project picker sits above the composer, so Tab from
the message box skipped it and went to the composer's own controls. Tab now
goes message box, picker (the highlighted project), then the control Tab
reached before. Shift+Tab reverses it, and arrow keys move between projects.
… through the picker

The picker rows stayed in the page's Tab order, so Shift+Tab from the
composer landed on them and the next Shift+Tab sent focus back to the
composer. The rows now take focus only through the composer's Tab, and IME
composition keeps Tab.
…d ChatView keeps no closure for it

An overflowing list with no tabbable rows became a Tab stop in Chromium, so
it now opts out too. The overlay's handler is a module function, which keeps
ChatView's replaced thread data collectable.
@JoshuaHayesWasHere
JoshuaHayesWasHere force-pushed the t3/new-thread-tab-focus-project-picker branch from 18b432c to 9374e30 Compare November 19, 2026 21:15
@JoshuaHayesWasHere
JoshuaHayesWasHere merged commit 8011bc6 into main Nov 19, 2026
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.

1 participant