Spaces:
Paused

icebear icebear0828 Claude Opus 4.6 commited on
Commit
1b6fb15
·
unverified ·
1 Parent(s): 20b98cc

fix: Electron OAuth login + i18n layout shift + update modal (#53)

Browse files

* fix: Electron OAuth login + i18n toggle layout shift + update modal

1. OAuth login fix for Electron:
- Add focus/visibilitychange listeners to detect new accounts immediately
when user switches back from system browser (bypasses Chromium throttling)
- Track completed sessions server-side so code-relay returns success
instead of "Invalid or expired session" after callback server handled it

2. i18n layout stability:
- Push Star/Updates buttons from md to lg breakpoint to reduce crowding
- Add inline-grid overlay to Star, Check for Updates, Proxy Settings buttons

3. Update modal: extract from Header into standalone UpdateModal component
with auto-restart support (git mode spawns new process, frontend auto-refreshes)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add polling guard + fix Star button inline-grid reference width

- Add re-entrancy guard to checkForNewAccount (both shared/ and web/)
to prevent concurrent fetches from rapid focus/visibility events
- Fix Star button invisible reference text "Star" → "Star on GitHub"
so inline-grid actually prevents layout shift between languages

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: icebear0828 <icebear0828@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

12 files changed +447 -124
Files changed (12)
CHANGELOG.md+4
shared/hooks/use-accounts.ts+29-6
shared/hooks/use-update-status.ts+63-5
shared/i18n/translations.ts+8
src/auth/oauth-pkce.ts+19
src/index.ts+18-1
src/routes/auth.ts+14
src/self-update.ts+30-3
web/src/App.tsx+34-11
web/src/components/Header.tsx+19-92
web/src/components/UpdateModal.tsxAdded+180
web/src/hooks/use-accounts.ts+29-6