Skip to content

fix(web): focus PR Author and Labels filter search inputs on keyboard open - #46900

Merged
juliusmarminge merged 3 commits into
pingdotgg:mainfrom
only21mil:fix/web-pr-filter-search-keyboard-focus
Dec 1, 2026
Merged

juliusmarminge merged 3 commits into
pingdotgg:mainfrom
only21mil:fix/web-pr-filter-search-keyboard-focus

Conversation

@only21mil

Copy link
Copy Markdown
Contributor

Problem

Opening Author or Labels on /pull-requests from the keyboard (ArrowRight/Enter) focuses the first menu item instead of Search authors/Search labels. Arrows wrap across items and Shift+Tab/Tab close the menu, leaving both inputs unreachable by keyboard.

Change

Wrap PullRequestAuthorFilter and PullRequestLabelFilter in Base UI's Menu.FilterProvider (filter={null}), render MenuSearchInput as Menu.Input, and wrap items in Menu.List (PullRequestListFilters.tsx). Keyboard open focuses the search field (real DOM focus) and highlights items via aria-activedescendant; autoFocus keeps hover focus. In MenuSearchInput (ui/menu.tsx), unmodified ArrowLeft/ArrowRight bubble when empty so ArrowLeft closes submenus (including Issues filters); caret movement and top-level pickers are unchanged.

Scope

Web-only keyboard accessibility bug fix (inputs unreachable by keyboard); small fix for an obvious bug, no issue. Mobile uses native menus/search sheet; server and providers untouched.

Verification

  • Setup: Ubuntu 26.04.1 LTS, Chromium 156.0.8078.4, dark, 1440×900, isolated dev state, public pingdotgg/t3code PRs, keys sent through the debugging port (Playwright).
  • Steps: /pull-requests → Filters → Enter → Author/Labels → ArrowRight (also Enter, empty ArrowLeft close, typed caret ArrowLeft, hover, and all three other MenuSearchInput pickers before/after).
5940790129 d90e60d9d6
Author focuses Anyone instead of search
Author focuses Anyone instead of search
Author focuses Search authors
Author focuses Search authors
Labels focuses first label instead of search
Labels focuses first label instead of search
Labels focuses Search labels
Labels focuses Search labels
  • Links: PullRequestsColumn.browser.test.tsx (fails on 5940790129, passes on d90e60d9d6, 0/200 in 2x100; search-input.browser.test.tsx & check:changed pass).
  • Not shown: macOS/Windows desktop (shared renderer); mobile (unaffected); Issues filter submenus still focus item 1 on keyboard open (separate PR).
Tests, 2x100 stress loop, and check:changed
# Base 5940790129 (expected fail)
FAIL PullRequestsColumn.browser.test.tsx: toHaveFocus('Search authors') timed out (focused: Anyone)

# Head d90e60d9d6 (pass)
✓ PullRequestsColumn.browser.test.tsx (7 tests)
✓ search-input.browser.test.tsx (3 tests)
worker=1 DONE pass=100 fail=0 total=100
worker=2 DONE pass=100 fail=0 total=100

# vp run check:changed 5940790129e68dbbf947cc05910dd16f7eaab398
  pass  format 0.2s | lint 0.6s | knip 17.6s | typecheck 7.0s | test 8.7s | react compiler 0.8s

Generated with Gemini 4 Neon in T3 Code Nightly

… open

Wrap PullRequestAuthorFilter and PullRequestLabelFilter in Base UI's Menu.FilterProvider (filter=null), render MenuSearchInput through Menu.Input, and place each submenu's items in Menu.List so keyboard opens focus the search input instead of the first menu item. In MenuSearchInput, let unmodified ArrowLeft and ArrowRight propagate when the input is empty so Base UI can close submenus on ArrowLeft while keeping caret movement in typed text.
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Dec 1, 2026
@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Author and label filters now use Base UI menu primitives for search inputs and choices. Empty search inputs allow unmodified Left and Right arrow keys to propagate. Browser tests cover filter search, selection, and keyboard focus behavior.

Changes: Filter keyboard interactions

Layer / File(s) Summary
Filter search and keyboard flow
apps/web/src/components/pullRequest/PullRequestListFilters.tsx, apps/web/src/components/ui/menu.tsx, apps/web/src/components/pullRequest/PullRequestsColumn.browser.test.tsx
Author and label search use Base UI menu inputs and lists. Empty search inputs allow unmodified Left and Right arrows to propagate. Browser tests cover searching, selecting options, and focus recovery.

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to 70101

This change makes the Author and Labels filter search fields reachable by keyboard on the pull requests page. No concrete merge-blocking risk was identified, and the change is limited to the web UI.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the fix (keyboard focus on the PR Author and Labels filter search inputs when opened from the keyboard) and follows the conventional commit form. It matches the changeset: PullRequestL…
Description check Passed The description follows the template sections. Problem gives the bug, expected behavior, and reproduction steps (ArrowRight/Enter on Author or Labels). Change explains the fix across PullRequestListFi…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the fix (keyboard focus on the PR Author and Labels filter search inputs when opened from the keyboard) and follows the conventional commit form. It matches the changeset: PullRequestListFilters.tsx wraps the filters in Menu.FilterProvider and renders Menu.Input, the browser test covers the keyboard open and focus, and menu.tsx changes arrow-key propagation. It is specific and concise, and a teammate scanning history would understand the primary change.

Full details: Description check

Explanation

The description follows the template sections. Problem gives the bug, expected behavior, and reproduction steps (ArrowRight/Enter on Author or Labels). Change explains the fix across PullRequestListFilters.tsx and ui/menu.tsx. Scope states this is a web-only bug fix and links no issue, but explains why none is needed. Verification lists focused test results, a stress loop, check:changed output, before/after screenshots, and what was not checked. The template's agent-model line is present as a trailing note. Gaps are minor: the Scope section does not cite a maintainer request, and the bug-fix-without-issue justification is brief but present.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d90e60d and 701011b.

Files selected for processing: 1

  • apps/web/src/components/pullRequest/PullRequestsColumn.browser.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Dec 1, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

Environment: Scenario runner drove real web dev servers on both commits in Chromium, 1280×800, light theme. Each server used fresh isolated state and the same t3.project seed with a public pingdotgg/t3code GitHub origin; options came from the real GitHub integration. No mocked service or copied database.

Steps: Open Pull requests with State Open and Involvement All; wait for the real repository list. Focus Filters and press Enter, ArrowDown twice, then ArrowRight to Author; type j. Repeat with ArrowDown three times and Enter to Labels; type s. For each submenu, press ArrowLeft with text, reopen on a fresh page and press ArrowLeft while empty, then reopen, type the same query and select a matching option using ArrowDown and Enter.

Scenario: PR Author and Labels searches accept keyboard input when opened

Proven: the scenario fails on base f5689ae8ee and passes on head 701011bbf1.

Base f5689ae8ee Head 701011bbf1
Result ❌ failed
ASSERTION_FAILED: expected [{"name":"authors","focused":false,"value":"","caret":null,"returned":true,"selected":false},{"name":"labels","focused":false,"value":"","caret":null,"returned":true,"selected":true}] to equal [{"name":"authors","focused":true,"value":"j","caret":0,"returned":true,"selected":true},{"name":"labels","focused":true,"value":"s","caret":0,"returned":true,"selected":true}]
✅ passed
authors keyboard open Base f5689ae8ee: authors keyboard open Head 701011bbf1: authors keyboard open
authors typed j Base f5689ae8ee: authors typed j Head 701011bbf1: authors typed j
authors left with text Base f5689ae8ee: authors left with text Head 701011bbf1: authors left with text
authors left empty Base f5689ae8ee: authors left empty Head 701011bbf1: authors left empty
authors selected by keyboard Base f5689ae8ee: authors selected by keyboard Head 701011bbf1: authors selected by keyboard
labels keyboard open Base f5689ae8ee: labels keyboard open Head 701011bbf1: labels keyboard open
labels typed s Base f5689ae8ee: labels typed s Head 701011bbf1: labels typed s
labels left with text Base f5689ae8ee: labels left with text Head 701011bbf1: labels left with text
labels left empty Base f5689ae8ee: labels left empty Head 701011bbf1: labels left empty
labels selected by keyboard Base f5689ae8ee: labels selected by keyboard Head 701011bbf1: labels selected by keyboard
failure Base f5689ae8ee: failure
Before recording After recording
Keyboard flow Keyboard flow

Scenario source

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Dec 1, 2026
@juliusmarminge
juliusmarminge merged commit 70c9da7 into pingdotgg:main Dec 1, 2026
56 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Dec 1, 2026
imetn added a commit to imetn/t4code that referenced this pull request Dec 2, 2026
Surgically ports 62 upstream Web UI fixes from pingdotgg/t3code
(772e3d4..1e6e7d7) into apps/web and scripts/scenarios while
preserving all 31 locked T4 customizations, T4 branding, and
t4-overrides.css.

Also restores React Compiler compilation for Sidebar by moving the
default new Set(...) parameter inside settleLaunchGroup into the
function body so switching threads produces 0 unaffected row re-renders.

Ported (62 commits):
- 1a08049 (pingdotgg#46481): right-panel launcher keys blocked while context menu open
- 6bdd718 (pingdotgg#46489): Enter restores highlighted stashed prompt (scenario e2e; web code already absorbed)
- 347f551 (pingdotgg#46490): Escape closes open context menu before layer beneath it
- afa3003 (pingdotgg#46487): workflows page uses width of wide window
- a2ba869 (pingdotgg#46485): keep joined emoji whole in screen-reader announcements
- a8ee725 (pingdotgg#46493): holding stash shortcut keeps prompt saved (scenario e2e; web code already absorbed)
- 5048c80 (pingdotgg#46499): Mod+S moves edited queued reply to prompt stash
- 179e6c3 (pingdotgg#46506): holding stash delete shortcut removes one prompt (scenario e2e; web code already absorbed)
- c101437 (pingdotgg#44079): fold PR diff whose header was clicked
- 9b27e5a (pingdotgg#46562): second Mod+T keeps right-panel Add menu shortcuts working
- 62cf1fe (pingdotgg#46592): wait for dialog focus before opening context menu over it
- fda1c30 (pingdotgg#46579): resting on issue row prefetches detail
- 28f0c93 (pingdotgg#46593): slash-command description tooltip closes when modal opens
- 789784b (pingdotgg#46603): keep selected tab in Workflows links
- 2bc37d9 (pingdotgg#46597): / and Mod+F in Settings ignore open context menu
- b21923b (pingdotgg#46640): effort shortcut closes nested Permissions menu in model picker
- a5a39fa (pingdotgg#46641): inline thread details card grows with interface font size
- 36983d6 (pingdotgg#46644): workflow runs open in resizable right panel
- 2ad902f (pingdotgg#46691): Mod+F on PRs page ignores open menu
- 97d727c (pingdotgg#46699): Link pull request dialog closes when leaving thread
- 7a9d213 (pingdotgg#46729): refuse saving edit to deleted project script action
- bdda9ce (pingdotgg#46745): settling open delegated task opens next thread
- 3763606 (pingdotgg#46760): command menu description tooltip closes on composer focus loss
- 00eae4b (pingdotgg#46764): reopen workflow run on first click
- 19094fd (pingdotgg#46765): boring sidebar folder rows offer snooze again
- dec756c (pingdotgg#46766): reopen last workflow run after hiding panel
- 33ce571 (pingdotgg#46777): keep workflow runs open behind tab menus
- a989ee8 (pingdotgg#46779): restore focus after closing workflow run
- 5c42b2e (pingdotgg#46786): reopen closed workflow run tabs
- caec30f (pingdotgg#46792): cancel tab drags when switching threads
- 27cf2cf (pingdotgg#46794): disable empty panel shortcuts as it closes
- d65936e (pingdotgg#46791): reveal all side panel tabs when they fit
- a9daa0b (pingdotgg#46781): right-panel shortcuts ignore presses while menu/dialog open
- 35b6c5f (pingdotgg#46801): dismissing PR checkout toast cancels handoff
- e9da1b0 (pingdotgg#46818): boring sidebar folder row actions keep height and clicks
- 9feac49 (pingdotgg#46855): long PR search preserves grapheme clusters
- acef160 (pingdotgg#46849): find shared voice dictionary by Japanese label
- 19da14d (pingdotgg#46796): scrolled right panel tabs no longer block chat titlebar drag
- 506bc36 (pingdotgg#46853): close guest share and handoff dialogs when leaving thread
- b4fd7ba (pingdotgg#46879): let Escape and app shortcuts pass through terminal font preview
- f5689ae (pingdotgg#46835): long history load errors wrap without timeline horizontal overflow
- 6b64b0c (pingdotgg#46890): focus command dialog popup when search input disabled
- 70c9da7 (pingdotgg#46900): focus PR Author/Labels filter search inputs on keyboard open
- 891bf1a (pingdotgg#46924): late slash results no longer open tooltip after focus leaves
- 80f0f8a (pingdotgg#46930): copying failed message keeps its images
- e9ca942 (pingdotgg#46659): show workflow question kinds only in filter
- aa8c7c7 (pingdotgg#46941): queued message moves to stash only once removed
- 3ea13b6 (pingdotgg#46940): editing answer while image prepares cancels held submit
- a143526 (pingdotgg#46970): pasting copied file over reattach marker no longer reports failure
- b33c330 (pingdotgg#47011): stub addComposerFilesToDraft with new return shape in test
- a0fb9d1 (pingdotgg#46974): Issues Labels/Assignee filters focus search on keyboard open
- cb525f4 (pingdotgg#47029): clicking anywhere on terminal or panel tab activates it
- 498a3b6 (pingdotgg#47022): syncing messages line no longer shifts whole chat
- e903c85 (pingdotgg#47046): pasted messages with thread link keep picture
- 6a13142 (pingdotgg#47013): limit style invalidation during right-panel resize
- cd8961e (pingdotgg#47078): pasting copied file no longer takes preparing screenshot slot
- 8d0fb4b (pingdotgg#47100): stop showing previous Usage period as loading after failure
- 515b8c9 (pingdotgg#47114): Tab from Permissions menu keeps focus inside model picker
- a681dd5 (pingdotgg#47125): middle-clicking file link no longer opens broken tab
- bbde8dc (pingdotgg#44842): use plus icon for project new-thread buttons
- 59af88f (pingdotgg#47105): switching threads no longer re-renders unaffected sidebar rows
- 1e6e7d7 (pingdotgg#47080): Reopen Closed Tab skips workflow runs removed from history

Already absorbed in HEAD (3 commits):
- 20a0e5f (pingdotgg#46927), a684090 (pingdotgg#47026), c557dab (pingdotgg#47076)

Skipped cleanly (3 commits):
- 70224ca (pingdotgg#46712): depends on unported ui/open-popups.tsx (pingdotgg#45341)
- cf475c4 (pingdotgg#47034): depends on unported ui/open-popups.tsx (pingdotgg#45341)
- be3cc6c (pingdotgg#47145): depends on unported fitsWithAllowance/workGroupOverflowAllowance in TimelineWorkGroupRows.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants