Repository navigation
Conversation
A paired runtime's dev server URL is "localhost:<port>" on the runtime, so the system-browser action was gated to local workspaces; a remote port could only open in Orca's own browser. When a remote listener is bound to a wildcard address, substitute the address this client already uses to reach that runtime, which is reachable by definition. This stays transport-agnostic: LAN, VPN, tailnet and public endpoints all work without detecting which is which. Loopback-bound listeners, ssh-tunnelled pairings and relay-only connections resolve to null and keep today's in-app behavior rather than emitting an unreachable URL.
The row rendered addressForPort(), which on a remote workspace is "localhost:<port>" — an address naming the client machine, where nothing is listening. The copy button handed over the same unusable string, so the panel was actively misleading rather than merely unhelpful. Display and copy the reachable address when one exists, so what is shown, copied and opened all agree and a remote port reads like a local one. Rows with no reachable address keep the OS-derived value unchanged.
The sidebar worktree card and the status-bar popover open ports through the same action as the right-sidebar panel, but neither passed the reachable URL and both still rendered the OS-derived address. A remote port therefore kept its old behavior on the two surfaces users reach first.
|
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 (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe changes add shared runtime-endpoint selection and client-reachable workspace-port address resolution. Merged port rows retain their source scan key, which reachability resolution uses to identify the runtime target. Port rows use resolved addresses for display and copying, and pass reachability and routing results to browser-opening actions. Remote ports open in the embedded browser by default; an explicit system-browser request uses the reachable URL when available. Tests cover endpoint selection, address attribution, URL construction, and browser-routing decisions. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The reviewed changes have no identified issue requiring a fix before merge. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to A deliberate shortcut can now open a remote workspace port in the user’s regular browser. That is useful, but a URL advertised by a remote process can supply the destination’s hostname. The shortcut requires a user gesture, and no automatic browser opening was found. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 critical issues — minor suggestions inline.
Reviewed changes
- Remote reachable-address resolver — new
clientReachableBrowserUrlForPortrewrites only the host of an advertised origin (scheme/path preserved) or synthesizesscheme://host:port, gated on a wildcard bind plus a non-loopback paired endpoint, with IPv6 kept bracketed exactly once. - Reactive row wiring —
useClientReachableUrlForPort/clientReachableAddressdrive display and copy on the right-sidebar Ports panel, the worktree card, and the status-bar popover;openWorkspacePortInBrowserroutes the system-browser branch through the resolved URL and falls through to the in-app browser when there is none. - Tests — new exact-assertion unit tests for the resolver and URL builder, including the IPv6
[[…]]regression and the refusal set (loopback bind, ssh-tunnel, unparseable endpoint, missing environment, stalepreferredEndpointId).
I traced the load-bearing claims: advertisedUrl is keyed by (worktreeId, port, pid) in local-workspace-port-attribution.ts:89 so its port always matches the listener; the transport dials getPreferredPairingOffer (i.e. preferredEndpointId), so "the address this client already uses" is accurate; and desktop runtime pairing offers cannot carry a relay, so the JSDoc's relay-only refusal has no desktop producer. Existing PortsPanel / WorktreeCardPorts tests still pass (42 tests).
Technical details
# Remote-reachable port address
## Verified contracts
- `src/main/ports/local-workspace-port-attribution.ts:89` — `advertisedUrl` only attached when the watcher lookup matches `(worktreeId, port, pid)`, so its port equals the listener port.
- `src/main/ipc/runtime-environment-transport-routing.ts:106` — every RPC dials `getPreferredPairingOffer(currentEnvironment)`, so `preferredEndpointId` is the live endpoint, not a stale preference.
- `src/shared/mobile-relay-pairing-offer.ts:82-91` — relay is rejected for `scope: 'runtime'`; no desktop environment endpoint is a relay URL.
## No new issues found in
- `openWorkspacePortInBrowser` system-browser branch: `local ? url : (clientReachableUrl ?? null)` is behavior-preserving for local and never forwards a remote `localhost:<port>` to the OS.
- Host attribution across all three surfaces: per-port owner target (workspace) and `activeWorktreeId` (container/external) are consistent between display and the open/stop action.ℹ️ Nitpicks
getPortOpenBrowserTooltipLabelstill advertises⇧⌘+click for system browseron a remote port whoseclientReachableUrlis null (loopback-bound). There the modifier falls through to the in-app browser, so the tooltip promises an action that does nothing — the same class of mismatch this PR fixes for wildcard binds. Conditioning the hint onclientReachableUrl != nullwould close it.isWildcardBindHostinworkspace-port-urls.tsduplicates the private helper of the same name insrc/shared/browser-url.ts:90(which additionally normalizes brackets and trailing dots). Exporting and reusing it would keep the two predicates from drifting.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…er hint Review follow-ups on stablyai#21807. The details dialog was a fourth surface still rendering addressForPort(), so a remote wildcard-bound port read localhost:<port> there while the row it was opened from read the reachable host. Its Bind field keeps the raw value, which is what makes the two fields useful together on a remote workspace. The open-in-browser tooltip advertised the system-browser modifier on every port, including a remote loopback-bound one where it falls through to the in-app browser and does nothing. The hint is now conditional; omitting it needs no new string. isWildcardBindHost moves next to the bindHost field it interprets. It is deliberately NOT the same-named helper in browser-url.ts: that one answers a certificate question about a URL hostname and accepts only 0.0.0.0 and ::, while a scanner-reported bind can also be '*' from lsof, so reusing it would silently stop recognising wildcard binds on macOS.
|
Thanks — all three addressed in 60d8855. Details dialog. Correct, and it was the same mistake I'd already made once in this PR: Tooltip hint. Agreed, and it's the same mismatch the PR fixes, one level up: the UI was advertising Duplicate // browser-url.ts:90 — a certificate question about a URL hostname
return normalized === '0.0.0.0' || normalized === '::'A scanner-reported The drift concern is fair though, so |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Threaded the client-reachable address into
LocalPortDetailsDialog's header andAddressfield, falling back to the OS-derived address only when none exists — so the details pane agrees with the row it was opened from. - Gated the system-browser modifier hint in
getPortOpenBrowserTooltipLabelon a newusePortSystemBrowserAvailablehook, dropping it when a remote loopback-bound port has no reachable URL instead of advertising a no-op. - Moved
isWildcardBindHostbeside thebindHostfield insrc/shared/workspace-ports.ts, with a comment on why it stays separate frombrowser-url.ts's certificate-hostname predicate. - Added a test pinning the hint's omission when the system browser cannot serve the port.
Both prior nitpicks and the one inline thread from the last review are addressed. I re-ran the affected suites (workspace-port-urls, workspace-port-client-reachable-url, PortsPanel) — 43 tests, all passing.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…inition each `isWildcardBindHost` and `isUnspecifiedHost` were the same predicate, and the comment defending the duplicate named the wrong twin: it argued against reusing `browser-url.ts`'s certificate predicate, while the real twin was the main-process one, which is strictly stronger (it lowercases and strips brackets). Keep the shared one, give it that normalization, and delete the main-process copy. `preferredEndpointId ?? endpoints[0]` had three copies. Since a surface that names a runtime endpoint must name the one the transport actually dials, that pick must not be able to diverge; extract `preferredRuntimeEndpoint` and call it everywhere.
…ed endpoint Two ways the reachable URL could be confidently wrong. An advertised origin with a DNS name (the real case in the code is `local.getmontecarlo.com:3001`) is the name the certificate is issued for and the name any vhost or reverse proxy keys on. Substituting the connection's IP there broke TLS and Host-header routing in the one case where the original may well have worked, and it regressed display and copy versus main. Only loopback, wildcard and IP-literal advertised hosts are substituted now. `PairingOffer.endpoint` is allowed to carry a path, and `parseHostAccessLink` explicitly permits one. For a pairing routed through a gateway at `wss://gw.example.com/orca/ws` the bare hostname names the proxy and says nothing about reaching a dev-server port behind it, so that endpoint is refused. Also drops the `isWildcardBindHost` pass-through re-export, rebuilds the origin instead of `URL.toString()` (advertisedUrl is origin-only by construction, so the old path always appended a trailing slash), and rewrites the JSDoc to say what the function actually proves: an offer, not a guarantee.
…ult route Three problems, one shape: the branch treated "an address that reaches this host" as "a URL that will load", and then wired the unverified answer into the path a stock install takes on every click. Default click. `openLinksInApp` defaults to false, so `openInOrcaBrowser === false` is not the modifier — it is the ordinary pointer click. On main the second conjunct `runtimeTarget.kind === 'local'` absorbed that and a remote port always landed in the embedded browser. Routing on the reachable URL alone sent every click on a remote wildcard-bound port out of the app to a URL that a security group, ufw, Windows Firewall or a port-scoped ACL can refuse — with `shell.openUrl` reporting success either way and no fallback. `resolvePortOpenRouting` now reports the modifier separately from the saved setting, and only an explicit modifier trades the embedded browser (which always works, because it tunnels) for the direct URL. A local port's routing is unchanged. Modifier inversion. The ports surfaces never read `openLinksInAppModifierInverts`, so for users who opted into inversion the modifier and its hint were backwards, unlike every other link surface. They now go through one destination resolver that also drives the tooltip, so the hint names where the gesture actually lands. Owning host. The status-bar popover renders the merged all-hosts scan, and every row resolved its host from the *active* workspace. A local `0.0.0.0:7000` listener sitting next to remote rows was therefore stamped with the remote machine's address, pointing at whatever that host runs on 7000. The merge already knew the answer and discarded it into a prefixed row id; it now carries the scan key as a field, and one hook resolves the host, the address, the reachable URL and whether the system browser has anywhere to go. Four hand-copied derivations become one `usePortClientReachability`, which is what keeps display, copy and open from drifting — the dialog had already been missed once on this branch. `workspace-port-actions.ts` crossed the 300-line cap, so the click-routing concern moved to `workspace-port-open-routing.ts` rather than suppressing it. Tests: adds `workspace-port-actions.test.ts` (the open path, including the plain click that must stay in Orca), `workspace-port-open-routing.test.ts` (the modifier and the tooltip), and rendered-row cases in the popover test for the address a remote row shows and copies and for the local row in the merged view. Each was confirmed to fail with its production change reverted.
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 66feac15-d324-48e7-b942-060f2bf09d1f
📒 Files selected for processing (22)
src/main/ports/advertised-url-cache-update.tssrc/main/ports/advertised-url-parsing.tssrc/renderer/src/components/right-sidebar/PortsPanel.test.tsxsrc/renderer/src/components/right-sidebar/local-port-details-dialog.tsxsrc/renderer/src/components/right-sidebar/local-port-row.tsxsrc/renderer/src/components/right-sidebar/local-workspace-ports-panel.tsxsrc/renderer/src/components/right-sidebar/ssh-forwarded-port-row.tsxsrc/renderer/src/components/right-sidebar/ssh-ports-panel.tsxsrc/renderer/src/components/sidebar/WorktreeCardPorts.tsxsrc/renderer/src/components/status-bar/ports-status-popover-rows.test.tsxsrc/renderer/src/components/status-bar/ports-status-popover-rows.tsxsrc/renderer/src/lib/workspace-port-actions.test.tssrc/renderer/src/lib/workspace-port-actions.tssrc/renderer/src/lib/workspace-port-client-reachability.test.tssrc/renderer/src/lib/workspace-port-client-reachability.tssrc/renderer/src/lib/workspace-port-open-routing.test.tssrc/renderer/src/lib/workspace-port-open-routing.tssrc/renderer/src/lib/workspace-port-urls.test.tssrc/renderer/src/lib/workspace-port-urls.tssrc/renderer/src/web/web-runtime-environment.tssrc/shared/runtime-environments.tssrc/shared/workspace-ports.ts
💤 Files with no reviewable changes (1)
- src/main/ports/advertised-url-parsing.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This run re-reviews the three commits since the prior pullfrog review at 60d8855 (cc865e3, ff2d7e1, 470415b).
- Made the system browser an explicit gesture for remote ports —
openWorkspacePortInBrowsernow takessystemBrowserRequested, so a remote port stays in the embedded browser on a stock plain click and only trades it away when Shift+Cmd/Ctrl is held; local ports are unchanged. - Split open routing into
workspace-port-open-routing.ts—resolvePortOpenRoutingreturns{ openInOrcaBrowser, systemBrowserRequested }and honorsopenLinksInAppModifierInverts, with the modifier hint derived from the same resolution. - Rewrote client reachability around
hostScanKey—workspace-port-client-reachability.tsresolves a row's owning host from the scan key stamped at all-hosts merge time, so a local row in the merged status-bar popover no longer inherits the active remote workspace's address. - Hardened
clientReachableBrowserUrlForPort— an advertised DNS origin is preserved, a path-bearing pairing endpoint is refused, and an IPv6 endpoint host stays bracketed exactly once. - Extracted
preferredRuntimeEndpointas the single endpoint pick behind bothgetPreferredPairingOfferand the web client's offer. - Tests — new exact-assertion coverage for routing, reachability, and URL building (62 passing across the six affected files);
oxlinton the changed sources is clean.
I traced the incremental changes end to end: mergeWorkspacePortScans stamps hostScanKey from the real per-host scan keys (never the synthetic all-hosts:all), workspace-port-groups.ts preserves port references so the field survives grouping, and the new plain-click regression is pinned by an exact openUrl-not-called assertion. The prior review's one inline thread and both nitpicks are addressed.
ℹ️ Inverted modifier leaves no system-browser path for remote ports
For a user with openLinksInAppModifierInverts: true and openLinksInApp: false, a remote port has no gesture that reaches the system browser: a plain click routes to the embedded browser (the deliberate remote default) and the modifier resolves to openInOrcaBrowser: true, which is the same embedded route. The tooltip still advertises ⇧⌘+click to open in Orca, so the hint describes a click that changes nothing for these rows. This is a narrow configuration and non-blocking, but it is worth a deliberate answer since the same "hint promises a no-op" class was fixed for loopback-bound remote ports.
Technical details
# No system-browser gesture for remote ports when the modifier is inverted
## Affected sites
- `src/renderer/src/lib/workspace-port-open-routing.ts:99` — modifier + `openLinksInAppModifierInverts` maps to `openInOrcaBrowser: true`; for a remote port that is the same embedded route a plain click already takes.
- `src/renderer/src/lib/workspace-port-actions.ts:98-103` — `systemBrowserUrl` for a remote target is non-null only when `systemBrowserRequested === true`, which that branch never sets.
## Required outcome
- Choose deliberately: either give the inverted-modifier remote row a way to reach the system browser when one is available, or phrase the hint so it does not imply a difference where both clicks land in Orca.DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Heads up @mmarabel — @nwparker has taken this over and pushed three commits on top of
The body has been rewritten with fresh before/after captures and an honest Testing section; it now says |
A dev server that advertises `http://feature.localhost:5173` was passed through unchanged as the client-reachable URL for a remote wildcard port. `*.localhost` resolves to the client's own loopback, so the row offered an address pointing at whatever this laptop runs on that port - the exact silently-wrong-server failure the DNS passthrough exists to avoid. `classifyRemotePairingHostname` already knows the shape; apply it in the passthrough branch so loopback aliases fall through to host substitution.
`mergeWorkspacePortScans` skipped the `hostScanKey` stamp whenever only one host had been scanned, so with a remote workspace active and only the local scan present, every row fell back to the active workspace's host - the misattribution the scan key was added to prevent, just with one host. Stamp on both paths. The id prefix stays off the single-host path: one host's ids are already unique, and prefixing would churn every row key the moment a second host appears.
Users with "Invert link-routing modifier" on and Link Routing off could never open a remote port in their own browser: both the plain click and the modifier resolved to Orca's embedded browser, while the tooltip advertised "Shift+Ctrl+click to open in Orca" - a gesture that changed nothing. Root cause was branching the modifier on settings alone. Inverting means "the other destination", and on a remote port the other destination is never Orca, because a plain click already lands there whatever Link Routing says. The resolver now takes where a plain click on *this row* goes, mirroring resolveChecksPanelHostedReviewModifierDestination, and names the destination a plain click does not reach - or nothing, when both coincide. That also retires the hint on a local port with Link Routing off, where the modifier has always repeated the plain click. Two smaller items ride along in the same surfaces: the two hint strings are the shared terminal-link ones ChecksPanel already uses rather than private copies, and a reachable address keeps the listener's port, which URL.host dropped on a :80 or :443 listener.
|
@mmarabel heads up — I (nwparker) took this over and pushed three commits on top of your four. Nothing of yours was rewritten or force-pushed; the design is yours and I kept it, because joining What I changed, all found in the last review round:
All three of CodeRabbit's inline threads are answered — two fixed as suggested, one (the inversion hint) fixed the opposite way with the reasoning in the thread. I also rewrote the PR body: the modifier section now describes what the code does, and the Testing section no longer implies coverage that does not exist. New visual proof for the inversion fix is attached. Required CI is approved and running against Happy to have you keep pushing to the branch — just pull first. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This run re-reviews the three commits since the prior pullfrog review at 470415b.
- Let the system browser stay reachable for a remote port under an inverted modifier —
resolvePortOpenModifierDestinationnow derives the modifier's meaning from where a plain click lands, so a remote port's modifier means the system browser even whenopenLinksInAppModifierInvertsis on, and the routing, hint, and open action move together (mirroring the checks-panel resolver). - Refused a
*.localhostadvertised origin as a remote address —feature.localhostresolves to the client's own loopback, so the URL builder now substitutes the connected address rather than passing the alias through and opening whatever this machine runs on that port. - Stamped the owning host on a single-host scan projection — the one-entry fast path in
mergeWorkspacePortScansnow carrieshostScanKeylike the multi-host path (still without an id prefix), so a surface whose active workspace lives elsewhere cannot re-attribute a lone host's rows. - Kept a default-port listener readable —
reachableAddressbuildshost:portfrom the listener rather thanURL.host, which drops:80/:443. Shared terminal hint helpers moved the platform pin into one injectable place.
I re-ran the seven affected suites (60 tests, all passing) and traced the delta end to end. The prior review's one informational concern — no system-browser gesture for a remote port under an inverted modifier — is addressed with a matching regression test. No open pullfrog threads remain.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
The forwarded-port row still printed "Shift+Ctrl+click for system browser" unconditionally while the workspace-port rows beside it now resolve the destination. With stock settings that hint repeats the plain click, and for an inverting user it names the wrong end. A forward listens on this machine's loopback, so it is never a remote-host row and the same resolver answers it; the panel passes the destination down.
|
Follow-up in Full CI was green on |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This run re-reviews the single commit since the prior pullfrog review at b131ac1.
- Threaded the modifier destination into the SSH forwarded-port row —
SshPortsPanelresolvesresolvePortOpenModifierDestination({ settings })once and passes it down; a forward listens on this machine's loopback, so it is never a remote-host row and the same resolver answers it.SshForwardedPortRow's tooltip no longer prints⇧⌘+click for system browserunconditionally. - Pinned the three hint outcomes — new
ssh-forwarded-port-row.test.tsxasserts no hint under stock settings (where a plain click already opens the system browser),click to open in Orcafor an inverting user, andclick for system browseronce Link Routing routes a plain click into Orca.
The row's click routing was already correct — handleOpenForwardInBrowser runs through resolvePortOpenInOrcaBrowser — so only the stale hint needed fixing, and it now agrees with the click because both derive from the same resolver. I verified the new test is not theatre: dropping { modifierDestination } from the label call fails two of its three cases. Re-ran the row and resolver suites (17 tests, green) and oxlint on the three changed files (0 findings). The one prior pullfrog thread is resolved and no other threads remain.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

ELI5
When your code runs on another computer, its dev server prints
http://localhost:5173. "localhost" means "the machine I am on", so on your own laptop that address points at nothing — or worse, at something completely unrelated that you happen to be running on the same port. Orca's Ports list showed you that address anyway.Now, when your laptop is talking to that other machine over an address like
100.64.1.20, and the dev server was started so that other machines are allowed to connect, the Ports list shows100.64.1.20:5173instead — the address that actually points at the right server. Copying the row copies that.Clicking a remote port still opens Orca's own browser, exactly as before, because Orca's browser tunnels through the connection and always works. If you specifically want the page in your own browser — real profile, extensions, second monitor — hold ⇧⌘ (⇧Ctrl on Windows and Linux) and click. That works whichever way your link-routing settings are set. If there is no address that could reach the server, Orca stops advertising that shortcut instead of promising something it cannot do.
What Changed
Before. On a workspace hosted by a paired Remote Orca Server, every ports surface displayed and copied
localhost:<port>— an address naming the client machine. The tooltip offered⇧⌘+click for system browseron every row, but the code behind it was gated onruntimeTarget.kind === 'local', so on a remote port the shortcut silently did nothing different.After. A remote port whose listener accepts off-host connections displays and copies the address this client is already reaching that host on. ⇧⌘+click opens it in your own browser. A remote port that nothing can reach is left exactly as it was, and its tooltip no longer offers the shortcut. A plain click is unchanged everywhere: local ports route by your Link Routing setting, remote ports go to the embedded browser.
Mechanism. Two facts Orca already had in the renderer, joined for the first time:
WorkspacePort.bindHost— the unmodified address the OS listener reported, kept alongside the normalizedconnectHost. A wildcard bind (0.0.0.0,::,*) means the kernel accepts connections on every interface. A loopback bind never leaves its own host at any address.PublicKnownRuntimeEnvironment.endpoints, tokens already redacted).clientReachableBrowserUrlForPortcombines them, andusePortClientReachabilityis the one hook every ports surface destructures for the address to show, the address to copy, the URL to offer, and the host that owns the row — so those four cannot drift apart.Three things this deliberately does not do, each of which an earlier revision of this branch got wrong:
openLinksInAppdefaults tofalse, soopenInOrcaBrowser === falseis not the modifier — it is the ordinary click. Routing on that alone would have sent every stock-settings click on a remote port out of the app. The modifier is now reported separately from the saved setting, and only an explicit gesture trades the embedded browser away.window.api.shell.openUrlreports success either way. So the reachable URL is an offer behind a gesture, and the path that always works — the embedded browser, which tunnels — stays the default.https://local.example.com:3001, that name is what its certificate is for and what any reverse proxy keys on. Substituting an IP there is strictly worse whenever the name resolves, so the advertised origin is offered unchanged. Loopback, wildcard and IP-literal advertised hosts are substituted — and so is a loopback alias such ashttp://feature.localhost:5173, which looks like a DNS name but resolves to the client's own machine.Three adjacent correctness fixes fell out of the same work:
0.0.0.0:7000listener next to remote rows was therefore attributed to the remote machine — for its address, and for its stop button. The merge already knew the answer and threw it away into a prefixed row id; it now carries the scan key as a field, on the single-host projection as well as the multi-host one.⇧⌘+click to open in Orca. The resolver now takes where a plain click on this row goes and names the destination a plain click does not reach — mirroring whatChecksPanelalready does for review links — or names nothing, when both meanings coincide.URL.host, which omits a default port, so a remote listener on :80 or :443 rendered as a bare hostname while every other row renderedhost:port.⇧⌘+click for system browserunconditionally, which repeats the plain click under stock settings and names the wrong end for an inverting user. A forward listens on this machine's loopback, so the same resolver answers it and the panel now passes the destination down.Why
The execution host owns the dev server, but the person is sitting at the client. Orca's embedded browser bridges that with a network tunnel; the system browser cannot inherit a per-session proxy, so it needs a URL that stands on its own.
Why the connection address rather than detecting a VPN or tunnel provider. A provider integration means a dependency, a detection path, and a list to maintain. The address the client already holds needs none of that and works over a LAN, a VPN, a tailnet or a public address without knowing which.
classifyRemotePairingHostnamealready distinguishes those and is reused both to decline loopback endpoints and to decline loopback-alias advertised origins.Why
bindHostrather than probing. Whether another machine may connect at all was decided when the server bound its socket. Reading it is exact and free; probing would be slow, racy, and still wrong behind a firewall.Why show the address even though the open path is gated.
localhost:5173on a remote row is not merely useless — a developer laptop very often does have something on 5173, so the old row could send a copied address to the wrong server and look like it worked. The reachable address either works or refuses the connection; it cannot silently show the wrong page. That is why display and copy follow the reachable address even though the system-browser route is opt-in.Why derive the modifier from the plain click rather than from the settings. A tooltip that names a destination the gesture does not reach is worse than no tooltip, and a gesture with no destination is worse still. Taking the plain-click landing spot as the input makes both fall out of one answer, and it is the same shape
resolveChecksPanelHostedReviewModifierDestinationalready uses, so the two surfaces cannot diverge.Why the renderer. It is the only place that holds both facts. No wire change, no new IPC, no new store, no probe.
Linked Issue
Part of #21806
This PR covers Branch A of that issue only — a wildcard-bound port on a paired Remote Orca Server — so it closes the second of the two gaps the issue lists (the Ports panel offering no system-browser option on a remote workspace) and not the first. It therefore does not close the issue, and the label is deliberate rather than an oversight.
The remaining branches, all tracked separately:
Visual Proof
The modifier on a remote port, for a user with "Invert link-routing modifier" on
This is the defect the latest round of review found, and it is the one that made the headline feature unreachable for that cohort. Both captures are the real
PortRowcomponent rendered with the same store — a remote workspace reached at100.64.1.20, one dev server bound0.0.0.0:5173and one control server bound127.0.0.1:4322— with Link Routing off and the modifier inverted. Hover states are forced on so both tooltips are visible at once.BEFORE — both rows advertise
⇧⌘+click to open in Orca, which is where a plain click already goes. The gesture does nothing on either row, and the unreachable4322advertises it too:AFTER —
5173advertises⇧⌘+click for system browserand the gesture openshttp://100.64.1.20:5173there.4322has no reachable address, so it advertises nothing:The address a remote row shows and copies
The status-bar port row, rendered from the real
PortRowcomponent againstorigin/mainand against this branch, with the same three ports and the same store: a remote dev server bound0.0.0.0:5173, a remote control server bound127.0.0.1:4322, and — in the merged all-hosts view — a listener on this laptop on0.0.0.0:7000. The client reaches the runtime at100.64.1.20.BEFORE (
origin/main) — the remote dev server readslocalhost:5173, which names this laptop:AFTER — it reads
100.64.1.20:5173. The loopback-bound remote port is untouched, and the local row in the merged view still correctly readslocalhost:7000:The tooltip on the remote port that cannot be reached — BEFORE, offering a shortcut that did nothing:
AFTER — the offer is withdrawn:
AFTER, on the port that can be reached, the shortcut is still advertised:
What these captures do not show, stated plainly: the external browser window actually loading the page. That needs two machines, and the takeover was done on one. The original author captured the display change on a real two-machine setup (macOS client paired to a Linux remote Orca server,
0.0.0.0:4321against a127.0.0.1:4322control) and confirmed there that ⇧⌘+click opened the default browser; that evidence stands and matches the row behaviour above. Which URL reachesshell.openUrlon each click path is pinned byworkspace-port-actions.test.tsandports-status-popover-rows.test.tsxrather than by a screenshot.Testing
Automated, on macOS:
pnpm tc— clean.pnpm test— full suite, 9228 files, 85824 passing. 8 files fail, none of them in or near ports: native-build parallelism, the AI-vault session scanner,browser-managerviewport ownership, a real-CLI Claude test, terminal-history tombstone retries, and three e2e harness files (cross-version wire, release checkout, worker env isolation). They are environment-sensitive on this machine and none touch a file this PR changes; the ports suites are green.pnpm run check:code-quality:changed— 0 new findings across all 7 gate configs.Honest account of what the tests actually cover, because an earlier revision of this section overstated it. The behaviour-bearing files are:
workspace-port-actions.test.ts— the open path itself, withwindow.api.shell.openUrlstubbed: a local port still opens on the stock plain click; a local port with a worktree label still opens the registered label URL; a remote port on a stock plain click stays in the embedded browser and never callsopenUrl; a remote port opens the reachable URL only when the modifier is set; and with the modifier but no reachable URL it falls back to the embedded browser. Plus the scan-key ↔ runtime-target round trip and the single-hosthostScanKeystamp.workspace-port-open-routing.test.ts— the full destination matrix: remote port with and without inverting, remote port with no reachable address, local port under all three settings combinations, and the tooltip string each one produces.ports-status-popover-rows.test.tsx— five rendered-row cases: a remote wildcard port shows and writes to the clipboard the reachable address; a remote loopback port keeps the OS-derived address and drops the hint; a local row in the merged view is not stamped with the remote host; an inverting user on a remote port sees the system-browser hint and a ⇧⌘+click callsopenUrlwith the reachable URL; and an inverting user on an unreachable remote port sees no hint at all.WorktreeCardPorts.test.tsx— the hint is absent on a local port with Link Routing off (where the plain click already opens the system browser) and present once Link Routing is on.ssh-forwarded-port-row.test.tsx— the same three hint outcomes on an SSH forward, so the two ports panels cannot drift apart.workspace-port-urls.test.ts/workspace-port-client-reachability.test.ts— the pure resolvers, including the DNS-origin passthrough, the*.localhostrefusal, the path-bearing-endpoint refusal, the IPv6 bracketing and the default-port address.Each production change was reverted one at a time and the corresponding tests confirmed to fail, then restored: the modifier resolver (8 failures), the
*.localhostguard (1), the single-host stamp (2), the default-port address (1), and the SSH row's destination threading (2).Manual, by the original author, on a real two-machine setup — a macOS desktop client paired to a Linux remote Orca server, two servers in one workspace, one bound
0.0.0.0:4321and one bound127.0.0.1:4322:4321displayed and copied the reachable address and the modifier opened it in the default browser;4322was unchanged. From the host,127.0.0.1:4322answered200; from the client the same address refused the connection, confirming the split is real and not cosmetic.Not exercised on hardware by the takeover: Windows and Linux clients. Nothing platform-dependent is touched — no paths, shells, processes — and the one shortcut string already branches on
navigator.userAgent.includes('Mac'), which both platforms are covered for in tests.AI Disclosure
Claude Opus 5, for investigation, implementation and tests, by both the original author and the maintainer who took the PR over. Every claim about existing behaviour here was read from the source.
Review
Taken over by @nwparker. The author's design — join
bindHostwith the connection endpoint, in the renderer, and letnullmean "do not offer" — was kept as-is; it is the right shape and costs no wire change. What changed is the packaging: the default click no longer moves, the reachable URL is an offer rather than a silent replacement, four duplicated derivations collapsed into one hook, the modifier now resolves from where a plain click lands rather than from settings alone, and the prose above no longer claims coverage or refusals that the code did not have.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
deviceTokenandpublicKeyB64. TheadvertisedUrlthat can now be offered toshell.openUrlis scraped only by a matcher anchored on/\bhttps?:\/\//i, so nojavascript:orfile:origin can reach it.0.0.0.0on a host with a routable address, everything that can route there could already reach it. That is a property of how the server was started, and the rawBind:value sits next to the address in the port details dialog so the two can be read together.hostScanKeyis an optional field the renderer's own merge sets and nothing sends.clientReachableUrlandsystemBrowserRequestedare optional, so a caller that omits them gets today's behaviour.SshPortsPanel. Its routing is unchanged — the newremoteHostinput defaults tofalse, which reproduces the old answer on every settings combination — while its forwarded-row tooltip now names the same destination as the workspace-port rows. An ssh-tunnelled pairing is explicitly refused, because its endpoint terminates on the client's own loopback.URLparse per row, memoised. The new hook replaces two duplicate store subscriptions per row with one.100.64.1.20:4321rather than0.0.0.0) is reachable but returnsnulltoday. Treating every non-loopback bind as reachable would be wrong — a host commonly has172.17.0.1and other bridge addresses that are non-loopback and unroutable from the client. The safe narrow extension isbindHostequal to the connected address; it is not in this PR.isUnspecifiedHostandisWildcardBindHostwere the same predicate and are now one;preferredEndpointId ?? endpoints[0]had three copies and is nowpreferredRuntimeEndpoint, which matters here because this feature's correctness argument is "we name the endpoint the transport actually dials"; the two modifier-hint strings are now the sharedgetTerminalUrlSystemBrowserHint/getTerminalUrlOrcaBrowserHintthatChecksPanelalready imports, with an optionalisMacfor tests, rather than private copies.workspace-port-actions.tscrossed the 300-line cap, so the click-routing concern moved toworkspace-port-open-routing.tsrather than suppressing the rule.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)