Repository navigation
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughBrowser guest mouse-down and key-down events now emit Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk is established by the supplied evidence. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Main-process input observation:
setupGuestShortcutForwardingnow reports guest ownership via a newbefore-mouse-event(mouseDownonly) listener and on everybefore-input-eventkeyDown, emittingui:browserGuestInteractionwith the page id before shortcut forwarding. Listener is removed on cleanup. - Preload subscription:
onBrowserGuestInteractionadmits only a non-empty string payload and returns an exactremoveListenerunsubscribe; typed onUiCommandEventApi, no-op on the web build. - Renderer focus resolution:
BrowserPaneOverlayLayersubscribes only while its worktree is active and, readinguseAppStore.getState()at event time, focuses the owning group only when the worktree is active, the page is neither automation-visible nor mobile-driven, it maps to the group's active browser tab, and that group is not already focused. - Regression tests: new main/preload unit tests assert exact send sequences and payload admission;
BrowserPaneOverlayLayertests pin ignore rules, consecutive clicks, and subscription lifecycle; the e2e spec drives real ElectronsendInputEventinto two served guests and asserts the focused split plus real page mousedown delivery, then that Ctrl+Tab lands on the clicked split.
I traced the full path end to end: registration passes browserPageId ?? legacyBrowserTabId, which the renderer's (tab.activePageId ?? tab.id) lookup matches for both shapes, and RecentTabSwitcher reads getState() fresh, so the interaction-before-shortcut ordering wins the race without a React re-render. Floating-panel guests carry the floating workspace worktree id and are excluded by the activeWorktreeId gate; offscreen guests never install this forwarding. No blocking or actionable concerns.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: c179d235-c250-401a-a19b-304bfda10ab9
📒 Files selected for processing (12)
src/main/browser/browser-guest-shortcut-forwarding.test.tssrc/main/browser/browser-manager-guest-shortcuts.test.tssrc/preload/api/ui-bridge-tab-and-browser-commands.tssrc/preload/api/ui-command-event-api.tssrc/renderer/src/components/browser-pane/assemble-chrome/BrowserPaneOverlayLayer.test.tsxsrc/renderer/src/components/browser-pane/assemble-chrome/browser-deferred-lifecycle.test.tsxsrc/renderer/src/components/browser-pane/host-guest/browser-guest-retention-site-census.test.tstests/e2e/browser-floating-shortcut-scope.spec.tstests/e2e/browser-split-grab-shortcut.spec.tstests/e2e/browser-split-navigation-shortcuts.spec.tstests/e2e/browser-split-shortcuts.spec.tstests/e2e/helpers/browser-split-fixture.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Merged latest
mainand reconciled split-focus coverage: the branch absorbed main'sBrowserPageCommandTargetsignatures for the address-bar/reload/history callbacks (from #22340) and the sharedtests/e2e/helpers/browser-split-fixture.ts; the spec now callscreateBrowserSplit(page, { first, second }). - Added a remote-viewer regression test:
BrowserPaneOverlayLayer.test.tsxnow proves local split focus still fires while a remote viewer retains the page for painting, pinning that remote viewing is not a focus gate. - Classified input-ownership reads in the retention census: the overlay's
isBrowserAutomationVisible/isBrowserPageMobileDrivenreads are whitelisted as non-retention per file and symbol, while the file stays aRETENTION_SITESconsumer ofuseBrowserGuestPaintRetention. - Stubbed the new subscription in the deferred-lifecycle harness:
browser-deferred-lifecycle.test.tsxgains aui.onBrowserGuestInteractionno-op so the overlay effect can mount. - Pinned English in four browser shortcut E2E specs:
uiLanguage: 'en'inbeforeEachmakes the English-label selectors deterministic across hosts.
The production path is unchanged since the reviewed 2da8dd4; the delta is the main merge and test reconciliation only. I ran the seven touched unit-test files in the merged state (88 passed).
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Guest-input E2E now dispatches over CDP: the split-focus regression in
tests/e2e/browser-split-shortcuts.spec.tsattaches to each guest's own debugger and sendsInput.dispatchMouseEvent(press/release) andInput.dispatchKeyEvent(rawCtrl+Tab) instead ofsendInputEvent, so it no longer depends on the containingBrowserWindowbeing shown — the concern that prompted this change (headlessORCA_E2E_HEADLESS=1suppressing native focus). - Preserves pre-existing debugger attachments: the helper attaches only when
debugger.isAttached()is false and detaches only an attachment it created, so automation/screencast sessions on the same guest are left intact and the repo's hidden-window launch policy is respected.
No production code changed in this delta; the previously reviewed main/preload/renderer path is untouched.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Thanks for the PR! Main already does this through #31859 (1b0e56e). browser-guest-mouse-press.ts sends ui:browserPagePointerDown when a guest page gets a mouseDown. BrowserPaneOverlayLayer then resolves the page's owning tab and calls focusOwningGroup, so #22144 is closed. Closing — please reopen if there's a remaining case main doesn't cover. |

ELI5
Clicking inside a browser page now makes that split active, so Ctrl+Tab switches tabs in the split you clicked.
What Changed
Previously, clicking page content could leave another split active and send Ctrl+Tab there. The main process now forwards the registered browser page ID on mouse-down and before forwarding keyboard shortcuts. The renderer resolves that page's visible tab and owning split from current state.
Inactive workspaces, background tabs, automation-controlled pages, and mobile-driven pages cannot take desktop split focus through this subscription. Listeners are removed on cleanup. Regression tests cover event order, consecutive interactions, ignored pages, and cleanup.
Why
Browser page content runs in a separate Electron guest, so its clicks do not bubble into the surrounding pane. Window blur also misses transitions between guests. Observing guest input identifies the source directly and updates split ownership before shortcut handling.
Linked Issue
Fixes #22144
Visual Proof
Same macOS native-input sequence in both captures: focus B's address bar, click inside A's page, then press Ctrl+Tab. Each split starts on Tab 1.
Before: B incorrectly switches to Tab 2; A stays on Tab 1. This is a controlled reproduction with only the new ownership notification disabled in the built app, not a separate upstream build.
After: A switches to Tab 2; B stays on Tab 1. Captured from the committed fix.
Testing
Agent-run verification on macOS with Node 24.21.0, including the review follow-up in
c721efd837:ORCA_BACKGROUND_LAUNCH=1, hidden windows, and a freshly rebuilt Electron E2E bundle. This covers split clicks/Ctrl+Tab, Find, navigation/reload/zoom/address-bar shortcuts, element selection, and floating-browser scope.sendInputEvent, avoiding its native-window-focus requirement. Existing debugger attachments are preserved. A temporary negative control that removed the production mouse observer failed at the first split-focus assertion, confirming the test exercises the production path.pnpm typecheck: passed. The changed-code quality gate against17ffbf3b31897b55078062f399510a1cd62205d3passed with zero new findings. Commit hooks also passed.pnpm build: desktop, relay, CLI, renderer, projected web, mobile web, and bundled-skill checks passed after installing mobile dependencies with its frozen lockfile. The final native computer helper step failed: Swift 6.4 built under.build/out/Products/Release, while the unchanged script expects per-triple.build/<triple>/releaseinputs forlipo.pnpm lint: initially passed without mobile dependencies; after the required mobile install, its native-code-quality stage reports nine circular-import findings in unchanged mobile files. The full lint gate is not green.pnpm test: 87,524 passed, 90 failed, 679 skipped, 1 expected failure; 9,268 files passed and 23 failed. The run exited 1 and also reported one worker error after I stopped a file-descriptor test worker blocked inlsoffor over 12 minutes. A second stalledlsofprobe was stopped as well. This was not a clean completed pass; remaining failures include real-shell/agent integration, host process inspection, and runtime tests.CODEX_HOME,ORCA_CODEX_HOME, andORCA_CODEX_LAUNCH_PREFLIGHTonly from the child test environment. A cloud-import suite's 3 tests passed after installing the separate cloud workspace and building its relay-contract/postgres-schema packages. These reruns do not turn the original full run green.pnpm typecheck:e2e: failed with 220 diagnostics after dependency setup, none namingbrowser-split-shortcuts.spec.ts; this is separate from the passing standardpnpm typecheckcommand.The original implementation's scoped main/preload/renderer tests passed previously (2,799 passed, 2 skipped). The earlier native mouse/keyboard check and screenshots are from
80a97e510447; they were agent-run, not human manual testing. No foreground/native-focus rerun was performed on the user's desktop.Reviewer reproduction: open two browser splits with two tabs each, focus B's address bar, click page content in A, and press Ctrl+Tab. Only A should switch tabs. Repeat between browser splits and check that Find still opens in the intended pane.
AI Disclosure
OpenAI Codex (GPT-6) assisted with implementation and verification. Claude Opus 5 independently reviewed the full diff read-only.
Review
Opus 5 returned APPROVE with no blocking findings on the earlier implementation; its optional suggestion was to reduce duplicated test stubs. The latest main integration was self-reviewed and verified with the checks above; it has not had another Opus review.
Agent skill upstream boundary
Notes
macOS was exercised. Windows, Linux, and live SSH/mobile end-to-end behavior were not run locally. The change uses existing cross-platform Electron events, introduces no remote wire-format change, and does not require a Git worktree. Web clients expose a no-op subscription. While automation or mobile owns a page, this subscription deliberately ignores its interactions, including local clicks.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)The unchecked final item is intentional: full-repository lint/test and the final native build are not green locally; see the explicit results above.