Repository navigation
fix(update): ask before downloading, and let the user say later - #576
Merged
Merged
Conversation
Closes #353. The chip started a download of unknown size on a single click, and there was no way to put it off — it simply stayed there. Clicking now opens a small confirmation with the version, a link to the release notes, and two choices. Download starts it; Later hides the chip. Later is recorded as the version it applied to, not a flag. A newer release still surfaces: "later" means later for this update, not silence for every update. It is not persisted either — a dismissal should not outlive the run it was made in. Two things the issue asks for are deliberately absent. It wants the size — "Download 100 MB and restart now?". The length is not known until the download starts, when the Started event carries it. An invented estimate would be worse than no number. And it wants the copy to say the app will restart when the download completes. That stopped being true in #573: downloading and restarting are separate, and the restart asks separately. The panel says so instead, and a test asserts the wording does not promise a restart this code no longer performs. Four tests. Two fail against the previous version; the other two describe behaviour that did not exist to fail. Three existing tests now click through the confirmation, since that is the path a user takes. Co-Authored-By: Claude Opus 5 <[email protected]>
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.
Closes #353. Last of the update-system work.
The chip started a download of unknown size on a single click, and there was no way to put it off — it just stayed there.
Clicking now opens a small confirmation: the version, a link to the release notes, Download and Later.
"Later" is per version, and per session
Recorded as the version it applied to rather than a flag, so a newer release still surfaces — later means later for this update, not silence for every update. Not persisted either: a dismissal shouldn't outlive the run it was made in.
Two things the issue asks for that I deliberately left out
The download size. It wants "Download 100 MB and restart now?". The length isn't known until the download starts, when the
Startedevent carries it. An invented estimate would be worse than no number.The restart claim. The issue's copy says the app will restart when the download completes. That stopped being true in #573 — downloading and restarting are separate now, and the restart asks separately. The panel says "SQLPilot will ask before restarting", and there's a test asserting the wording doesn't promise a restart this code no longer performs.
Tests
Four. Two fail against the previous version; the other two describe behaviour that didn't exist to fail. Three existing tests now click through the confirmation, since that's the path a user takes.
1841 unit + 303 browser; tsc/dprint/eslint clean.
The update system is now done
.dmg; tarballs discarded🤖 Generated with Claude Code