brackt/app
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
..
components fix: prevent silent logout during long-running draft sessions (#49) 2026-03-01 19:33:03 -08:00
contexts feat: implement middleware and context provider for Express integration 2025-10-11 20:56:00 -07:00
hooks fix: guard against stale revalidation overwriting fresh socket data 2026-03-01 12:23:24 -08:00
lib Display team owner names instead of team names in draft UI (#24) 2026-02-22 16:56:07 -08:00
models Claude/redesign autodraft queue c4 kp r (#40) 2026-02-27 22:16:26 -08:00
routes fix: prevent silent logout during long-running draft sessions (#49) 2026-03-01 19:33:03 -08:00
services fix: correct test expectations for ICM edge cases and duplicate text queries 2026-02-17 14:24:07 -08:00
test feat: Add comprehensive scoring system database schema 2025-10-28 23:40:11 -07:00
types feat: add FIFA World Cup 48-team bracket template with group stage and projected scoring 2026-02-14 22:30:12 -08:00
utils Add Zod validation and expand export/import for EV and results data (#14) 2026-02-20 20:25:25 -08:00
welcome Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
app.css Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
root.tsx Improve error boundary UI with status-specific error pages (#21) 2026-02-21 23:47:42 -08:00
routes.ts Add commissioner time bank adjustment feature for draft (#22) 2026-02-22 16:16:51 -08:00