Skip to content

Fix remote hosted review browser routing - #20030

Merged
Jinwoo-H merged 6 commits into
mainfrom
remote-browser-issue
Sep 11, 2026
Merged

Jinwoo-H merged 6 commits into
mainfrom
remote-browser-issue

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​45 $\color{#cf222e}{\Huge{\mathbf{−}}}$​14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​31
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​15 $\color{#cf222e}{\Huge{\mathbf{−}}}$​10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5

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

@coderabbitai

coderabbitai Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview 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

Walkthrough

Hosted 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 6ee49

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)

Check name Status Explanation Resolution
Description check ⚠️ Warning 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 che… Complete the required template sections. Add the issue number after Fixes #, explain the problem and solution, provide visual proof or state N/A with a reason, document automated and manual testing with platforms, complete applicable ch…
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: fixing remote hosted review browser routing.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

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 Fixes #, explain the problem and solution, provide visual proof or state N/A with a reason, document automated and manual testing with platforms, complete applicable checkboxes, and address security, cross-platform, SSH, compatibility, performance, and build checks.

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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.

@pullfrog pullfrog 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.

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 a runtime sourceOwner from the active runtime when allowRemoteInApp is 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 passes allowRemoteInApp: true from the checks panel, so plain and modifier clicks both opt into the remote-proxy routing.
  • test updates — mirror the new allowRemoteInApp: true option in the routing-option and openHttpLink call 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 effectiveSourceOwner from the active runtime when allowRemoteInApp is set with no sourceOwner — has no direct unit test in http-link-routing.test.ts. The existing "routes to the system browser when a remote runtime environment is active" test omits allowRemoteInApp, so it doesn't exercise the new branch. A test asserting openRuntimeBrowserTabMock is called with expectedRuntimeEnvironmentId (and createBrowserTabMock/openUrlMock are not) when passing { allowRemoteInApp: true, worktreeId } with no sourceOwner and an active runtime would pin the behavior.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog 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.

ℹ️ 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 the activeRuntimeEnvironmentId guard in resolveChecksPanelHostedReviewModifierDestination, so the header hint now renders on remote runtimes where the Shift+modifier gesture actually routes (system browser when openLinksInApp, Orca when inverting is on).
  • test updates — replaced the stays silent while a remote runtime is active assertion with resolves modifier destinations for remote runtimes, now asserting system-browser and orca instead of null.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

  • checks-panel-hosted-review-click-routing.ts — removed the stale Why: comment describing the now-dropped activeRuntimeEnvironmentId?.trim() guard, resolving the prior review thread.
  • checks-panel-hosted-review-click-routing.test.ts — dropped the excess allowRemoteInApp field from the openChecksPanelHostedReviewUrl input objects (an excess-property type error) and the orphaned Why: comment above ignores a blank runtime id.
  • http-link-routing.test.ts — added the direct test for the synthesized effectiveSourceOwner branch, pinning the active-runtime proxy route (with a trimmed id) that the prior review flagged as untested.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@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

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 5dc3739f-eab5-4e2f-82d4-ba51cc985f54

📥 Commits

Reviewing files that changed from the base of the PR and between 6075efa and c459d9f.

📒 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.

@pullfrog pullfrog 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

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 synthesized effectiveSourceOwner in favor of the raw sourceOwner, and added remoteRuntimeActive to the remote-browser branch so ownerless hosted-review links route through the workspace opener.
  • opener payload — the no-owner case now omits expectedRuntimeEnvironmentId/expectedSshConnectionId, letting openWorkspaceBrowserTab resolve the owning runtime from the worktree route instead of asserting the active runtime.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@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 platform limitations.

⚠️ Outside diff range comments (1)
src/renderer/src/lib/http-link-routing.ts (1)

150-163: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Gate the global runtime fallback on the absence of a source owner.

Terminal routing passes allowRemoteInApp: true. With sourceOwner: { kind: 'local' }, an active remoteRuntimeActive still selects workspaceHttpLinkBrowserOpener and skips createBrowserTab. 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

📥 Commits

Reviewing files that changed from the base of the PR and between c459d9f and 6ee4944.

📒 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.

@pullfrog pullfrog 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.

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 stale expectedRuntimeEnvironmentId: 'remote-1' expectation from the ownerless routing test so it matches the no-owner opener payload introduced in the prior commit.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

  • http-link-routing.ts — gated the remoteRuntimeActive fallback on !effectiveSourceOwner, so an explicit sourceOwner: { kind: 'local' } no longer routes through workspaceHttpLinkBrowserOpener when a remote runtime is active.
  • http-link-routing.test.ts — added keeps explicitly local links local while a remote runtime is active, pinning the local createBrowserTab path (and asserting the runtime opener is not called) for a local owner.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@Jinwoo-H
Jinwoo-H merged commit ec9c3e0 into main Sep 11, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant