You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: add cancel button to ChatGPT login when OAuth in progress (#172)
## Summary
When user starts ChatGPT OAuth login and then closes the browser without
completing authorization, the loading state would stay stuck **for up to
5 minutes** because the `waitForCode` promise would not resolve/reject
until timeout. During this time, the UI was disabled and user couldn't
do anything.
Fix this by two improvements:
1. **Add a manual Cancel button** when in loading state - user can
immediately reset the UI and try login again without waiting for timeout
2. **Shorten callback timeout** from 5 minutes → 2 minutes for better UX
even if user forgets to cancel
## Screenshot
Before (stuck forever / 5min):

*(provided by user)*
After (user can cancel):
The loading state now shows a "Cancel" button next to the in-progress
button.
## Testing
- Click "Login with ChatGPT Plus"
- Browser opens → close browser immediately
- Back to app → click "Cancel"
- UI resets, you can click login again
## Checklist
- [x] Code is typed with TypeScript (`strict: true`)
- [x] Pre-push typecheck + lint passes
- [x] Fix follows project conventions (no new dependencies, minimal
changes)
- [x] Fix addresses the root cause (user closes browser → no code
arrives → stuck)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Signed-off-by: Sun-sunshine06 <Sun-sunshine06@users.noreply.github.com>
Co-authored-by: Sun-sunshine06 <Sun-sunshine06@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments