brackt/app/hooks
Chris Parsons e3a7a1a9b1
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 1m24s
🚀 Deploy / ʦ TypeScript (pull_request) Successful in 1m13s
🚀 Deploy / 🔍 Lint (pull_request) Successful in 45s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
Fix autodraft settings panel not reflecting auto-disable after pick
When next_queue autodraft fires and turns itself off, two bugs prevented
the UI from behaving correctly:

1. After reconnect, useDraftAuthRecovery synced autodraftStatus (draft
   grid) but not userAutodraft (settings panel), leaving the settings
   badge stale until the next page load.

2. Toast notifications for autodraft auto-disable were unreliable: the
   condition checked prev.mode rather than why the server disabled it,
   causing the wrong toast for manual disables and queue-empty events.

Fix the reconnect sync by calling setUserAutodraft in the revalidation
effect alongside setAutodraftStatus. Fix the toast logic by adding a
reason field ("pick_complete" | "queue_empty") to the server's
autodraft-updated emit, so the client can show the right message without
guessing from local state. Also removes the now-unused userAutodraftRef.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 18:29:13 -07:00
..
__tests__ fix: guard against stale revalidation overwriting fresh socket data 2026-03-01 12:23:24 -08:00
useDraftAuthRecovery.ts Fix autodraft settings panel not reflecting auto-disable after pick 2026-05-23 18:29:13 -07: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 autodraft settings panel not reflecting auto-disable after pick 2026-05-23 18:29:13 -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