Repository navigation
show download progress for in-app updates - #19596
Merged
Merged
Conversation
gtritchie
requested changes
Nov 12, 2026
gtritchie
left a comment
Member
There was a problem hiding this comment.
One finding, inline. It predates this PR and isn't blocking; requesting changes is procedural until it's resolved or set aside.
gtritchie
approved these changes
Nov 12, 2026
RStudio E2E - all platformsAll tests passed!
All platforms - commit |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Intent
Addresses #17173.
After "Install and Restart", the "Downloading RStudio ..." label showed only a spinner for the whole download (~770 MB on macOS). It now also shows how far along the download is, as a percentage beside the text. Room for the percentage is set aside from the start, so the label keeps its size as the value changes.
Approach
desktopHooks.onUpdateDownloadProgress(version, percent)hook; a download arrives in thousands of chunks, so only changes are sent. A repeat request, or one for another build refused while a download runs, gets the running build's current percentage again, so GWT can show its indicator. The dock / taskbar progress bar now follows the real fraction on macOS too.autoUpdaterhas no progress event. The loopback listener that already served Squirrel its one-entry feed (nowsquirrel-relay.ts) also relays the zip from the builds site and counts the bytes. Squirrel still checks the feed's SHA-256 and size and the bundle's signature. Paths on the listener are random, so only Squirrel can start a download through it.downloadWithSquirrel()owns each download's relay andautoUpdaterlisteners: whichever of the relay and Squirrel reports first settles it (a failed relayed download is reported with the relay's reason), and both are gone once it settles. The download loop is shared with the Windows staging code (downloadArtifact()), so both get the same idle-stall timeout.SlideLabelhas an optional percentage column: a hidden sizer holding "100%" in the locale's format, with the value drawn right-aligned over it.GlobalDisplay.showPercentProgress()exposes it. The label'sprogressbarrole now carriesaria-valuenow.Tradeoffs:
Automated Tests
squirrel-relay.test.ts(new): the feed and the relayed download over real loopback requests, progress, 404 for anything but the two paths, refusal and mid-body stall reported with their reasons, and an abandoned download left for Squirrel to report.downloadWithSquirrel()is driven by a fake Squirrel that downloads over loopback and checks the checksum: success, a relay failure (its reason wins, Squirrel's later report goes nowhere), Squirrel refusing the bundle or hanging up,setFeedURL()throwing, and a retry after a failure; each case also checks that no listeners are left and the relay is closed.updater.test.ts: percentages reported once per change on macOS and Windows, clamped to 0-100, repeated for a repeat request, and ignored once a download has ended.SlideLabelTests.java(new): the column is absent unless reserved, sized for 100% when reserved, andsetPercent()updates the text andaria-valuenowwithout touching the sizer. HtmlUnit does no layout, so a computed-style test checks what keeps the width fixed: the sizer is hidden but still takes space, and the value is absolutely positioned over it.Checked by hand with a dev desktop build on macOS (a scratch Playwright spec, not committed) accepting the newest daily: the label went 1% to 100% at a constant 366 px width, and the relayed zip passed Squirrel's checksum (the unsigned dev build then refuses the bundle, as expected). Not run on Windows.
QA Notes
On macOS or Windows, accept an available update with "Install and Restart" and watch the label at the top of the window: the percentage should rise to 100% without the label changing width, and the dock / taskbar icon should show the same progress.
Documentation
None needed.
Checklist
NEWS.md(not needed: Investigate integrated auto-update mechanism for RStudio Desktop #17173 is unreleased and already has an entry)