brackt/app/routes
Chris Parsons 5f23885097
fix: prevent silent logout during long-running draft sessions (#49)
Clerk's short-lived JWTs (60s) can expire when browser tabs are
backgrounded and the SDK's refresh interval is throttled. This left
users silently logged out — actions returned 401s shown as generic
error toasts with no recovery path.

Prevention: refresh the Clerk JWT on tab visibility change so the
token is always fresh when the user returns from a backgrounded tab.

Detection: replace all 12 raw fetch() calls with an authFetch wrapper
that catches 401 responses and sets an authDegraded state, triggering
a blocking recovery overlay instead of confusing toasts.

Recovery: AuthRecoveryOverlay (mirrors ConnectionOverlay pattern)
prompts the user to reload the page, which re-authenticates via
Clerk's long-lived session cookie.

Also adds missing try/catch to handleStartDraft, handleMakePick,
handleForceAutopick, handleForceManualPick, and handleReplacePick
which previously had no network error handling.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 19:33:03 -08:00
..
api Claude/redesign autodraft queue c4 kp r (#40) 2026-02-27 22:16:26 -08:00
leagues fix: prevent silent logout during long-running draft sessions (#49) 2026-03-01 19:33:03 -08:00
teams feat: add random team name generation and improve league exit flow 2025-10-14 22:45:24 -07:00
admin._index.tsx feat: implement daily standings snapshot system with admin management interface 2025-11-14 09:15:58 -08:00
admin.data-sync.tsx Add Zod validation and expand export/import for EV and results data (#14) 2026-02-20 20:25:25 -08:00
admin.participants.tsx feat: add admin routes and checkbox component for sports management 2025-10-12 21:54:49 -07:00
admin.sports-seasons.$id.events.$eventId.bracket.server.ts feat: add FIFA World Cup 48-team bracket template with group stage and projected scoring 2026-02-14 22:30:12 -08:00
admin.sports-seasons.$id.events.$eventId.bracket.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.sports-seasons.$id.events.$eventId.server.ts feat: Implement Qualifying Points Standings component and related logic 2025-11-11 10:08:25 -08:00
admin.sports-seasons.$id.events.$eventId.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.sports-seasons.$id.events.server.ts feat: Implement Qualifying Points Standings component and related logic 2025-11-11 10:08:25 -08:00
admin.sports-seasons.$id.events.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.sports-seasons.$id.expected-values.server.ts Refactor expected values form to batch save all participants (#4) 2026-02-19 15:57:05 -08:00
admin.sports-seasons.$id.expected-values.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.sports-seasons.$id.futures-odds.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.sports-seasons.$id.participants.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.sports-seasons.$id.recalculate-probabilities.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.sports-seasons.$id.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.sports-seasons.new.tsx feat: Implement Qualifying Points Standings component and related logic 2025-11-11 10:08:25 -08:00
admin.sports-seasons.tsx feat: add bulk participant creation and expected value field 2025-10-15 21:21:33 -07:00
admin.sports.$id.tsx feat: add icon support for sports with file upload and active seasons display 2025-10-13 10:30:47 -07:00
admin.sports.new.tsx feat: add icon support for sports with file upload and active seasons display 2025-10-13 10:30:47 -07:00
admin.sports.tsx feat: add icon support for sports with file upload and active seasons display 2025-10-13 10:30:47 -07:00
admin.standings-snapshots.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.templates.$id.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.templates.new.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
admin.templates.tsx feat: add admin routes and checkbox component for sports management 2025-10-12 21:54:49 -07:00
admin.tsx feat: add admin routes and checkbox component for sports management 2025-10-12 21:54:49 -07:00
api.admin.export-sports-data.ts feat: add admin routes and checkbox component for sports management 2025-10-12 21:54:49 -07:00
home.tsx Include commissioner leagues in user's active leagues (#8) 2026-02-20 10:28:37 -08:00
how-to-play.tsx Add rules page, rewrite how-to-play, and fix scoring display (#20) 2026-02-21 21:58:51 -08:00
i.$inviteCode.tsx feat: add invite code system for league seasons with member access control 2025-10-14 12:20:36 -07:00
rules.tsx Add rules page, rewrite how-to-play, and fix scoring display (#20) 2026-02-21 21:58:51 -08:00
test-socket.tsx fix: eliminate socket ghost connection and stale state on reconnect (#38) 2026-02-24 12:24:04 -08:00
user-profile.tsx feat: add user model, routes, and Clerk webhook integration 2025-10-11 00:53:39 -07:00