You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): Cmd/Ctrl+F opens the browser find bar while a pull request is maximized - #41852
With a pull request's detail panel maximized, Cmd/Ctrl+F does nothing in a web browser. Two handlers claim the key with nothing to answer it:
The pull request list stays mounted behind the maximized panel (inert, zero width). Its window keydown listener still calls preventDefault() on Cmd/Ctrl+F and focuses a search field that can't be reached.
With focus in the right panel, mod+f resolves to preview.find. The chat-route command claims the key before checking whether panel find can run. On the Pull requests page there is no thread, so nothing opens and the browser's find is blocked.
Change
PullRequestsColumn skips its Cmd/Ctrl+F listener while maximizedAway, and adds it back when the panel is restored.
preview.find leaves the key unclaimed unless a route environment can operate the preview. When it can, it claims the key and dispatches find as before, so the Files search and in-app browser still answer Cmd/Ctrl+F.
Two side effects, both toward the browser default: with the panel not maximized and focus in the pull request, Cmd/Ctrl+F now focuses the list search like it does from the rest of the page; on a thread where the viewer lacks preview access, the browser's find opens instead of nothing. The desktop app's own window has no find bar (desktop find-in-page exists only for preview tabs), so on desktop the key is simply no longer swallowed. Mobile has no equivalent shortcut.
Scope
A small fix for an obvious bug, so no issue. It re-lands #41622 by @only21mil, which closed without a comment after the proof pipeline reproduced it on base 1002934541 and passed on head 1cc2ed8768 in Linux Chrome 151 (evidence comment). The code and tests are that head's. The commit credits only21mil and Julius with Co-authored-by. New here: a scenario for vp run scenarios:prove, and a Cmd+F check on macOS at the key-event level, which the evidence comment listed as not shown.
Verification
PullRequestsColumn.browser.test.tsx mounts the list, maximizes the panel, then restores it. It fails on 364ca47868 (defaultPrevented is true while maximized) and passes here.
chatRouteCommands.test.ts: preview.find on /pull-requests returns unclaimed and dispatches nothing. It fails on base (undefined instead of false) and passes here. The existing draft-thread preview.find dispatch case still passes.
vp run scenarios:prove scripts/scenarios/maximized-pull-request-leaves-browser-find.e2e.ts --base 364ca47868 exits 0, run on macOS. The scenario stubs one synthetic GitHub pull request, opens it, maximizes the panel, clicks the description, presses ControlOrMeta+f, and asserts the page left the key unclaimed. A one-off probe on the same run confirmed the key arrives as Cmd+F (metaKey: true, ctrlKey: false).
In T3 Code's built-in browser on macOS, against a dev server with empty state and the same synthetic pull request: open it, maximize, click the description, press Cmd+F. On head the keydown arrives with metaKey: true and defaultPrevented: false. With the two source files from 364ca47868, the same press is defaultPrevented: true.
Scenario: Cmd/Ctrl+F reaches the browser while a pull request is maximized
Proven: the scenario fails on base 364ca47868 and passes on head 8b5acf9215.
Base 364ca47868
Head 8b5acf9215
Result
❌ failed ASSERTION_FAILED: The app leaves Cmd/Ctrl+F to the browser's find bar: expected true to be false
✅ passed
The scenario's capture is the same on both commits, because headless Chromium draws no find bar. It shows the maximized state the key is pressed in:
For native before/after images of the find bar, see the evidence comment on #41622 (Linux Chrome, same code).
Not checked: the find bar itself on macOS. Both checks above send the key through a driver, and a driver-sent key never opens browser chrome, so they show the page leaves Cmd+F unclaimed without showing the bar open. Desktop is not claimed beyond "no longer swallowed".
…is maximized
The hidden pull request list and the preview.find command both claimed the key with nothing to answer it.
Co-authored-by: only21mil <263261067+only21mil@users.noreply.github.com>
Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
This PR changes the test suite by +2 test cases (browser +1, unit +1, server 0).
New browser test files: apps/web/src/components/pullRequest/PullRequestsColumn.browser.test.tsx.
Each browser test file costs CI seconds of module loading before its first test runs; a unit test costs milliseconds.
Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing.
Reviewing files that changed from the base of the PR and between 8b5acf9 and 74e1b2f.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
Cmd/Ctrl+F handling now leaves the browser shortcut unclaimed when pull-request details are maximized or preview find is unavailable on the current route. Tests cover route-level command eligibility, component behavior, and the maximized pull-request browser flow.
Changes: Browser Find Shortcut
Layer / File(s)
Summary
Gate preview find by route and permission apps/web/src/shortcuts/chatRouteCommands.ts, apps/web/src/shortcuts/chatRouteCommands.test.ts
preview.find returns without claiming the key when route or preview-operation permission checks fail. A test covers the non-thread chat route.
Leave browser find available when maximized apps/web/src/components/pullRequest/PullRequestsColumn.tsx, apps/web/src/components/pullRequest/PullRequestsColumn.browser.test.tsx, scripts/scenarios/maximized-pull-request-leaves-browser-find.e2e.ts
The component skips registering its find listener while maximized and reruns the effect when that state changes. Browser tests check shortcut handling when the detail panel is maximized and when it is not.
pingdotgg/t3code#41622: Addresses the same Cmd/Ctrl+F behavior with overlapping changes to the pull-request listener and preview.find command.
Suggested labels:bugfix
Suggested reviewers:macroscopeapp
Merge Risk: Minimal · previous review 8b5ac
Cmd/Ctrl+F now reaches the browser find bar when a pull request is maximized or when preview find is unavailable on the route. The change is narrow, has tests for both behaviors, and no concrete merge-blocking risk was identified.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: Cmd/Ctrl+F opens the browser find bar while a pull request is maximized. The raw summary shows the changes to PullRequestsColumn and preview.find that address this. It…
Description check
The description follows the template with Problem, Change, Scope, and Verification sections, and each is filled in. The Problem section gives the bug and reproduction context. The Change section names…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: Cmd/Ctrl+F opens the browser find bar while a pull request is maximized. The raw summary shows the changes to PullRequestsColumn and preview.find that address this. It follows the conventional commit form and is specific.
Full details: Description check
Explanation
The description follows the template with Problem, Change, Scope, and Verification sections, and each is filled in. The Problem section gives the bug and reproduction context. The Change section names both handlers. Scope explains why no issue is linked and states the prior PR it re-lands. Verification lists focused tests, the check run, the scenario proof, and the limits of what was checked on macOS and desktop. The template's optional-looking guidance about screenshots is partly met: a maximized-state capture is included, and native find-bar before/after images are referenced via an external evidence comment. The description is complete enough to pass.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
The unit and browser tests already fail without the fix; the scenario
replaced about fifteen pull request RPC responses by patching WebSocket.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Native browser find chrome is not rendered by headless Chromium; verified the uncancelled event, unchanged focus and empty selection instead, matching the triage evidence criterion.
macOS Cmd+F was not exercised; the real-app run used Ctrl+F on Linux.
Supported thread preview find was not exercised; this scenario covered maximized PR details and restored list search.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:S10-29 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
With a pull request's detail panel maximized, Cmd/Ctrl+F does nothing in a web browser. Two handlers claim the key with nothing to answer it:
preventDefault()on Cmd/Ctrl+F and focuses a search field that can't be reached.mod+fresolves topreview.find. The chat-route command claims the key before checking whether panel find can run. On the Pull requests page there is no thread, so nothing opens and the browser's find is blocked.Change
PullRequestsColumnskips its Cmd/Ctrl+F listener whilemaximizedAway, and adds it back when the panel is restored.preview.findleaves the key unclaimed unless a route environment can operate the preview. When it can, it claims the key and dispatches find as before, so the Files search and in-app browser still answer Cmd/Ctrl+F.Two side effects, both toward the browser default: with the panel not maximized and focus in the pull request, Cmd/Ctrl+F now focuses the list search like it does from the rest of the page; on a thread where the viewer lacks preview access, the browser's find opens instead of nothing. The desktop app's own window has no find bar (desktop find-in-page exists only for preview tabs), so on desktop the key is simply no longer swallowed. Mobile has no equivalent shortcut.
Scope
A small fix for an obvious bug, so no issue. It re-lands #41622 by @only21mil, which closed without a comment after the proof pipeline reproduced it on base
1002934541and passed on head1cc2ed8768in Linux Chrome 151 (evidence comment). The code and tests are that head's. The commit credits only21mil and Julius withCo-authored-by. New here: a scenario forvp run scenarios:prove, and a Cmd+F check on macOS at the key-event level, which the evidence comment listed as not shown.Verification
PullRequestsColumn.browser.test.tsxmounts the list, maximizes the panel, then restores it. It fails on364ca47868(defaultPreventedistruewhile maximized) and passes here.chatRouteCommands.test.ts:preview.findon/pull-requestsreturns unclaimed and dispatches nothing. It fails on base (undefinedinstead offalse) and passes here. The existing draft-threadpreview.finddispatch case still passes.vp run check:changed upstream/mainpasses (format, lint, knip, typecheck, tests, React Compiler).vp run scenarios:prove scripts/scenarios/maximized-pull-request-leaves-browser-find.e2e.ts --base 364ca47868exits 0, run on macOS. The scenario stubs one synthetic GitHub pull request, opens it, maximizes the panel, clicks the description, pressesControlOrMeta+f, and asserts the page left the key unclaimed. A one-off probe on the same run confirmed the key arrives as Cmd+F (metaKey: true,ctrlKey: false).metaKey: trueanddefaultPrevented: false. With the two source files from364ca47868, the same press isdefaultPrevented: true.Scenario: Cmd/Ctrl+F reaches the browser while a pull request is maximized
Proven: the scenario fails on base
364ca47868and passes on head8b5acf9215.364ca478688b5acf9215ASSERTION_FAILED: The app leaves Cmd/Ctrl+F to the browser's find bar: expected true to be false
The scenario's capture is the same on both commits, because headless Chromium draws no find bar. It shows the maximized state the key is pressed in:
For native before/after images of the find bar, see the evidence comment on #41622 (Linux Chrome, same code).
Not checked: the find bar itself on macOS. Both checks above send the key through a driver, and a driver-sent key never opens browser chrome, so they show the page leaves Cmd+F unclaimed without showing the bar open. Desktop is not claimed beyond "no longer swallowed".
Claude Opus 5.5 via T3 Code