Skip to content

feat(browser): make Orca shortcuts, split focus and mouse back/forward buttons work inside pages - #31859

Merged
AmoabaKelvin merged 1 commit into
mainfrom
browser-page-focus-and-navigation
Oct 25, 2026
Merged

AmoabaKelvin merged 1 commit into
mainfrom
browser-page-focus-and-navigation

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 20 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​308 $\color{#cf222e}{\Huge{\mathbf{−}}}$​231 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​77
Prod 30 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​309 $\color{#cf222e}{\Huge{\mathbf{−}}}$​339 $\color{#cf222e}{\Huge{\mathbf{−}}}$​30

ELI5

When you click into a web page in Orca's browser, the page takes the keyboard and Orca loses track of where you are. Cmd+Shift+T did nothing, Ctrl+Tab switched tabs in the wrong split, switching to a browser tab didn't let you type into it, and the mouse back/forward buttons did nothing. Now a page behaves like the rest of Orca, and like Chrome.

What Changed

Keys with a page focused: one rule. With a page focused, Orca takes its tab shortcuts (every tabs-scope keybinding: new/close/reopen/close-all/switch/new agent tab), the browser commands it already took (find, reload, back/forward, address bar), and the app actions it already takes over a focused terminal (palette, quick open, workspaces, history, zoom). The page keeps everything else: text editing, its own shortcuts, and Orca's panel toggles like Mod+B (bold in web editors) and Mod+Shift+Up/Down (text selection).

  • Before: browser-guest-shortcut-dispatch.ts kept a hand-written list of tab actions, plus seven guest-only IPC channels whose renderer handlers had drifted from the real ones. That list had missed reopen-closed, close-all and new-agent.
  • Now: one last-position branch claims any tabs-scope chord and sends it as one ui:browserPageTabShortcut. The renderer replays it through the app keyboard router, so it runs the same owners as a key pressed in Orca's own UI, floating panel included. The seven channels (newTerminalTab, newBrowserTab, newMarkdownTab, newSimulatorTab, switchTab, switchTabAcrossAllTypes, switchTerminalTab) and their renderer bridges are deleted.

Clicking a page makes its split active (#22144). A press inside a page never reaches the embedder's DOM (the webview focus event fires unreliably and never as focusin), so main now reports each press from the guest's before-mouse-event (ui:browserPagePointerDown) and the overlay layer focuses that page's group. Ctrl+Tab, Cmd+W and the new-tab shortcuts then act on the split you're in.

Switching to a browser tab focuses the page (#20533). The once-per-activation rule that only client-hosted panes had moves into the shared useBrowserPageChromeFocus, so local, client-hosted and streamed pages all get it. It only fires when the page's split is the focused one, a new blank tab still lands in the address bar, a tab drag defers it, a phone-driven page is left alone, and a late-attaching guest never takes focus the user has since moved.

Mouse back/forward buttons navigate the page under the pointer.

  • Side buttons: main reads button: 'back' | 'forward' from the guest's before-mouse-event (Electron reports these at runtime though its typing doesn't list them) and sends the existing ui:browserHistoryNavigate on release. Streamed pages map DOM buttons 3/4 to the remote back/forward RPC and claim the press so the paired web client's own browser doesn't also go back.
  • Every Input.* CDP command an agent or a remote viewer sends now goes through sendGuestCdpCommand marked as agent input, so agent clicks can't move the desktop user's split or history.

Why

The guest dispatch was a second, incomplete copy of the renderer's tab-shortcut owner. Making the rule "tab-scope keybindings go to Orca" and replaying them into the real owner fixes the whole class at once, including future tab actions and user-bound agent shortcuts, and removes code.

Design

Two blind design-challenge rounds before building; three Codex review rounds after.

Chosen

  • Keyboard rule keyed off the keybinding registry's scope, replayed through the app keyboard router (not one IPC per shortcut, not a synthetic DOM event on document.activeElement).
  • Split activation from main's press signal. I first used a document capture focus listener on the webview; it passed unit tests but failed in the live app, where the embedder often gets no focus event for a click into a page.
  • Back/forward as browser behaviour over pages only, like Chrome/Arc.

Ruled out

Open questions for Kelvin

Linked Issue

Fixes #22144
Fixes #20533
Fixes #25633

Visual Proof

Hidden dev build driven over CDP. Keys go through webview.sendInputEvent (main's real before-input-event path), and side buttons are CDP mouse events on the guest (main's real before-mouse-event). BEFORE for flow 4 is current origin/main; the captions read live store/DOM state.

1. Click into a page in the right split, then Ctrl+Tab

Before After
before-1-split-click.mp4
after-1-split-click.mp4

Dark theme: https://github.com/user-attachments/assets/2f71caf2-5a78-467c-862e-3060a44a0c76

2. Cmd+W then Cmd+Shift+T from inside a page

Before After
before-2-reopen-closed.mp4
after-2-reopen-closed.mp4

3. Switch to a browser tab from the tab strip, then type

Before After
before-3-tab-strip-focus.mp4
after-3-tab-strip-focus.mp4

4. Mouse back/forward buttons over a page

Before After
before-4-mouse-buttons.mp4
after-4-mouse-buttons.mp4

Testing

  • I manually tested these changes locally (macOS, hidden dev build; flows above, plus: a page activated in an unfocused split doesn't take the keyboard)
  • Automated tests added/updated, or explained why not below

Focused tests cover: tab chords replayed by the guest (incl. Cmd+Shift+T and double-tap bindings) and editing chords left to the page; press → split activation; side buttons on release and agent presses ignored; agent Input.* marked at the CDP gate; activation focus, its split/lock/late-guest guards; streamed-page side buttons. Tests for the seven deleted channels were updated or removed with them. Not tested here: Windows/Linux (CI), a real trackpad, a real Logitech mouse.

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Platforms: the rule is key-agnostic (Mod resolves per platform). Side buttons use Chromium's back/forward buttons on all three OSes.
  • Remote/SSH: client-hosted pages share the guest path; streamed pages handle side buttons in the pane. No runtime RPC changed.
  • Mixed versions: only main↔renderer IPC changed, and those ship together; the web client's stubs are updated.
  • Mobile: the phone browser has no splits or keyboard shortcuts. Parity there would be a back gesture on the phone's streamed page, which is out of scope here. A phone driving a desktop page now keeps the desktop keyboard off it.
  • Siblings: link-opening focus and address-bar Escape are left to browser-link-opening and browser-history-controls.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@AmoabaKelvin
AmoabaKelvin marked this pull request as ready for review October 22, 2026 22:34
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
Walkthrough

The changes route browser tab shortcuts through replayed key events and remove older tab-creation and tab-switch IPC listeners. They add browser-page pointer-down and swipe events, including local and remote browser history navigation. They also update guest focus handling during pane activation and track agent-injected input.

Fixed issue severity: Medium

Priority: Normal

Severity of issue fixed: Medium

Merge Risk: Moderate · up to e4696

Correct the failing shortcut test before merging. Two narrower browser activation-focus retry concerns also remain open.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Out of Scope Changes check Warning The linked issues are [#22144] and [#20533]. The PR also adds mouse side-button and macOS swipe history navigation, streamed-page pointer navigation, and agent CDP input marking. These features are no… Remove the unrelated side-button, swipe, streamed-page navigation, and agent-input changes, or move them to a separate pull request with matching linked requirements. Limit this pull request's shortcut changes to the behavior needed for [#2…
Docstring Coverage Warning Docstring coverage is 45.95% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 37 functions across 49 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Linked Issues check Passed [#22144] Main forwards guest mouse presses as ui:browserPagePointerDown. BrowserPaneOverlayLayer resolves the page owner and focuses its owning group. The change includes a different-split test. […
Title check Passed The title clearly summarizes the main changes: page-aware Orca shortcuts, split focus, and mouse back/forward navigation.
Description check Passed The pull request description is complete and follows the repository template. It explains the user impact, implementation, rationale, linked issues, visual proof, testing scope, platform limitations, …
Full details: Linked Issues check

Explanation

[#22144] Main forwards guest mouse presses as ui:browserPagePointerDown. BrowserPaneOverlayLayer resolves the page owner and focuses its owning group. The change includes a different-split test. [#20533] useBrowserPageChromeFocus focuses the active guest for the focused split. It covers local, client-hosted, and streamed pages. Guards preserve address-bar focus and skip locked input, drag passthrough, unfocused splits, and stale late guests. Focus tests cover these cases.

Full details: Description check

Explanation

The pull request description is complete and follows the repository template. It explains the user impact, implementation, rationale, linked issues, visual proof, testing scope, platform limitations, and checklist status. The lint, typecheck, test, and build checklist remains unchecked, and the Review and AI Disclosure sections are empty, but these omissions do not make the description incomplete because the testing details and AI disclosure applicability are otherwise clear.

Full details: Out of Scope Changes check

Explanation

The linked issues are [#22144] and [#20533]. The PR also adds mouse side-button and macOS swipe history navigation, streamed-page pointer navigation, and agent CDP input marking. These features are not required by either issue. The PR also replaces seven guest-only tab IPC channels with general tabs-scope shortcut replay. [#22144] requires the clicked page's owning group to receive focus; it does not require forwarding all tab actions or deleting unrelated tab-creation and tab-switch channels.

Resolution

Remove the unrelated side-button, swipe, streamed-page navigation, and agent-input changes, or move them to a separate pull request with matching linked requirements. Limit this pull request's shortcut changes to the behavior needed for [#22144].

Full details: Docstring Coverage

Explanation

Docstring coverage is 45.95% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 37 functions across 49 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 25d052a5-b66e-4a1f-a94c-74c41e14952b
📥 Commits

Reviewing files that changed from the base of the PR and between 57ecdc2 and 4a59149.

📒 Files selected for processing: 54
  • src/main/browser/agent-input-injection.ts
  • src/main/browser/browser-guest-mouse-press.ts
  • src/main/browser/browser-guest-shortcut-dispatch.ts
  • src/main/browser/browser-guest-shortcut-forwarding.test.ts
  • src/main/browser/browser-guest-tab-shortcut.ts
  • src/main/browser/browser-guest-wheel-zoom-scroll.test.ts
  • src/main/browser/browser-guest-wheel-zoom.ts
  • src/main/browser/browser-manager-grab-shortcuts.test.ts
  • src/main/browser/browser-manager-guest-shortcuts.test.ts
  • src/main/browser/cdp-bridge-integration.test.ts
  • src/main/browser/guest-cdp-command.test.ts
  • src/main/browser/guest-cdp-command.ts
  • src/main/window/createMainWindow.ts
  • src/main/window/main-window-swipe-navigation.ts
  • src/preload/api/ui-bridge-state-and-menu-commands.ts
  • src/preload/api/ui-bridge-tab-and-browser-commands.ts
  • src/preload/api/ui-command-event-api.ts
  • src/renderer/src/components/browser-pane/ClientHostedBrowserPagePane.chrome-parity.test.tsx
  • src/renderer/src/components/browser-pane/ClientHostedBrowserPagePane.test.tsx
  • src/renderer/src/components/browser-pane/ClientHostedBrowserPagePane.tsx
  • src/renderer/src/components/browser-pane/assemble-chrome/BrowserPaneOverlayLayer.test.tsx
  • src/renderer/src/components/browser-pane/assemble-chrome/BrowserPaneOverlayLayer.tsx
  • src/renderer/src/components/browser-pane/assemble-chrome/browser-deferred-lifecycle.test.tsx
  • src/renderer/src/components/browser-pane/assemble-chrome/browser-page-pane.tsx
  • src/renderer/src/components/browser-pane/assemble-chrome/use-browser-page-chrome-focus.test.tsx
  • src/renderer/src/components/browser-pane/assemble-chrome/use-browser-page-chrome-focus.ts
  • src/renderer/src/components/browser-pane/client-hosted-browser-pane-test-rig.ts
  • src/renderer/src/components/browser-pane/host-guest/browser-page-screen-point.ts
  • src/renderer/src/components/browser-pane/host-guest/use-browser-page-keyboard-shortcuts.split.test.tsx
  • src/renderer/src/components/browser-pane/host-guest/use-browser-page-webview-shortcuts.ts
  • src/renderer/src/components/browser-pane/host-guest/use-client-hosted-guest-activation-focus.ts
  • src/renderer/src/components/browser-pane/host-guest/use-webview-drag-passthrough-active.ts
  • src/renderer/src/components/browser-pane/stream-remote/remote-browser-page-input-model.ts
  • src/renderer/src/components/browser-pane/stream-remote/remote-browser-page-pane.address-bar.test.tsx
  • src/renderer/src/components/browser-pane/stream-remote/remote-browser-page-pane.chrome-chords.test.tsx
  • src/renderer/src/components/browser-pane/stream-remote/remote-browser-page-pane.tsx
  • src/renderer/src/components/browser-pane/stream-remote/use-remote-browser-page-pointer-history.ts
  • src/renderer/src/hooks/ipc-events-agent-status-window-test-fixtures.ts
  • src/renderer/src/hooks/ipc-events-close-routing-test-harness.ts
  • src/renderer/src/hooks/ipc-events-terminal-create-scenario-types.ts
  • src/renderer/src/hooks/ipc-events-terminal-create-test-harness.ts
  • src/renderer/src/hooks/ipc-events-terminal-create-window-test-fixtures.ts
  • src/renderer/src/hooks/ipc-events/content-creation-ipc-bridge.ts
  • src/renderer/src/hooks/ipc-events/tab-lifecycle-ipc-bridge.test.ts
  • src/renderer/src/hooks/ipc-events/tab-lifecycle-ipc-bridge.ts
  • src/renderer/src/hooks/useIpcEvents-browser-tab-create.test.ts
  • src/renderer/src/hooks/useIpcEvents-cli-worktree-activation.test.ts
  • src/renderer/src/hooks/useIpcEvents-close-routing-browser-pages.test.ts
  • src/renderer/src/hooks/useIpcEvents-ssh-disconnect-cleanup.test.ts
  • src/renderer/src/hooks/useIpcEvents-terminal-create-surfacing.test.ts
  • src/renderer/src/hooks/useIpcEvents-updater-status.test.ts
  • src/renderer/src/lib/app-keyboard-router.ts
  • src/renderer/src/web/preload-api/web-ui-api.ts
  • src/shared/browser-page-command-target.ts
💤 Files with no reviewable changes: 5
  • src/renderer/src/hooks/ipc-events/tab-lifecycle-ipc-bridge.test.ts
  • src/preload/api/ui-bridge-state-and-menu-commands.ts
  • src/renderer/src/components/browser-pane/host-guest/use-client-hosted-guest-activation-focus.ts
  • src/renderer/src/hooks/ipc-events-terminal-create-scenario-types.ts
  • src/renderer/src/hooks/ipc-events/content-creation-ipc-bridge.ts

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

@AmoabaKelvin
AmoabaKelvin force-pushed the browser-page-focus-and-navigation branch 2 times, most recently from abd6aa3 to b0326b0 Compare October 23, 2026 16:25

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (3)

🟡 Minor · Forward repeated page-owned tab shortcuts. · browser-guest-shortcut-dispatch.ts:157-176

src/main/browser/browser-guest-shortcut-dispatch.ts:157-176
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Forward repeated page-owned tab shortcuts.

forwardGuestShortcutInput returns before matchesGuestTabShortcut when input.isAutoRepeat is true. For example, tab.previousRecent is a tab-scope shortcut bound to Ctrl+Tab, and the matcher does not exclude repeats. The initial Ctrl+Tab is forwarded, but held repeats are dropped.

The forwarded payload also has no repeat field. Carry the state through the payload and set KeyboardEvent.repeat in the renderer bridge.

Suggested fix
--- a/src/main/browser/browser-guest-shortcut-dispatch.ts
+++ b/src/main/browser/browser-guest-shortcut-dispatch.ts
@@
   if (input.isAutoRepeat) {
     if (
       (action?.type === 'dictationKeyDown' && shouldForwardDictationShortcut?.()) ||
       action?.type === 'deleteCurrentWorkspace'
     ) {
       event.preventDefault()
       return true
     }
-    return false
+    if (
+      !matchesGuestTabShortcut(
+        input,
+        process.platform,
+        keybindings,
+        isMobileEmulatorEnabled?.() ?? true
+      )
+    ) {
+      return false
+    }
   }
@@
-    const { key, code, alt, meta, control, shift, doubleTapModifier } = input
+    const { key, code, alt, meta, control, shift, doubleTapModifier, isAutoRepeat } = input
     const shortcut: BrowserPageTabShortcut = {
       key,
       code,
       alt,
       meta,
       control,
       shift,
-      doubleTapModifier
+      doubleTapModifier,
+      ...(isAutoRepeat !== undefined ? { isAutoRepeat } : {})
     }
--- a/src/shared/browser-page-command-target.ts
+++ b/src/shared/browser-page-command-target.ts
@@
 export type BrowserPageTabShortcut = Pick<
   WindowShortcutInput,
   'key' | 'code' | 'alt' | 'meta' | 'control' | 'shift' | 'doubleTapModifier'
-> 
+> & {
+  isAutoRepeat?: boolean
+}
--- a/src/renderer/src/hooks/ipc-events/tab-lifecycle-ipc-bridge.ts
+++ b/src/renderer/src/hooks/ipc-events/tab-lifecycle-ipc-bridge.ts
@@
             ctrlKey: input.control,
             shiftKey: input.shift,
+            repeat: input.isAutoRepeat ?? false,
             cancelable: true
🟡 Minor · Convert the cursor coordinates before subtracting… · browser-page-screen-point.ts:15-17

src/renderer/src/components/browser-pane/host-guest/browser-page-screen-point.ts:15-17
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Convert the cursor coordinates before subtracting window.screenX/Y.

screen.getCursorScreenPoint() returns DIP coordinates, while window.screenX/Y are CSS-pixel coordinates. At non-default UI zoom, the current subtraction mixes units before windowDipToCssPx converts the result. A swipe near the edge of an active webview can therefore miss the page and skip navigation.

🐛 Suggested fix
-    windowDipToCssPx(screenX - window.screenX),
-    windowDipToCssPx(screenY - window.screenY)
+    windowDipToCssPx(screenX) - window.screenX,
+    windowDipToCssPx(screenY) - window.screenY
🟡 Minor · Hit-test swipes against the streamed frame. · use-remote-browser-page-pointer-history.ts:39-41

src/renderer/src/components/browser-pane/stream-remote/use-remote-browser-page-pointer-history.ts:39-41
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Hit-test swipes against the streamed frame.

When the frame is letterboxed, the outer viewport also contains the gutter and overlays. isBrowserPageAtScreenPoint(viewport, ...) can therefore trigger remote navigation outside the streamed frame. Pass imageRef to the swipe hit test.

Suggested fix
diff --git a/src/renderer/src/components/browser-pane/stream-remote/use-remote-browser-page-pointer-history.ts b/src/renderer/src/components/browser-pane/stream-remote/use-remote-browser-page-pointer-history.ts
@@
   isActive,
   remoteViewportRef,
+  remoteFrameRef,
   runRemoteNavigation
 }: {
   isActive: boolean
   remoteViewportRef: RefObject<HTMLDivElement | null>
+  remoteFrameRef: RefObject<HTMLImageElement | null>
   runRemoteNavigation: (method: RemoteHistoryMethod) => Promise<void> | void
 }): void {
@@
     }
     const unsubscribeSwipe = window.api.ui.onBrowserPageSwipe(({ direction, screenX, screenY }) => {
-      if (isBrowserPageAtScreenPoint(viewport, screenX, screenY)) {
+      const frame = remoteFrameRef.current
+      if (frame && isBrowserPageAtScreenPoint(frame, screenX, screenY)) {
         void runRemoteNavigation(direction === 'back' ? 'browser.back' : 'browser.forward')
       }
     })
@@
-  }, [isActive, remoteViewportRef, runRemoteNavigation])
+  }, [isActive, remoteFrameRef, remoteViewportRef, runRemoteNavigation])
 }
diff --git a/src/renderer/src/components/browser-pane/stream-remote/remote-browser-page-pane.tsx b/src/renderer/src/components/browser-pane/stream-remote/remote-browser-page-pane.tsx
@@
-  useRemoteBrowserPagePointerHistory({ isActive, remoteViewportRef, runRemoteNavigation })
+  useRemoteBrowserPagePointerHistory({
+    isActive,
+    remoteViewportRef,
+    remoteFrameRef: imageRef,
+    runRemoteNavigation
+  })

ℹ️ Review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f01a9e82-ed06-41af-8c8f-cdb78f4619ff
📥 Commits

Reviewing files that changed from the base of the PR and between d1d5b8c and b0326b0.

📒 Files selected for processing: 1
  • src/renderer/src/i18n/en-runtime-required.json

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

@AmoabaKelvin
AmoabaKelvin force-pushed the browser-page-focus-and-navigation branch from b0326b0 to 74272d7 Compare October 23, 2026 17:10
@AmoabaKelvin

Copy link
Copy Markdown
Collaborator Author

@coderabbitai on the three outside-diff comments from the last review:

Forward repeated page-owned tab shortcuts. Partly holds. Repeats of an Orca tab chord were leaking to the page. In 74272d7 they're now claimed on every repeat, same as Orca's own handler, which claims held tab chords but switches once. I didn't forward them: the renderer ignores repeats for tab commands anyway. Ctrl+Tab isn't affected because the held switcher in browser-guest-shortcut-forwarding.ts handles it before this branch.

Convert the cursor coordinates before subtracting window.screenX/Y. Doesn't hold. I checked live in the dev build: window at (300, 200), UI zoom 1.5. window.screenX/screenY stayed 300/200 (DIPs, same as getContentBounds()), while innerWidth dropped 2560 → 1706. Both operands are already DIPs, so subtract first, then windowDipToCssPx. The page context menu has used the same conversion since #20962 (browser-page-context-menu.tsx).

Hit-test swipes against the streamed frame. Leaving as is. The gutter around a letterboxed frame is part of that page's pane, and the side-button listeners use the same viewport element. A swipe over the gutter goes back on that page, like a swipe anywhere in a Chrome tab's content area. Nothing else in the viewport is a different page that could be hit by mistake.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu
fd -t f '^(browser-guest-shortcut-forwarding|browser-guest-shortcut-dispatch|browser-page-context-menu|browser-page-screen-point|use-remote-browser-page-pointer-history|browser-guest-shortcut-forwarding\.test)\.tsx?$' src
for file in \
src/main/browser/browser-guest-shortcut-forwarding.ts \
src/main/browser/browser-guest-shortcut-dispatch.ts \
src/renderer/src/components/browser/browser-page-context-menu.tsx \
src/renderer/src/components/browser-pane/host-guest/browser-page-screen-point.ts \
src/renderer/src/components/browser-pane/stream-remote/use-remote-browser-page-pointer-history.ts; do
  printf '\n--- OUTLINE %s ---\n' "$file"
  ast-grep outline "$file" || true
  printf '\n--- SOURCE %s ---\n' "$file"
  sed -n '1,260p' "$file"
done
rg -n -C4 'isAutoRepeat|repeat|held|Ctrl.Tab' src/main/browser/browser-guest-shortcut-forwarding.test.ts src/main/browser/browser-guest-shortcut-forwarding.ts

Length of output: 17242


🏁 Script executed:

#!/bin/bash
set -eu
for file in \
src/renderer/src/components/browser-pane/assemble-chrome/browser-page-context-menu.tsx \
src/renderer/src/components/browser-pane/host-guest/browser-page-screen-point.ts \
src/renderer/src/components/browser-pane/stream-remote/use-remote-browser-page-pointer-history.ts; do
  printf '\n--- OUTLINE %s ---\n' "$file"
  ast-grep outline "$file" || true
  printf '\n--- SOURCE %s ---\n' "$file"
  sed -n '1,240p' "$file"
done
rg -n -C5 'isAutoRepeat|repeat|held' src/main/browser/browser-guest-shortcut-forwarding.test.ts

Length of output: 13686


@AmoabaKelvin I couldn't produce a complete response to this request. Please try again.

You are interacting with an AI system.

@AmoabaKelvin
AmoabaKelvin force-pushed the browser-page-focus-and-navigation branch from 74272d7 to e4696ac Compare October 23, 2026 21:35

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3c951078-4615-4b3a-8c46-fdfe14c0f68c
📥 Commits

Reviewing files that changed from the base of the PR and between 74272d7 and e4696ac.

📒 Files selected for processing: 9
  • src/main/browser/agent-input-injection.ts
  • src/main/browser/browser-guest-shortcut-dispatch.ts
  • src/main/browser/browser-guest-shortcut-forwarding.test.ts
  • src/main/browser/browser-guest-wheel-zoom.ts
  • src/main/browser/browser-manager-grab-shortcuts.test.ts
  • src/main/browser/browser-manager-guest-shortcuts.test.ts
  • src/main/browser/cdp-bridge-integration.test.ts
  • src/main/browser/guest-cdp-command.ts
  • src/renderer/src/i18n/en-runtime-required.json
🚧 Files skipped from review as they are similar to previous changes: 1
  • src/renderer/src/i18n/en-runtime-required.json

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

@AmoabaKelvin
AmoabaKelvin force-pushed the browser-page-focus-and-navigation branch from e4696ac to 6d36998 Compare October 23, 2026 22:56
@AmoabaKelvin
AmoabaKelvin force-pushed the browser-page-focus-and-navigation branch from 6d36998 to 5afe0ad Compare October 25, 2026 03:48
@AmoabaKelvin AmoabaKelvin changed the title feat(browser): make Orca shortcuts, split focus and mouse/swipe back-forward work inside pages feat(browser): make Orca shortcuts, split focus and mouse back/forward buttons work inside pages Oct 25, 2026
…d work inside pages

A focused page hands every tab-scope chord to Orca's own tab shortcut owner,
a press in a page makes its split active, switching to a browser tab focuses
the page, and mouse back/forward buttons step the page under the pointer.

Fixes #22144
Fixes #20533
@AmoabaKelvin
AmoabaKelvin force-pushed the browser-page-focus-and-navigation branch from 5afe0ad to 03e18c1 Compare October 25, 2026 22:24
@AmoabaKelvin
AmoabaKelvin merged commit 1b0e56e into main Oct 25, 2026
50 checks passed
@AmoabaKelvin
AmoabaKelvin deleted the browser-page-focus-and-navigation branch October 25, 2026 22:57
smwbev added a commit to smwbev/orca that referenced this pull request Oct 26, 2026
338 commits landed on main between dbde821 and fd25eb0. All seven catalogs and en-runtime-required.json conflicted, so they are taken from main and the prune is recomputed in one pass: the previous 1,633 keys plus 4, none left the set. stablyai#32971 dropped the readers of settings.agents.loadingHost and permissionChoiceDescription, stablyai#32334 the reader of permissionEachOwnDescription, and stablyai#31859 the reader of auto.hooks.useIpcEvents.56d3ec4203. The two permission descriptions exist only in en.json, so en.json sheds 1,637 and the other six catalogs 1,635. en.json goes from 17,143 entries to 15,506; en-runtime-required.json keeps 643 of them.

catalog-nested-settings.test.ts listed loadingHost among the agent settings it checks across catalogs; with its last reader gone, the key comes off that list and the test checks the other ten.

native-chat-shared-copy-matches-catalog.test.ts merged cleanly again and still differs from main by exactly the branch's edit.
j-madrone added a commit to j-madrone/orca that referenced this pull request Oct 29, 2026
…eat param, keybinding title

- stablyai#31859 deleted the ui:newBrowserTab channel with its last listener; the
  voice navigate_ui new-browser-tab verb rode it. Restored the lane
  (optional bridge method, content-creation subscriber).
- Main made PreambleParams.heartbeatIntervalMinutes required: voice
  dispatches pass null — they report through the mailbox reply pump.
- Main's StaticKeybindingActionId title record needs a voice.control
  entry; added with all six catalogs.

Co-Authored-By: Claude Code <[email protected]>
j-madrone added a commit to j-madrone/orca that referenced this pull request Nov 5, 2026
…eat param, keybinding title

- stablyai#31859 deleted the ui:newBrowserTab channel with its last listener; the
  voice navigate_ui new-browser-tab verb rode it. Restored the lane
  (optional bridge method, content-creation subscriber).
- Main made PreambleParams.heartbeatIntervalMinutes required: voice
  dispatches pass null — they report through the mailbox reply pump.
- Main's StaticKeybindingActionId title record needs a voice.control
  entry; added with all six catalogs.

Co-Authored-By: Claude Code <[email protected]>
j-madrone added a commit to j-madrone/orca that referenced this pull request Nov 6, 2026
…eat param, keybinding title

- stablyai#31859 deleted the ui:newBrowserTab channel with its last listener; the
  voice navigate_ui new-browser-tab verb rode it. Restored the lane
  (optional bridge method, content-creation subscriber).
- Main made PreambleParams.heartbeatIntervalMinutes required: voice
  dispatches pass null — they report through the mailbox reply pump.
- Main's StaticKeybindingActionId title record needs a voice.control
  entry; added with all six catalogs.

Co-Authored-By: Claude Code <[email protected]>
j-madrone added a commit to j-madrone/orca that referenced this pull request Nov 7, 2026
…eat param, keybinding title

- stablyai#31859 deleted the ui:newBrowserTab channel with its last listener; the
  voice navigate_ui new-browser-tab verb rode it. Restored the lane
  (optional bridge method, content-creation subscriber).
- Main made PreambleParams.heartbeatIntervalMinutes required: voice
  dispatches pass null — they report through the mailbox reply pump.
- Main's StaticKeybindingActionId title record needs a voice.control
  entry; added with all six catalogs.

Co-Authored-By: Claude Code <[email protected]>
j-madrone added a commit to j-madrone/orca that referenced this pull request Nov 9, 2026
…eat param, keybinding title

- stablyai#31859 deleted the ui:newBrowserTab channel with its last listener; the
  voice navigate_ui new-browser-tab verb rode it. Restored the lane
  (optional bridge method, content-creation subscriber).
- Main made PreambleParams.heartbeatIntervalMinutes required: voice
  dispatches pass null — they report through the mailbox reply pump.
- Main's StaticKeybindingActionId title record needs a voice.control
  entry; added with all six catalogs.

Co-Authored-By: Claude Code <[email protected]>
j-madrone added a commit to j-madrone/orca that referenced this pull request Nov 9, 2026
…eat param, keybinding title

- stablyai#31859 deleted the ui:newBrowserTab channel with its last listener; the
  voice navigate_ui new-browser-tab verb rode it. Restored the lane
  (optional bridge method, content-creation subscriber).
- Main made PreambleParams.heartbeatIntervalMinutes required: voice
  dispatches pass null — they report through the mailbox reply pump.
- Main's StaticKeybindingActionId title record needs a voice.control
  entry; added with all six catalogs.

Co-Authored-By: Claude Code <[email protected]>
j-madrone added a commit to j-madrone/orca that referenced this pull request Nov 9, 2026
…eat param, keybinding title

- stablyai#31859 deleted the ui:newBrowserTab channel with its last listener; the
  voice navigate_ui new-browser-tab verb rode it. Restored the lane
  (optional bridge method, content-creation subscriber).
- Main made PreambleParams.heartbeatIntervalMinutes required: voice
  dispatches pass null — they report through the mailbox reply pump.
- Main's StaticKeybindingActionId title record needs a voice.control
  entry; added with all six catalogs.

Co-Authored-By: Claude Code <[email protected]>
j-madrone added a commit to j-madrone/orca that referenced this pull request Nov 9, 2026
…eat param, keybinding title

- stablyai#31859 deleted the ui:newBrowserTab channel with its last listener; the
  voice navigate_ui new-browser-tab verb rode it. Restored the lane
  (optional bridge method, content-creation subscriber).
- Main made PreambleParams.heartbeatIntervalMinutes required: voice
  dispatches pass null — they report through the mailbox reply pump.
- Main's StaticKeybindingActionId title record needs a voice.control
  entry; added with all six catalogs.

Co-Authored-By: Claude Code <[email protected]>
j-madrone added a commit to j-madrone/orca that referenced this pull request Nov 9, 2026
…eat param, keybinding title

- stablyai#31859 deleted the ui:newBrowserTab channel with its last listener; the
  voice navigate_ui new-browser-tab verb rode it. Restored the lane
  (optional bridge method, content-creation subscriber).
- Main made PreambleParams.heartbeatIntervalMinutes required: voice
  dispatches pass null — they report through the mailbox reply pump.
- Main's StaticKeybindingActionId title record needs a voice.control
  entry; added with all six catalogs.

Co-Authored-By: Claude Code <[email protected]>
j-madrone added a commit to j-madrone/orca that referenced this pull request Nov 10, 2026
…eat param, keybinding title

- stablyai#31859 deleted the ui:newBrowserTab channel with its last listener; the
  voice navigate_ui new-browser-tab verb rode it. Restored the lane
  (optional bridge method, content-creation subscriber).
- Main made PreambleParams.heartbeatIntervalMinutes required: voice
  dispatches pass null — they report through the mailbox reply pump.
- Main's StaticKeybindingActionId title record needs a voice.control
  entry; added with all six catalogs.

Co-Authored-By: Claude Code <[email protected]>
j-madrone added a commit to j-madrone/orca that referenced this pull request Nov 10, 2026
…eat param, keybinding title

- stablyai#31859 deleted the ui:newBrowserTab channel with its last listener; the
  voice navigate_ui new-browser-tab verb rode it. Restored the lane
  (optional bridge method, content-creation subscriber).
- Main made PreambleParams.heartbeatIntervalMinutes required: voice
  dispatches pass null — they report through the mailbox reply pump.
- Main's StaticKeybindingActionId title record needs a voice.control
  entry; added with all six catalogs.

Co-Authored-By: Claude Code <[email protected]>
j-madrone added a commit to j-madrone/orca that referenced this pull request Nov 11, 2026
…eat param, keybinding title

- stablyai#31859 deleted the ui:newBrowserTab channel with its last listener; the
  voice navigate_ui new-browser-tab verb rode it. Restored the lane
  (optional bridge method, content-creation subscriber).
- Main made PreambleParams.heartbeatIntervalMinutes required: voice
  dispatches pass null — they report through the mailbox reply pump.
- Main's StaticKeybindingActionId title record needs a voice.control
  entry; added with all six catalogs.

Co-Authored-By: Claude Code <[email protected]>
j-madrone added a commit to j-madrone/orca that referenced this pull request Nov 12, 2026
…eat param, keybinding title

- stablyai#31859 deleted the ui:newBrowserTab channel with its last listener; the
  voice navigate_ui new-browser-tab verb rode it. Restored the lane
  (optional bridge method, content-creation subscriber).
- Main made PreambleParams.heartbeatIntervalMinutes required: voice
  dispatches pass null — they report through the mailbox reply pump.
- Main's StaticKeybindingActionId title record needs a voice.control
  entry; added with all six catalogs.

Co-Authored-By: Claude Code <[email protected]>
j-madrone added a commit to j-madrone/orca that referenced this pull request Nov 15, 2026
…eat param, keybinding title

- stablyai#31859 deleted the ui:newBrowserTab channel with its last listener; the
  voice navigate_ui new-browser-tab verb rode it. Restored the lane
  (optional bridge method, content-creation subscriber).
- Main made PreambleParams.heartbeatIntervalMinutes required: voice
  dispatches pass null — they report through the mailbox reply pump.
- Main's StaticKeybindingActionId title record needs a voice.control
  entry; added with all six catalogs.

Co-Authored-By: Claude Code <[email protected]>
j-madrone added a commit to j-madrone/orca that referenced this pull request Nov 16, 2026
…eat param, keybinding title

- stablyai#31859 deleted the ui:newBrowserTab channel with its last listener; the
  voice navigate_ui new-browser-tab verb rode it. Restored the lane
  (optional bridge method, content-creation subscriber).
- Main made PreambleParams.heartbeatIntervalMinutes required: voice
  dispatches pass null — they report through the mailbox reply pump.
- Main's StaticKeybindingActionId title record needs a voice.control
  entry; added with all six catalogs.

Co-Authored-By: Claude Code <[email protected]>
j-madrone added a commit to j-madrone/orca that referenced this pull request Nov 20, 2026
…eat param, keybinding title

- stablyai#31859 deleted the ui:newBrowserTab channel with its last listener; the
  voice navigate_ui new-browser-tab verb rode it. Restored the lane
  (optional bridge method, content-creation subscriber).
- Main made PreambleParams.heartbeatIntervalMinutes required: voice
  dispatches pass null — they report through the mailbox reply pump.
- Main's StaticKeybindingActionId title record needs a voice.control
  entry; added with all six catalogs.

Co-Authored-By: Claude Code <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant