brackt/app/components/draft
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
..
AuthRecoveryOverlay.tsx fix: prevent silent logout during long-running draft sessions (#49) 2026-03-01 19:33:03 -08:00
AvailableParticipantsSection.tsx feat: add hide completed sports filter to AvailableParticipantsSection (#47) 2026-02-28 23:16:06 -08:00
ConnectionOverlay.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
DraftGridSection.tsx fix: address code review issues from draft board scrolling and team creation changes (#35) 2026-02-24 10:01:27 -08:00
ParticipantSelectionDialog.tsx fix: prevent iOS Safari viewport zoom on draft room form inputs (#45) 2026-02-27 23:46:09 -08:00
QueueSection.tsx Claude/redesign autodraft queue c4 kp r (#40) 2026-02-27 22:16:26 -08:00
RecentPicksSection.tsx feat: Implement draft room redesign with collapsible sidebar and tabbed content 2025-10-25 03:23:41 -07:00
SidebarRecentPicks.tsx Show all draft picks in sidebar with scroll instead of last 10 (#33) 2026-02-23 22:25:28 -08:00
TeamsDraftedGrid.tsx Make draft room fully usable on mobile (#30) 2026-02-22 22:36:12 -08:00