Repository navigation
Fix remote hosted review browser routing - #20030
Conversation
|
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:
📝 WalkthroughWalkthroughHosted review click options now enable remote in-app routing for plain and modifier-held clicks. The HTTP link router uses explicit source ownership and supports managed-browser routing for active remote runtimes without an owner. Tests cover the updated options, destinations, and runtime browser behavior. Priority: ⬇️ Low Merge Risk: 🟡 Moderate · up to Some local links may open in the active remote workspace instead of the local browser. This routing defect should be fixed before merge. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description gives a concise change summary and testing result, but it omits most required template sections, including ELI5, Why, a valid linked issue, visual proof or N/A, testing details and checkboxes, AI disclosure, review, boundary confirmation, notes, and checklist items. Resolution Complete the required template sections. Add the issue number after ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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.
Important
The routing fix is correct, but the modifier hint logic and its tests still encode the pre-fix assumption that remote review links can't reach Orca — they now can, so the hint is silently suppressed on remote runtimes even though the gesture works.
Reviewed changes
http-link-routing.ts— synthesizes aruntimesourceOwnerfrom the active runtime whenallowRemoteInAppis set and no explicit owner was supplied, so the existing remote-browser branch fires for hosted review links.checks-panel-hosted-review-click-routing.ts— always passesallowRemoteInApp: truefrom the checks panel, so plain and modifier clicks both opt into the remote-proxy routing.- test updates — mirror the new
allowRemoteInApp: trueoption in the routing-option andopenHttpLinkcall expectations.
⚠️ Modifier hint stays silent on remote runtimes even though the modifier now routes
resolveChecksPanelHostedReviewModifierDestination (in src/renderer/src/components/right-sidebar/checks-panel-hosted-review-click-routing.ts:43) returns null whenever activeRuntimeEnvironmentId?.trim() is set, on the assumption that "openHttpLink refuses to route a remote-owned link into Orca." This PR changes exactly that: with allowRemoteInApp and an active runtime, a plain click now opens in the remote browser, and the Shift+modifier click resolves to the system browser (or the remote browser when inverting is on). So the header's title tooltip (ChecksPanel.tsx:75-81) stays hidden for the one surface this PR is fixing, and the test stays silent while a remote runtime is active now documents the wrong behavior.
Technical details
# Modifier hint contradicts new remote routing
## Affected sites
- `src/renderer/src/components/right-sidebar/checks-panel-hosted-review-click-routing.ts:43` — `if (!hasWorktree || settings?.activeRuntimeEnvironmentId?.trim()) return null` still treats an active runtime as "neither destination reachable".
- `src/renderer/src/components/right-sidebar/checks-panel-hosted-review-click-routing.test.ts:122-139` — `stays silent while a remote runtime is active` pins the pre-fix behavior.
## Required outcome
- The hint must describe the real Shift+modifier destination for remote-owned hosted review links, matching `openHttpLink`'s new `effectiveSourceOwner` synthesis. With an active runtime and `openLinksInApp: true` the modifier lands in the system browser; with `openLinksInApp: false` + inverting it lands in the remote browser.
- Update or replace the remote-runtime test so it reflects the new reachability instead of asserting silence.
## Open questions for the human
- Should the hint text differ for a remote runtime (e.g. "opens in the runtime's browser") or reuse the existing `system-browser` / `orca` labels?ℹ️ Nitpicks
- The core of the fix — synthesizing
effectiveSourceOwnerfrom the active runtime whenallowRemoteInAppis set with nosourceOwner— has no direct unit test inhttp-link-routing.test.ts. The existing "routes to the system browser when a remote runtime environment is active" test omitsallowRemoteInApp, so it doesn't exercise the new branch. A test assertingopenRuntimeBrowserTabMockis called withexpectedRuntimeEnvironmentId(andcreateBrowserTabMock/openUrlMockare not) when passing{ allowRemoteInApp: true, worktreeId }with nosourceOwnerand an active runtime would pin the behavior.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
ℹ️ The modifier-hint concern from the prior review is cleanly addressed. One minor comment nit remains inline.
Reviewed changes
checks-panel-hosted-review-click-routing.ts— dropped theactiveRuntimeEnvironmentIdguard inresolveChecksPanelHostedReviewModifierDestination, so the header hint now renders on remote runtimes where the Shift+modifier gesture actually routes (system browser whenopenLinksInApp, Orca when inverting is on).- test updates — replaced the
stays silent while a remote runtime is activeassertion withresolves modifier destinations for remote runtimes, now assertingsystem-browserandorcainstead ofnull.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
checks-panel-hosted-review-click-routing.ts— removed the staleWhy:comment describing the now-droppedactiveRuntimeEnvironmentId?.trim()guard, resolving the prior review thread.checks-panel-hosted-review-click-routing.test.ts— dropped the excessallowRemoteInAppfield from theopenChecksPanelHostedReviewUrlinput objects (an excess-property type error) and the orphanedWhy:comment aboveignores a blank runtime id.http-link-routing.test.ts— added the direct test for the synthesizedeffectiveSourceOwnerbranch, pinning the active-runtime proxy route (with a trimmed id) that the prior review flagged as untested.
DeepSeek Pro (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: 5dc3739f-eab5-4e2f-82d4-ba51cc985f54
📒 Files selected for processing (1)
src/renderer/src/lib/http-link-routing.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.
There was a problem hiding this comment.
Caution
The remoteRuntimeActive fallback added in this commit ships a red test and over-fires for explicitly-local link owners.
Reviewed changes
http-link-routing.ts— dropped the synthesizedeffectiveSourceOwnerin favor of the rawsourceOwner, and addedremoteRuntimeActiveto the remote-browser branch so ownerless hosted-review links route through the workspace opener.- opener payload — the no-owner case now omits
expectedRuntimeEnvironmentId/expectedSshConnectionId, lettingopenWorkspaceBrowserTabresolve the owning runtime from the worktree route instead of asserting the active runtime.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/renderer/src/lib/http-link-routing.ts (1)
150-163: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winGate the global runtime fallback on the absence of a source owner.
Terminal routing passes
allowRemoteInApp: true. WithsourceOwner: { kind: 'local' }, an activeremoteRuntimeActivestill selectsworkspaceHttpLinkBrowserOpenerand skipscreateBrowserTab. Change the fallback to!effectiveSourceOwner && remoteRuntimeActive; this preserves the runtime- and SSH-owned branches.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 17f8c47d-97a6-4a98-85ad-a48199ca1b76
📒 Files selected for processing (1)
src/renderer/src/lib/http-link-routing.test.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
There was a problem hiding this comment.
Important
The test assertion is now aligned and the suite is green, but this commit does not touch openHttpLink. The remoteRuntimeActive fallback (added in the prior commit) still fires for an explicit sourceOwner: { kind: 'local' }, so local terminal/native-chat links continue to route through the workspace opener whenever a remote runtime is active. That concern is already tracked in the open thread on http-link-routing.ts from the prior review and still blocks merge — I'm leaving it open rather than re-raising it inline.
Reviewed changes
http-link-routing.test.ts— dropped the staleexpectedRuntimeEnvironmentId: 'remote-1'expectation from the ownerless routing test so it matches the no-owner opener payload introduced in the prior commit.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
http-link-routing.ts— gated theremoteRuntimeActivefallback on!effectiveSourceOwner, so an explicitsourceOwner: { kind: 'local' }no longer routes throughworkspaceHttpLinkBrowserOpenerwhen a remote runtime is active.http-link-routing.test.ts— addedkeeps explicitly local links local while a remote runtime is active, pinning the localcreateBrowserTabpath (and asserting the runtime opener is not called) for a local owner.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Fixes remote right-sidebar review links by routing through the client browser and active runtime proxy. Targeted routing tests pass.