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
feat(browser): tell the desktop where a Server (streamed) page's download was saved - #47177
When a page in a Server (streamed) browser tab downloaded a file, nothing told you. The file went into the server's Downloads folder without a word. Now a notice says where it's going and which server it's on, and then where it was saved.
Files
Added
Deleted
Net
Test
0
0
0
0
Prod
12
$\color{#1a7f37}{\Huge{\mathbf{+}}}$163
$\color{#cf222e}{\Huge{\mathbf{−}}}$50
$\color{#1a7f37}{\Huge{\mathbf{+}}}$113
What Changed
Before: download events go only to a renderer window, and a Server (streamed) page has none, so the server saved the file silently.
After:
The browser manager also reports each page's downloads to "download viewers", keyed by browser page id (watchDownloads). The start event goes out once, when the download is tied to its tab. The finish event goes out on every finish path, with the same payloads a local window gets.
The desktop shows a notice when the download starts: "Downloading to <path> on <server>". When the finish arrives, the same toast becomes the toast This-device pages already show: "Saved to <path> on <server>", "Download canceled." or the failure. The server name comes from the host's display label.
Why
The start notice is a plain toast, not a loading one. It already says where the file goes, so a pane that stops streaming can't leave a spinner behind, and can't hide where the file went. Hiding a tab or switching workspace closes the stream before the finish arrives. Codex and the Claude reviewer both caught this with the first version's loading toast.
The finish toast reuses the This-device copy and code. Moving the file to this computer is still parked as a product call (H2/M24).
Linked Issue
No issue. This is gap M21 from the remote browser parity audit. M6 shipped in #47150, and the phone (M44) follows.
Visual Proof
Paired setup: a hidden dev desktop paired to a worktree-built orca serve named "Streamed prompts probe".
Before: the page downloads a file. Nothing appears, and the file lands in the server's Downloads.
After, while downloading:
After, once saved:
Testing
Real paired run on macOS (Playwright, hidden Electron client paired to a headless orca serve built from this branch, ORCA_BACKGROUND_LAUNCH=1). The page downloaded a 64 KB file that finished 4 s later. The start notice appeared within 300 ms and was replaced by "Saved to …" when the download finished. On main, no toast appeared.
No new unit test. The change is event wiring and UI copy, which the repo's test rules say not to unit-test.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Performance
None, because the stream carries two events per download, start and finish (progress isn't forwarded), and only to viewers that opted in.
Risk
Mixed versions: an older desktop never sends downloads: 1, so a new server sends nothing new. An older server strips the param, so a new desktop sees what it saw before.
Local and This-device downloads are unchanged. They take the same renderer sends, startedSent, payload and agent claims; the requested payload is now built by one helper used by both paths.
The notice shows the server's full save path to the person streaming the page, who already has workspace access to it.
Backing out is a plain revert.
Level: Low
AI Disclosure
Review
One review-loop round (Codex + Claude). Both raised the same P1: a loading toast could stay stuck when the stream closed mid-download. Fixed by making the start notice a normal toast that names the destination, and by dropping progress. No other findings.
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
New copy: browser.serverPage.download.started, "Downloading to {{path}} on {{host}}". Held for UI review. Cross-platform: Windows save paths have their file name split on \ too. SSH: not involved. Mobile: the phone doesn't opt in yet.
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)
I stated the risk: what could break, for whom, and how to back it out
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)
No actionable comments were generated in the recent review.
Walkthrough
The screencast parameter and result contracts now include download events. The download lifecycle publishes request and completion events to page-keyed listeners, and viewer subscriptions can register and clean up download watchers. The remote screencast renderer requests these events and displays notices with the save path and host.
Merge Risk: Minimal · up to ee2af
Server (streamed) page downloads now show a start notice and then a saved, cancelled or failed notice on the desktop. The change is small and opt-in through the downloads flag. No merge-blocking risk is evident. A possible gap, if popup pages key downloads differently, would only cost them the notice.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "feat(browser): tell the desktop where a Server (streamed) page's download was saved" matches the main change. The changeset adds download start and finish events for screencast viewers that…
Description check
The description follows the repository template. It includes ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, Agent skill upstream boundary, Note…
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: Title check
Explanation
The title "feat(browser): tell the desktop where a Server (streamed) page's download was saved" matches the main change. The changeset adds download start and finish events for screencast viewers that opt in with downloads: 1, and the desktop shows a notice with the save path and server. The title states the primary change in one concise line, uses a conventional prefix, and avoids file lists or vague terms. It is a little long at 83 characters, but it is clear and specific.
Full details: Description check
Explanation
The description follows the repository template. It includes ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist. The before and after are explained, the mechanism is described (watchDownloads, downloadRequested/downloadFinished events, opt-in downloads: 1), and the risk and rollback are stated. The Linked Issue section has no issue number and says 'No issue', which conflicts with the template's requirement for outside contributors. The Risk section does not set a level beyond 'Low', which is acceptable. The AI Disclosure section is empty. The Testing section relies on one manual run and states that no unit test was added, and the Visual Proof section includes before and after images. The author is a maintainer per the objectives, so the missing issue is a minor gap rather than a failure. The description is mostly complete.
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; 2 remain after this review.
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
When a page in a Server (streamed) browser tab downloaded a file, nothing told you. The file went into the server's Downloads folder without a word. Now a notice says where it's going and which server it's on, and then where it was saved.
What Changed
Before: download events go only to a renderer window, and a Server (streamed) page has none, so the server saved the file silently.
After:
watchDownloads). The start event goes out once, when the download is tied to its tab. The finish event goes out on every finish path, with the same payloads a local window gets.downloads: 1receivesdownloadRequestedanddownloadFinishedevents. This reuses the after-readyhook from fix(browser): Server (streamed) pages ask for permissions, sign-in and opening apps on the desktop #47150, now namedstartViewerEvents, which covers prompts and downloads.<path>on<server>". When the finish arrives, the same toast becomes the toast This-device pages already show: "Saved to<path>on<server>", "Download canceled." or the failure. The server name comes from the host's display label.Why
The start notice is a plain toast, not a loading one. It already says where the file goes, so a pane that stops streaming can't leave a spinner behind, and can't hide where the file went. Hiding a tab or switching workspace closes the stream before the finish arrives. Codex and the Claude reviewer both caught this with the first version's loading toast.
The finish toast reuses the This-device copy and code. Moving the file to this computer is still parked as a product call (H2/M24).
Linked Issue
No issue. This is gap M21 from the remote browser parity audit. M6 shipped in #47150, and the phone (M44) follows.
Visual Proof
Paired setup: a hidden dev desktop paired to a worktree-built
orca servenamed "Streamed prompts probe".Before: the page downloads a file. Nothing appears, and the file lands in the server's Downloads.

After, while downloading:

After, once saved:

Testing
Real paired run on macOS (Playwright, hidden Electron client paired to a headless
orca servebuilt from this branch,ORCA_BACKGROUND_LAUNCH=1). The page downloaded a 64 KB file that finished 4 s later. The start notice appeared within 300 ms and was replaced by "Saved to …" when the download finished. On main, no toast appeared.remote-browser-stream-lifecycle.test.tspasses.pnpm check:changedpasses.No new unit test. The change is event wiring and UI copy, which the repo's test rules say not to unit-test.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Performance
None, because the stream carries two events per download, start and finish (progress isn't forwarded), and only to viewers that opted in.
Risk
Mixed versions: an older desktop never sends
downloads: 1, so a new server sends nothing new. An older server strips the param, so a new desktop sees what it saw before.Local and This-device downloads are unchanged. They take the same renderer sends,
startedSent, payload and agent claims; the requested payload is now built by one helper used by both paths.The notice shows the server's full save path to the person streaming the page, who already has workspace access to it.
Backing out is a plain revert.
Level: Low
AI Disclosure
Review
One review-loop round (Codex + Claude). Both raised the same P1: a loading toast could stay stuck when the stream closed mid-download. Fixed by making the start notice a normal toast that names the destination, and by dropping progress. No other findings.
Agent skill upstream boundary
Notes
New copy:
browser.serverPage.download.started, "Downloading to {{path}} on {{host}}". Held for UI review. Cross-platform: Windows save paths have their file name split on\too. SSH: not involved. Mobile: the phone doesn't opt in yet.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)