brackt/app
Chris Parsons a91c108393
Some checks failed
🚀 Deploy / 🧪 Test (pull_request) Successful in 2m35s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Failing after 1m15s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
Fix draft timer display drifting due to server-client clock skew
The countdown display used data.expiresAt (a server-side Unix timestamp)
subtracted from client Date.now(). When the server clock is ahead of the
client by ~2-3s (observed in production), the display inflated by that
delta — causing 2:02 instead of 2:00 on pick start, short-crediting the
chess clock increment, and the commissioner's adjust-time-bank dialog
disagreeing with the visible countdown.

Fix: replace all server expiresAt timestamps with a client-local expiry
computed from the server-provided timeRemaining integer
(Date.now() + timeRemaining * 1000). The skew then cancels algebraically:
server_remaining = server_expiresAt - pickMadeAt
                 = (client_schedule + Δ + bank*1000) - (client_pick + Δ)
                 = client_expiresAt - client_pick  ✓

Three sites updated: handleTimerPickStarted, handleDraftStateSync
(reconnect), and the initial useState seed from loader data.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 00:19:02 -07:00
..
components Fix World Cup group stage display and upcoming events (#55) 2026-05-27 05:43:08 +00:00
contexts feat: implement middleware and context provider for Express integration 2025-10-11 20:56:00 -07:00
hooks Fix draft timer display drifting due to server-client clock skew 2026-06-06 00:19:02 -07:00
lib Fix draft order initialization for teams added mid-season (#449) 2026-05-19 18:22:47 -07:00
models Fix draft timer: broadcasts, increments, reconnect sync, overnight pause (#72) 2026-06-06 05:57:46 +00:00
routes Fix draft timer display drifting due to server-client clock skew 2026-06-06 00:19:02 -07:00
services Fix MLB simulator: projected wins drive seeding, perf fix, + surface simulate errors (#65) 2026-06-01 20:50:03 +00:00
test Add auto-start draft at scheduled time (#437) (#438) 2026-05-16 23:37:29 -07:00
types Redesign standings page with sortable table, 7-day change, and chart repositioned (#205) 2026-03-22 11:05:13 -07:00
utils claude/sports-templates-conversion-ILWAM (#71) 2026-06-04 21:31:49 +00:00
welcome Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
app.css Add electric flash + fade animation for draft picks, fixes #381 (#407) 2026-05-10 23:17:29 -07:00
entry.client.tsx Filter unnecessary sentry css and js errors. 2026-03-15 10:24:57 -07:00
entry.server.tsx Replace console.* with structured logger, fix no-inferrable-types (closes #98) (#199) 2026-03-21 13:41:39 -07:00
root.tsx fix: resolve all 48 WCAG 2.2 AA accessibility issues (#439) 2026-05-17 20:11:38 -07:00
routes.ts Add public sports overview page (#451) 2026-05-19 23:02:58 -07:00