Skip to content

[WEP] Post-update hook for the v3 updater (Config.OnUpdateApplied) - #6203

Draft
AlbinoGeek wants to merge 1 commit into
wailsapp:masterfrom
Rethunk-AI:wep/v3-updater-on-update-applied
Draft

AlbinoGeek wants to merge 1 commit into
wailsapp:masterfrom
Rethunk-AI:wep/v3-updater-on-update-applied

Conversation

@AlbinoGeek

Copy link
Copy Markdown

Description

WEP for an optional Config.OnUpdateApplied func(previousVersion string) in the v3 updater. Init calls it once, on the first launch after Restart replaced the application, with the version that was replaced.

The motivating case is Windows: the generated NSIS installer writes DisplayVersion under 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 Init reads and deletes it even when no callback is set. A file is used instead of an environment variable because the macOS relaunch goes through open -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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • WEP (proposal only; no implementation)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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.

  • Windows
  • macOS
  • Linux

Test Configuration

Not applicable (proposal only).

Checklist:

  • (v2 only) I have updated website/src/pages/changelog.mdx with details of this PR (v3 changelog entries are added automatically)
  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

The proposal was written with an AI assistant (Claude). I reviewed it against the code in #6202.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added Bug Something isn't working v3 Documentation Improvements or additions to documentation labels Sep 30, 2026
@AlbinoGeek
AlbinoGeek force-pushed the wep/v3-updater-on-update-applied branch from 481f973 to 8468b1d Compare October 4, 2026 07:13
@AlbinoGeek
AlbinoGeek force-pushed the wep/v3-updater-on-update-applied branch from 8468b1d to 4c1fa3f Compare October 6, 2026 05:57

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Documentation Improvements or additions to documentation v3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant