fix(updater): honor Later reminder cooldown - #602
Open
beruro wants to merge 4 commits into
Open
Conversation
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.
Problem
Choosing Later only hid the transient install prompt. The next automatic update trigger—startup, interval, foreground, online recovery, or retry—would prepare the already-downloaded update and unconditionally make the prompt visible again.
There was durable state for Skip this version, but no durable, version-scoped state for postponing a reminder.
Solution
The resulting invariant is: automatic preparation may show the install prompt only when the current version has no active reminder deadline.
Potential risks
Audit
Architecture audit covered all 10 layers. Compilation, call-path ownership, naming, default-branch exhaustiveness, persisted JSON shape, production/test entry parity, and resolver symmetry were applicable and passed. Wire/network payload changes, Rust initialization, and cross-domain leakage were not applicable. The audit also replaced ambiguous boolean arguments with a named prompt policy and reduced the automatic test seam to the minimal retry callback.
frontend-ui-auditwas intentionally skipped because its methodology excludes single bug-fix PRs and this change does not alter markup, styling, design-system usage, or accessibility behavior.Performance verdict: pass.
Verification
npx vitest run src/scaffold/AppUpdater/index.test.ts src/scaffold/AppUpdater/appUpdaterCoordinator.test.ts src/scaffold/AppUpdater/appUpdaterScheduler.test.ts— 34 tests passednpx eslint src/scaffold/AppUpdater/index.tsx src/scaffold/AppUpdater/index.test.tsnpm run typecheckgit diff --checklint-stagedand scoped TypeScript checks