fix: clear dismissal flags when manually checking for updates#147
fix: clear dismissal flags when manually checking for updates#147AnthonyRonning merged 1 commit intomasterfrom
Conversation
When users click "Check for Updates" in the menu, clear the UPDATE_DOWNLOADED flag and CURRENT_VERSION to ensure they always get prompted for available updates, even if they previously dismissed the update notification. This fixes the issue where manually clicking "Check for Updates" would not show the update prompt after a user had previously dismissed it. Co-authored-by: Anthony <AnthonyRonning@users.noreply.github.com>
WalkthroughThe event handler for the "Check for Updates" menu action in the Tauri frontend was updated to clear any previously set update dismissal flags before initiating an update check. This ensures that update prompts will always display, even if previously dismissed. Additional logging was added to indicate when these flags are cleared. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant App
participant UpdateChecker
User->>App: Clicks "Check for Updates"
App->>App: Clear UPDATE_DOWNLOADED flag
App->>App: Clear CURRENT_VERSION string
App->>UpdateChecker: Initiate update check
UpdateChecker-->>App: Returns update status
App-->>User: Display update prompt if available
Assessment against linked issues
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Clippy (1.86.0)warning: failed to write cache, path: /usr/local/registry/index/index.crates.io-1949cf8c6b5b557f/.cache/3/l/log, error: Permission denied (os error 13) Caused by: 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (2)📓 Common learningsfrontend/src-tauri/src/lib.rs (1)🔇 Additional comments (3)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Greptile Summary
This PR implements a user experience improvement for the update checking functionality in the desktop application. When a user manually triggers 'Check for Updates' from the menu, the code now clears two internal flags (UPDATE_DOWNLOADED and CURRENT_VERSION) that were previously preventing update notifications from appearing if a user had dismissed them.
The change consists of adding a clear mechanism in the update check event handler that:
- Sets
UPDATE_DOWNLOADEDatomic boolean to false - Clears the
CURRENT_VERSIONmutex-protected value
This modification ensures that manual update checks always show available updates to users, while preserving the existing behavior for automatic checks to prevent notification spam.
Confidence score: 4/5
- This PR is safe to merge with minimal risk of adverse effects
- The changes are focused, well-documented, and only affect user-initiated update checks without modifying the core update logic
- The mutex locking logic in
CURRENT_VERSION.lock()should be reviewed carefully for potential deadlock scenarios
1 file reviewed, no comments
Edit PR Review Bot Settings | Greptile
Fixes #146
When users click "Check for Updates" in the menu, clear the UPDATE_DOWNLOADED flag and CURRENT_VERSION to ensure they always get prompted for available updates, even if they previously dismissed the update notification.
This fixes the issue where manually clicking "Check for Updates" would not show the update prompt after a user had previously dismissed it.
🤖 Generated with Claude Code
Summary by CodeRabbit