Repository navigation
Conversation
…#1317) The update banner's dismiss button only wrote component-local state, so every restart brought the same notice back for a version the user had already declined. Record the dismissed version through a new `updatesDismiss` IPC channel into host settings (`updateDismissedVersion`), surface it as a `dismissed` flag on UpdateState, and clear it when a newer version is discovered so future releases keep notifying. Validated: update-preference tests 6/6, auto-update tests 8/8, desktop typecheck clean, cargo fmt --check clean. host-core test run requires a Rust toolchain and is left to CI. Fixes vastsa#1317
|
Thanks for the focused persistence change. The manual-mode reappearance is real, and saving the dismissed version addresses that path. I can’t merge this as a complete fix for #1317 yet: the issue also explicitly reports that dismissing in in-app mode should stop the background download. Here, dismiss() only sets the dismissed flag and persists the version; it leaves the updater in in-app mode with autoDownload enabled, so the download continues after the banner hides. Please cover that behavior with a controller-level regression test, or narrow the PR/issue claim so it does not mark the unresolved behavior fixed. This head also predates current main and needs refreshing before a landing review. Thanks for the work. |
|
Thanks for the original persistence fix. I completed the in-app path so dismissal also cancels the active download and prevents that release from restarting automatically. The maintainer follow-up #1339 has merged, with your original commit retained in its history. I’m closing this PR to avoid landing the same fix twice. Thanks for the contribution. |
|
The completed maintainer follow-up #1339 is merged. |
|
确认关闭合理:刚把分支对最新 |
Problem
In manual update mode, the update banner's dismiss (×) button only wrote component-local React state (
useStateinUpdateBanner.tsx). Every app restart re-showed the same notice for a version the user had already declined (issue #1317, problem 1 — update dismissal not persisted). Problem 2 of that issue (asktool cards reappearing) is already fixed by #1309.Fix
Record the dismissal durably instead of in component memory:
updatesDismissIPC channel;UpdateBannercalls it when the user dismisses.AppUpdaterController.dismiss()stores the version and persists it via the existing host settings channel asupdateDismissedVersion(mirrors the existinglastNotifiedUpdateVersionpersistence wiring).UpdateStategains adismissedflag; the banner hides from the pushed flag, so the decision survives restarts.validate_settings_valuevalidates the new key (non-empty string up to 128 chars, or null to clear), with regression tests.Validation
update-preference.test.mjs6/6 pass (incl. new regression test asserting the banner consumesupdate.dismissedand callsapi.updatesDismiss())auto-update.test.mjs8/8 passtsc --noEmitclean;cargo fmt --checkcleanFixes #1317