fix: implement proper VALIDATION_REQUIRED error handling with progressive cooldown#338
fix: implement proper VALIDATION_REQUIRED error handling with progressive cooldown#338aaronsewall wants to merge 2 commits intoNoeFabris:devfrom
Conversation
…sive cooldown - Add structured ErrorInfo detection for VALIDATION_REQUIRED errors - Fix getMinWaitTimeForFamily to properly handle account cooldowns - Implement progressive cooldown schedule (10m → 1h → 6h → 24h) - Add verification URL storage and display - Return synthetic error with visible verification URL to users - Add verification-required badge (magenta) in auth menu - Add 'Clear verification block' action for manual recovery - Clear verification state on successful API calls - Add comprehensive tests for cooldown and verification logic Fixes NoeFabris#335
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This is probably over-engineered but the goal was to make it easy to surface the verification URL to the user when it occurs. 🤷 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b9e598c89
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (account.cooldownReason === 'verification-required') { | ||
| options.push({ | ||
| label: 'Clear verification block (I verified my account)', | ||
| value: 'clear-verification', | ||
| color: 'green', |
There was a problem hiding this comment.
Wire up clear-verification action to state reset
This menu option introduces a new clear-verification action, but nothing in the caller handles it: promptLoginMode only reacts to delete, refresh, and toggle, so choosing “Clear verification block” performs no state change and the cooldown remains in place. That means users who actually verified their account have no way to unblock it via the CLI, despite the UI implying they can. Please add handling to call AccountManager.clearVerificationCooldown (or equivalent) and persist the updated storage when this action is selected.
Useful? React with 👍 / 👎.
|
I'm not thrilled with this after testing it. The toast notifications are fine, but using opencode cli the error messages are ugly and kind of "flood" the terminal (error characters extend past the screen). On reloading the session the chat message for the error is actually ok looking. Not quite sure how to solve that. I also can't actually test the |
Summary
This PR implements comprehensive fixes for the VALIDATION_REQUIRED error handling issue (#335).
Changes
Error Detection & Handling
Account Management
UI Improvements
Testing
Fixes
Fixes #335