Repository navigation
[WEP] Post-update hook for the v3 updater (Config.OnUpdateApplied) - #6203
Draft
AlbinoGeek wants to merge 1 commit into
Draft
AlbinoGeek wants to merge 1 commit into
AlbinoGeek wants to merge 1 commit into
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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 |
10 of 16 tasks
AlbinoGeek
force-pushed
the
wep/v3-updater-on-update-applied
branch
from
October 4, 2026 07:13
481f973 to
8468b1d
Compare
AlbinoGeek
force-pushed
the
wep/v3-updater-on-update-applied
branch
from
October 6, 2026 05:57
8468b1d to
4c1fa3f
Compare
This branch has not been deployed
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.
Description
WEP for an optional
Config.OnUpdateApplied func(previousVersion string)in the v3 updater.Initcalls it once, on the first launch afterRestartreplaced the application, with the version that was replaced.The motivating case is Windows: the generated NSIS installer writes
DisplayVersionunder the uninstall key, and a self-update leaves it stale, so Settings > Apps keeps showing the originally installed version. Migrations and one-time "what's new" notes need the same signal.The helper records the replaced version in a marker file in the temp directory, keyed by a hash of the target path, just before relaunching. The marker is deleted if the relaunch fails, and
Initreads and deletes it even when no callback is set. A file is used instead of an environment variable because the macOS relaunch goes throughopen -n, which does not pass the helper's environment on.The proposal also covers the userland alternative (the app compares a stored last-run version itself), which works today. It explains when a framework hook is still worth having and offers a documented pattern as an acceptable outcome if the maintainers prefer that.
Proposal:
v3/wep/proposals/update-applied-hook/proposal.md. Draft reference implementation: #6202.Type of change
How Has This Been Tested?
Proposal only. The reference implementation in #6202 has unit tests, which pass on Linux; the proposal's test plan lists the manual end-to-end runs still to do.
Test Configuration
Not applicable (proposal only).
Checklist:
website/src/pages/changelog.mdxwith details of this PR (v3 changelog entries are added automatically)The proposal was written with an AI assistant (Claude). I reviewed it against the code in #6202.