Repository navigation
MacOS: Navigate Workspaces & Browser using back/forward swipe gestures - #25592
AlexThunder1989 wants to merge 1 commit into
Conversation
917b2a9 to
59e4c9d
Compare
There was a problem hiding this comment.
ℹ️ One browser-pane gap inline, plus a note on test coverage.
Reviewed changes
- macOS
swipelistener —createMainWindow.tsnow binds the windowswipeevent and mapsleft/rightto back/forward. - Hovered-guest routing — resolves the
<webview>under the pointer viaexecuteJavaScriptand drivesguest.navigationHistory.goToOffset(), otherwise forwardsui:worktreeHistoryNavigate.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
ℹ️ No new issues in the incremental change.
Reviewed changes (incremental)
- Comment reword only — the
Why:comment above the hover lookup now reads "moves to another workspace" (createMainWindow.ts:151). No behavioral change; the inline browser-pane gap from the prior review still applies.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 📝 WalkthroughWalkthrough
Priority: ⬇️ Low Severity of issue fixed: Low Merge Risk: 🟡 Moderate · up to Swipes over remote browser pages do nothing. Fix remote-page history navigation before merging unless that limitation is explicitly accepted. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Swipe navigation reuses existing page and workspace permissions rather than granting new access. Remote-page swipes currently have no effect at this revision, and some downstream recovery behavior remains unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation Issue [
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.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
b697e629-b06b-46c8-ac05-f57fd10bddaa
📥 Commits
Reviewing files that changed from the base of the PR and between d173514 and 59e4c9d5b3a0f8f4044706fe805ef5b98e154077.
📒 Files selected for processing (1)
src/main/window/createMainWindow.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
51d4b65 to
d87b155
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes (since the prior pullfrog review)
- Remote/streamed browser pane detection — the hover probe now returns a
-1sentinel when the pointer is over[data-testid="remote-browser-frame"], since those panes render a screencast<img>rather than a<webview>. - No-op instead of workspace switch — the
elsebranch becameelse if (guestId !== -1), so a swipe over a remote pane does nothing instead of navigating workspace history. - PR description updated — it now states that a swipe over a remote tab does nothing, aligning the code and the description with the resolution the prior review asked for.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
d87b155 to
2d06866
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes (since the prior pullfrog review)
- Probe failure now ignores the swipe — the hover probe's
.catchresolves to the-1sentinel instead ofundefined, so whenexecuteJavaScriptrejects (e.g.getWebContentsId()on a<webview>that is still attaching) the swipe is ignored rather than forwarded toui:worktreeHistoryNavigate. - Comment updated — the
Why:line above the lookup now notes that-1also covers a guest still attaching.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
f5c508e to
2d06866
Compare
There was a problem hiding this comment.
ℹ️ No critical issues — the new tests are sound; one small coverage gap inline.
Reviewed changes
- Swipe navigation tests added —
createMainWindow-swipe-navigation.test.tsdrives the windowswipehandler with a mockedBrowserWindow, asserting workspace back/forward routing, hovered-<webview>paging, and the three ignore cases (remote frame, still-attaching guest, vertical swipe).
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Test commit dropped — the branch now points at
2d06866, socreateMainWindow-swipe-navigation.test.tsis gone and theswipehandler is unchanged from the version already reviewed earlier on this PR.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
2d06866 to
ca931ae
Compare
ca931ae to
8862fd9
Compare
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:
99adc512-a694-42d5-a3c7-36266ca72ca0
📥 Commits
Reviewing files that changed from the base of the PR and between 2d06866f7f59c0b8ec61b7d80bef4cedf07f49db and 8862fd9.
📒 Files selected for processing (8)
src/main/window/createMainWindow-swipe-navigation.test.tssrc/main/window/createMainWindow-test-harness.tssrc/main/window/createMainWindow.tssrc/preload/api/ui-bridge-state-and-menu-commands.tssrc/preload/api/ui-command-event-api.tssrc/renderer/src/hooks/ipc-events/app-lifetime-ipc-bridge.tssrc/renderer/src/hooks/ipc-events/swipe-navigation-ipc-bridge.tssrc/renderer/src/web/preload-api/web-ui-api.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
| return | ||
| } | ||
| const remoteFrame = document.querySelector('[data-testid="remote-browser-frame"]:hover') | ||
| if (remoteFrame) { | ||
| // Why: wrap the swipe as the side-button click the remote pane already turns into remote back/forward. | ||
| remoteFrame.dispatchEvent( | ||
| new PointerEvent('pointerdown', { bubbles: true, button: direction === 'back' ? 3 : 4 }) | ||
| ) | ||
| return |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
sed -n '1,45p' src/renderer/src/hooks/ipc-events/swipe-navigation-ipc-bridge.ts
rg -n 'button === [34]|button: [34]|pointerdown|mousedown|remote-browser-frame' src/renderer/src/components/browser-pane | head -110Repository: stablyai/orca
Length of output: 3199
🏁 Script executed:
rg -n -i 'remote.?browser|button\s*={1,2}\s*[34]|button:\s*[34]|pointerdown|pointerup|mousedown|auxclick|goBack|goForward|navigate.*(back|forward)|back.*forward' src/renderer/src/components/browser-pane/stream-remote src/renderer/srcRepository: stablyai/orca
Length of output: 45661
🏁 Script executed:
rg -n 'handleRemotePointerDown|onPointerDown|event\.button|button\s*===|getRemoteBrowserMouseButton|remoteBrowserPage.*(back|forward)|navigate.*(back|forward)' src/renderer/src/components/browser-pane/stream-remote
printf '\n--- input hook ---\n'
sed -n '1,260p' src/renderer/src/components/browser-pane/stream-remote/use-remote-browser-page-input.ts
printf '\n--- viewport ---\n'
sed -n '1,190p' src/renderer/src/components/browser-pane/stream-remote/remote-browser-page-viewport.tsx
printf '\n--- mouse model ---\n'
sed -n '1,125p' src/renderer/src/components/browser-pane/stream-remote/remote-browser-page-input-model.tsRepository: stablyai/orca
Length of output: 24946
🏁 Script executed:
nl -ba src/renderer/src/hooks/ipc-events/swipe-navigation-ipc-bridge.ts
printf '\n--- registration references ---\n'
rg -n -F 'registerSwipeNavigationIpcBridge' src/renderer/src
printf '\n--- receiver and mapper ---\n'
nl -ba src/renderer/src/components/browser-pane/stream-remote/use-remote-browser-page-input.ts | sed -n '128,205p'
nl -ba src/renderer/src/components/browser-pane/stream-remote/remote-browser-page-input-model.ts | sed -n '76,92p'
nl -ba src/renderer/src/components/browser-pane/stream-remote/remote-browser-page-input-model.test.ts | sed -n '10,22p'
nl -ba src/renderer/src/components/browser-pane/stream-remote/remote-browser-page-viewport.tsx | sed -n '98,114p'
printf '\n--- explicit swipe/delegation references ---\n'
rg -n -i 'swipe.?navigation|side.?button|button.?3|delegat.{0,40}(pr|pull request)|another pr' src/renderer/src/components/browser-pane/stream-remote src/renderer/src/hooks/ipc-eventsRepository: stablyai/orca
Length of output: 7926
Handle remote history swipes before filtering mouse buttons.
When a remote frame is hovered, the swipe bridge dispatches a bubbling pointerdown with button 3 or 4 to the frame. The frame’s handler maps those buttons to null and returns without navigating history or sending remote input. Remote-page swipes therefore do nothing.

On macOS, the back/forward swipe now navigates like the mouse side buttons in #25555: back/forward in the web page under the pointer, otherwise back/forward through workspaces. It covers trackpad page swipes and Logitech Options+ back/forward buttons, which macOS sends as the same gesture.
#25555 is minimal for Linux and Windows and does the job well. macOS is more or less standalone: a swipe arrives without a target, like a key press, so this PR wraps it into the same back/forward navigation and checks what's under the pointer.
Both PRs use the existing workspace history (⌘⌥←/→, Ctrl+Alt+←/→), share no code, and can merge in either order.
EDIT: Swipes over a remote web page now go back/forward in that page (with #25555), and the swipe is now decided in the window instead of the main process (8862fd9).
ELI5
On a Mac, swipe back/forward (or press the Logitech back/forward buttons) to go to the previous or next workspace, or page when over a web page.
What Changed
The main process forwards the swipe as a
ui:swipeNavigatemessage. The window sends it to the web page under the pointer, to a remote page (as the side-button click that page already handles), or to workspace history.Why
A swipe isn't a mouse click, so #25555 never sees it.
Linked Issue
Fixes #25633 (macOS part)
Related: #25555, #23255
Visual Proof
N/A — no UI change.
Testing
Transport test added (swipe →
ui:swipeNavigate); the pointer-based mapping is UX and was tested manually.AI Disclosure
Claude Opus 5.5 (Claude Code).
Review
N/A
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
N/A — macOS-only window event; no SSH, mobile, security, performance or compatibility impact.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)