You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(browser): "Server (streamed)" on a server that cannot stream hosts pages through it - #35381
If you choose "Server (streamed)" but the server you're paired with can't stream pages, Orca used to open a plain desktop tab that the server didn't know about. Now Orca renders the page on this desktop as a page the server owns. The server can see it, and its traffic still goes through the server.
What Changed
Before: with Remote server workspaces = Server (streamed), a desktop paired with an orcad orca serve (whose browser engine has no screencast) handled a new browser tab like this:
The desktop opened a plain local tab the server never registered.
That tab browsed from the desktop's network, which contradicts the setting's own description: "Traffic always goes through the remote server."
The tab never showed up in orca tab list on the server, so an agent couldn't snapshot or drive the page the user was looking at.
After: the setting is treated as a rendering preference that only a server able to stream can honor. When the server can't stream, the page goes through the existing client-hosted path, so the desktop renders it as a server-owned page:
The page is listed by orca tab list.
Agents can drive it with the existing client automation.
Its traffic goes through the server's tunnel.
Unchanged:
Servers that can stream (Electron serve with a window or an offscreen backend) still render on the server.
An explicit server placement (reopen on server, links from a streamed pane) is still honored.
Mechanism:
expectsBrowserClientHosting is the one predicate that both the renderer's staging prediction and main's placement preparation use. It now only lets the setting choose server rendering when the runtime advertises browser.screencast.v1.
Main's placement preparation no longer skips the status probe when the setting is off. Only an explicit server preference still skips it.
Why
The two sides of the inventory weren't diverging because of tab sync. The desktop's tab was never a server tab in the first place: the server-render preference had no streaming server to satisfy it, and the fallback was an unregistered local tab. I fixed the shared placement predicate so the renderer and main keep agreeing. I didn't add a special case at the tab-opening call site.
Not covered here, which is why this says Refs: tabs created on the server with orca tab create while the server has its own browser engine are still headless engine pages. A desktop can only show them if orcad's engines can stream, and they can't today. Making orcad stream, or sending server CLI tabs to a paired desktop by default, is a separate design decision.
Thanks to NicolasHoferer for the detailed report and the follow-up narrowing it to browser tabs.
Visual Proof
N/A: no new UI. The change is which existing tab kind gets created. Before, it was an unregistered desktop tab; now it is a client-hosted server page, which looks the same in the tab strip.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
New tests, each of which fails on origin/main:
the shared predicate hosts on this device when the server-render setting meets a server that can't stream;
main placement preparation returns a client placement in that case, and still returns server placement when the server can stream;
the renderer policy (runtimeHostsPagesOnThisDesktop) and openWorkspaceBrowserTab route the tab through the runtime instead of creating a local tab.
I updated the tests that encoded the old behaviour: "refuse when desktop hosting is disabled" against a server that can't stream, and the main handler fixture, which had a renderer window but no screencast.
pnpm check:changed --maxWorkers=2 passes (27 checks). I did not test against a live paired orcad server.
Review
Codex review: clean. Independent review: no P0–P2. It confirmed the renderer and main stay in agreement, because a mismatch is restaged from main's live placement answer. It also confirmed that mobile, the paired web client, managed SSH deployments (they return early to the SSH browser route), WSL and older servers that lack the client-hosting capabilities are unchanged.
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
Mixed versions: only the desktop changed, and there is no new wire field. Older servers that don't advertise the client-hosting capabilities keep the old behaviour.
Platforms: no platform-specific code.
SSH: managed SSH deployments are unaffected.
Mobile: the mobile device scope is still excluded.
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)
…s pages through it
With "Remote server workspaces" set to "Server (streamed)", a paired server
that has no way to stream pages (an orcad `orca serve`: its browser engine
offers no screencast) could not take the desktop's new tabs. The desktop
fell back to a plain desktop tab the server never heard of: it browsed from
the desktop's network and never appeared in `orca tab list`, so agents could
not see or drive the page the user was on.
The setting is a rendering preference. When the server cannot stream, the
desktop now renders the page itself as a page the server owns (the existing
client-hosted path), so traffic still goes through the server and the tab is
listed and drivable from the server's CLI. Servers that can stream keep
rendering on the server; an explicit server placement is unchanged.
Refs #35156
[Medium impact] The PR appears safe to merge; no actionable issues were found.
Summary
When a paired server cannot stream pages, choosing “Server (streamed)” now uses desktop rendering while keeping the page owned by the server.
Browser pages stay server-owned when desktops render them for non-streaming servers.
Acknowledgments from nwparker:
Desktop rendering despite the server-render setting is intentional when the server cannot stream.
Pages created directly through orca tab create remain outside this fix; making those pages visible on a desktop is deferred.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[New browser page] --> B{Explicit server placement?}
B -->|Yes| S[Server placement]
B -->|No| C[Read live server status]
C --> D{Required hosting capabilities and non-mobile device?}
D -->|No| S
D -->|Yes| E{Desktop rendering selected or server cannot stream?}
E -->|No| S
E -->|Yes| F[Desktop renders a server-owned page]
F --> G[Restage from main's placement answer]
S --> G
Browser client hosting eligibility now accounts for whether a runtime supports screencast. When hosting is disabled, placement checks still run unless the preference explicitly requests server placement. Tests cover streaming and non-streaming runtimes, server placement, and opening eligible runtime routes.
Priority: Normal
Merge Risk: Low · up to da0a2
Opening a new server-rendered tab from an unavailable stream can create another unusable page. This narrow case is mergeable with owner awareness.
Pre-merge checks: 3 · 2
Failed checks: 2 warnings
Check name
Status
Explanation
Resolution
Description check
The description is detailed and covers the change, rationale, testing, scope, and checklist. However, the required Linked Issue section uses Refs #35156, which the repository template explicitly say…
Replace Refs #35156 with a valid linked issue reference that satisfies the template, such as Fixes #35156 or the repository's required issue-link format. Also document whether pnpm lint, pnpm typecheck, pnpm test, and pnpm build…
Docstring Coverage
Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 3 passed
Check name
Status
Explanation
Title check
The title clearly identifies the browser behavior change for servers that cannot stream pages.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description is detailed and covers the change, rationale, testing, scope, and checklist. However, the required Linked Issue section uses Refs #35156, which the repository template explicitly says is insufficient.
Resolution
Replace Refs #35156 with a valid linked issue reference that satisfies the template, such as Fixes #35156 or the repository's required issue-link format. Also document whether pnpm lint, pnpm typecheck, pnpm test, and pnpm build passed or are covered by CI.
Full details: Docstring Coverage
Explanation
Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 7 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches: 💡 1
📝 Generate docstrings: 💡
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Stability & Availability · Quick win
Supported by static analysis
Script executed:
sed -n '300,390p' src/renderer/src/components/browser-pane/stream-remote/remote-browser-page-pane.tsx
rg -n 'RemoteBrowserPagePane|remote-browser-page-pane|placementPreference: .server.' src/renderer/src
Repository: stablyai/orca
Length of output: 6642
Script executed:
set -o pipefail
printf'%s\n''--- browser-workspace-pane imports and mounting block ---'
sed -n '1,220p' src/renderer/src/components/browser-pane/assemble-chrome/browser-workspace-pane.tsx
printf'%s\n''--- remote pane declaration and capability/page inputs ---'
sed -n '1,150p' src/renderer/src/components/browser-pane/stream-remote/remote-browser-page-pane.tsx
printf'%s\n''--- relevant remote page and runtime capability references ---'
rg -n -F --glob '*.ts' --glob '*.tsx' -e 'screencast' -e 'BROWSER_SCREENCAST_RUNTIME_CAPABILITY' -e 'remotePageId' -e 'kind: .remote' src/renderer/src/components/browser-pane src/renderer/src/runtime src/renderer/src/lib | head -240
printf'%s\n''--- existing server reopen flow ---'
sed -n '1,180p' src/renderer/src/components/browser-pane/browser-reopen-on-server.ts
Repository: stablyai/orca
Length of output: 41423
Script executed:
set -o pipefail
printf'%s\n''--- screencast capability branch ---'
sed -n '200,245p' src/renderer/src/components/browser-pane/stream-remote/remote-browser-stream-lifecycle.ts
printf'%s\n''--- client-hosted handle predicate ---'
rg -n -F -- 'isClientHostedBrowserPageHandle' src/renderer/src/store src/renderer/src
printf'%s\n''--- handle type and placement definitions ---'
rg -n -F -- 'type RemoteBrowserPageHandle' src/renderer/src src/shared
rg -n -F -- 'placement:' src/renderer/src/store src/renderer/src/runtime src/shared | head -120
Repository: stablyai/orca
Length of output: 16880
Script executed:
set -o pipefail
printf'%s\n''--- lifecycle start/open and unsupported-error handling ---'
sed -n '1,210p' src/renderer/src/components/browser-pane/stream-remote/remote-browser-stream-lifecycle.ts
printf'%s\n''--- lifecycle error and page-removal call sites ---'
rg -n -F --glob 'remote-browser-stream-lifecycle.ts' -e 'remoteBrowserStreamUnsupportedError' -e 'closeMissingRemotePage' -e 'handleStream' -e 'restartForViewport' -e 'startStream' src/renderer/src/components/browser-pane/stream-remote/remote-browser-stream-lifecycle.ts
Repository: stablyai/orca
Length of output: 9676
Pass the explicit placement preference to the availability guard.
BrowserPane mounts RemoteBrowserPagePane for non-client-hosted handles. If screencast setup later fails because the runtime lacks browser.screencast.v1, the lifecycle marks the stream stopped; it does not remove the page or its context menu.
That action passes placementPreference: 'server', but the availability guard drops it and can allow the request when hosting is disabled. Creation then skips client placement and creates a server-hosted page that cannot stream to the desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
If you choose "Server (streamed)" but the server you're paired with can't stream pages, Orca used to open a plain desktop tab that the server didn't know about. Now Orca renders the page on this desktop as a page the server owns. The server can see it, and its traffic still goes through the server.
What Changed
orca serve(whose browser engine has no screencast) handled a new browser tab like this:orca tab liston the server, so an agent couldn't snapshot or drive the page the user was looking at.orca tab list.expectsBrowserClientHostingis the one predicate that both the renderer's staging prediction and main's placement preparation use. It now only lets the setting choose server rendering when the runtime advertisesbrowser.screencast.v1.serverpreference still skips it.Why
The two sides of the inventory weren't diverging because of tab sync. The desktop's tab was never a server tab in the first place: the server-render preference had no streaming server to satisfy it, and the fallback was an unregistered local tab. I fixed the shared placement predicate so the renderer and main keep agreeing. I didn't add a special case at the tab-opening call site.
Not covered here, which is why this says Refs: tabs created on the server with
orca tab createwhile the server has its own browser engine are still headless engine pages. A desktop can only show them if orcad's engines can stream, and they can't today. Making orcad stream, or sending server CLI tabs to a paired desktop by default, is a separate design decision.Linked Issue
Refs #35156
Thanks to NicolasHoferer for the detailed report and the follow-up narrowing it to browser tabs.
Visual Proof
N/A: no new UI. The change is which existing tab kind gets created. Before, it was an unregistered desktop tab; now it is a client-hosted server page, which looks the same in the tab strip.
Testing
New tests, each of which fails on origin/main:
runtimeHostsPagesOnThisDesktop) andopenWorkspaceBrowserTabroute the tab through the runtime instead of creating a local tab.I updated the tests that encoded the old behaviour: "refuse when desktop hosting is disabled" against a server that can't stream, and the main handler fixture, which had a renderer window but no screencast.
pnpm check:changed --maxWorkers=2passes (27 checks). I did not test against a live paired orcad server.Review
Codex review: clean. Independent review: no P0–P2. It confirmed the renderer and main stay in agreement, because a mismatch is restaged from main's live placement answer. It also confirmed that mobile, the paired web client, managed SSH deployments (they return early to the SSH browser route), WSL and older servers that lack the client-hosting capabilities are unchanged.
Agent skill upstream boundary
Notes
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)