brackt/app/hooks
Chris Parsons 0eb6715655
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 2m51s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m26s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
Fix draft timer bugs: broadcasts, increments, reconnect sync, and overnight pause
- Broadcast timer-bank-updated after every pick so all connected clients
  immediately see the updated time bank (was only visible on next timer-pick-started)
- Capture pickMadeAt at route entry (before auth/DB overhead) and use Math.ceil
  so credited seconds always match the client countdown display
- Clear picksExpiresAt on every pick so _schedulePickForSeason starts fresh
- Hold schedulingInProgress lock for full timer callback to prevent the recovery
  interval from scheduling a duplicate timeout mid-pick
- Fix force-autopick route: call rescheduleTimer so the next team's clock
  starts immediately instead of waiting for the old timeout to fire naturally
- Fix draft.adjust-time-bank for on-clock teams: shift picksExpiresAt by the
  adjustment and reschedule, so the client countdown updates; block adjustments
  that would reduce the bank to zero
- Add timer-pick-started / timer-overnight-paused / timer-bank-updated socket
  events with full type definitions; replace dead timer-update event
- Fix draft-state-sync to include expiresAt for the active timer and
  isOvernightPause state so reconnecting clients see accurate countdown and
  pause banner immediately
- Fix room-closure countdown: capture client-side timestamp when draft completes
  so countdown runs even before the loader revalidates with draftCompletedAt
- Run countdown interval at 500ms with Math.ceil to prevent skipped seconds
- Add draft-started socket handler to transition pre-draft UI without a refresh
- Fix overnight pause: canPick only blocks on commissioner pause, not overnight
  pause (timer freezes but player can still pick early)
- Extract checkOvernightPause to server/overnight-pause-check.ts, breaking the
  timer↔socket circular import and ensuring the timezone cache is shared and
  evicted correctly across both callers
- Fix PostgreSQL varchar=uuid type mismatch in getTeamTimezone join

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 22:51:43 -07:00
..
__tests__ Fix unhandled rejection from session ping when network is unavailable (#56) 2026-05-27 16:14:14 +00:00
useDraftAuthRecovery.ts Fix unhandled rejection from session ping when network is unavailable (#56) 2026-05-27 16:14:14 +00:00
useDraftNotifications.ts Fix oxlint warnings: no-shadow, consistent-function-scoping, no-non-null-assertion, and others (#196) 2026-03-21 10:59:51 -07:00
useDraftRoomState.ts Show "Syncing Draft State..." overlay during draft reconnection (#361) 2026-04-30 20:33:00 -07:00
useDraftSocket.ts Change Socket.IO connection error logging from error to log level (#448) 2026-05-19 15:47:41 -07:00
useDraftSocketEvents.ts Fix draft timer bugs: broadcasts, increments, reconnect sync, and overnight pause 2026-06-05 22:51:43 -07:00
useFocusTrap.ts fix: resolve all 48 WCAG 2.2 AA accessibility issues (#439) 2026-05-17 20:11:38 -07:00
useLocalTimezone.ts Simplify sports season display and add local timezone hints (#434) 2026-05-15 16:04:07 -07:00
useMediaQuery.ts fix: eliminate queue tab flash on mobile by using useSyncExternalStore (#46) 2026-02-28 09:54:14 -08:00
useRoundTransition.ts Add Storybook stories for new components from staged changes (#321) 2026-04-23 22:09:25 -07:00
useSortableData.ts Fix oxlint errors. 2026-03-22 20:41:44 -07:00