Skip to content

fix(updater): clear snoozes when a new version becomes available#149

Merged
quiet-node merged 1 commit intomainfrom
fix/clear-snooze-on-new-version
May 7, 2026
Merged

fix(updater): clear snoozes when a new version becomes available#149
quiet-node merged 1 commit intomainfrom
fix/clear-snooze-on-new-version

Conversation

@quiet-node
Copy link
Copy Markdown
Owner

Summary

A "Later" click against v0.8.2 should not silently suppress the update banner once v0.8.3 ships. Previously, snooze deadlines persisted across versions: a user who clicked Later at v0.8.2 would not see the v0.8.3 banner in Settings or chat for up to 24 hours after v0.8.3 was actually available.

Why this was a real bug

The original spec called this out explicitly:

Per-surface snooze. Snoozing the Settings banner does NOT snooze the chat footer, etc... New version always clears snooze.

The "new version always clears" half wasn't implemented. The two snooze flags lived on a wall-clock deadline alone, with no awareness of which version they were originally set against.

Implementation

  • New sidecar field last_seen_update_version: Option<String> records the version the manifest last surfaced. Survives across launches via the existing JSON sidecar in the app config dir. Marked #[serde(default)] so older sidecars still load cleanly.
  • UpdaterState::set_update compares the incoming available version against last_seen_update_version. When they differ and the new value is Some, both snooze deadlines are cleared in-memory and the cached version is rolled forward.
  • lib.rs startup restores last_seen_update_version from the sidecar before the first poll so the comparison correctly distinguishes "same version, snooze still applies" from "new version, snooze invalidated."
  • poller::check_once persists the sidecar after a successful version detection so cleared snoozes survive an app restart. commands::persist_sidecar is now pub to allow this cross-module call.

Test plan

  • bun run test:all:coverage clean (100% line and function coverage maintained)
  • bun run validate-build clean
  • New unit tests cover four cases:
    • New version arrives → both snoozes clear
    • Same version polled again → snoozes preserved
    • First-ever-seen version → records the version, no spurious clear
    • set_update(None) (no update available) → snoozes untouched
  • Manual: in v0.8.2, click Later in Settings; quit; relaunch; observe banner stays hidden (snooze preserved). When v0.8.3 ships and the poll detects it, banner returns.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
@quiet-node quiet-node merged commit c672409 into main May 7, 2026
3 checks passed
@quiet-node quiet-node deleted the fix/clear-snooze-on-new-version branch May 7, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant