Repository navigation
Conversation
|
This PR changes the test suite by +2 test cases (browser +1, unit +1, server 0). New browser test files: Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EvidenceChrome 151 on Linux; light theme; identical synthetic PR data and viewport on both commits. Open the PR detail, maximize it, press Ctrl+F from Restore panel size and then from description text. Type The scenario runner exited 0: reproduced on base and passed on head. Base prevents both maximized shortcuts; head opens native browser find from both. Restoring the panel preserves list-search focus.
Scenario and synthetic fixture · Native-browser runner configuration Head regression checks also passed: Ctrl+F focuses Files search in both a draft and an existing thread. Not shown:
|








Problem
With a pull request's detail panel maximized, pressing Cmd/Ctrl+F in a web browser did nothing, whether focus was on the panel's controls or inside the pull request. Two handlers took the key:
preventDefault()on Cmd/Ctrl+F and then tried to focus a search field that can't be reached.mod+fresolves topreview.find, and the chat-route command claimed the key before checking whether anything would answer it. On the Pull requests page there is no thread, so the panel find action never fires, but the browser's find was blocked anyway.Fix
PullRequestsColumnonly listens for Cmd/Ctrl+F while the list is shown. The listener comes back when the panel is restored.preview.findleaves the key unclaimed when the route can't run panel find: there is no route environment, or the viewer lacks preview access. Where it can run, nothing changes: the Files search and the in-app browser still answer Cmd/Ctrl+F from the right panel. The zoom keys got a similar gate in fix(web): zoom shortcuts zoom the app from the PR, Diff and Files panes #39207; find can't use the same "browser focused" check, because the Files panel also answers find from anywhere in the right panel.Side effects, both in the same direction. With the panel not maximized and focus in the pull request, Cmd/Ctrl+F now focuses the list search, the same as with focus elsewhere on the page. On a thread where the viewer lacks preview access, the browser's own find now opens instead of nothing.
Desktop has no find bar for the app window, so there the key is simply no longer swallowed. Mobile has no equivalent shortcut.
Testing
An AI agent ran each check below:
PullRequestsColumn.browser.test.tsxmounts the list unmaximized, maximizes it, then restores it. It fails onmain, and also fails withmaximizedAwaydropped from the effect deps. It passes here.chatRouteCommands.test.ts:preview.findon/pull-requestsreturns unclaimed and dispatches nothing. Fails onmain, passes here; the existing draft-thread dispatch case is unchanged.vp run check:changedpasses.mainboth presses were consumed, by the list and bypreview.find. Here, neither was. On a draft thread with Files open, Ctrl+F from the panel's tab strip still focused the Files search.Not checked: the desktop in-app browser's find. That path needs a thread route with preview access, and the code for it is unchanged.
Generated with Gemini 4 Neon in T3 Code Nightly