fix: notify user when OAuth token is fully expired#15
Merged
CodeZeno merged 1 commit intoCodeZeno:mainfrom Apr 19, 2026
Merged
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
When the Claude Code OAuth token is fully expired and the CLI cannot refresh it automatically, the app silently shows
...and retries with exponential backoff forever. Users have no idea what's wrong or how to fix it (see issue #12).The root cause is in
window.rswhere all poll errors are caught byErr(_e)— the underscore discards the error variant, soTokenExpiredand a transient network failure are handled identically.Fix
window.rs: Match onpoller::PollError::TokenExpiredspecifically. Show"auth?"/"re-login"in the widget on first failure, fire a one-time Windows balloon notification with instructions, and retry every 5 minutes rather than aggressive backoff.tray_icon.rs: Addnotify_balloon()using theNIF_INFO/NIIF_WARNINGWindows API.localization/: Addtoken_expired_titleandtoken_expired_bodyfields to theStringsstruct. Currently English-only — happy to add translations if you can provide them.Testing
To reproduce: delete or corrupt
~/.claude/.credentials.json, launch the app, and observe the tray balloon + widget text change. Runclaude logout && claude loginand the app recovers on the next poll.Closes #12