brackt/app/routes/api
Chris Parsons 51cffe1762
Add commissioner time bank adjustment feature for draft (#22)
* Add commissioner time bank adjustment via right-click on draft board team headers

Commissioners can right-click any team header on the Draft Board tab to open
an "Adjust Time Bank..." dialog. The dialog supports adding or removing an
arbitrary amount of time in seconds, minutes, or hours. The change is applied
immediately to the database and broadcast to all clients via the existing
timer-update Socket.IO event so every participant sees the updated clock
in real time.

- New API route: POST /api/draft/adjust-time-bank (commissioner-only)
- DraftGridSection: wraps team headers in a ContextMenu for commissioners
- Draft room: dialog state, handler, and updated DraftGridSection props

https://claude.ai/code/session_013wxPKzLUCx3nC3LpxgjvQL

* Fix code review issues in commissioner time bank adjustment

- Wrap fetch in try/finally so isAdjustingTimeBank is always reset,
  even on network errors that cause fetch to throw
- Guard against totalSeconds rounding to 0 for tiny fractional inputs
- Reject API requests when the draft is not in 'draft' status (409)
- Set input min to 0.001 so the browser rejects zero in native validation

https://claude.ai/code/session_013wxPKzLUCx3nC3LpxgjvQL

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-22 16:16:51 -08:00
..
__tests__ feat: Implement drag-and-drop functionality for queue items; add duplicate prevention for participants in queue 2025-10-25 21:02:16 -07:00
webhooks refactor: simplify user update logic in Clerk webhook handler to reuse findOrCreateUser 2025-10-14 21:50:07 -07:00
autodraft.update.ts refactor: update import paths to use absolute paths for better clarity and maintainability 2025-10-24 21:20:19 -07:00
draft.adjust-time-bank.ts Add commissioner time bank adjustment feature for draft (#22) 2026-02-22 16:16:51 -08:00
draft.force-autopick.ts Improve draft room UX with better error handling and UI refinements (#17) 2026-02-20 21:50:27 -08:00
draft.force-manual-pick.ts Improve draft room UX with better error handling and UI refinements (#17) 2026-02-20 21:50:27 -08:00
draft.make-pick.ts Add draft clock UI, Fischer increment timer logic, and security fixes (#19) 2026-02-21 16:51:12 -08:00
draft.pause.ts Improve draft room UX with better error handling and UI refinements (#17) 2026-02-20 21:50:27 -08:00
draft.replace-pick.ts Add commissioner replace pick and draft rollback features (#18) 2026-02-20 22:47:29 -08:00
draft.resume.ts Improve draft room UX with better error handling and UI refinements (#17) 2026-02-20 21:50:27 -08:00
draft.rollback.ts Add commissioner replace pick and draft rollback features (#18) 2026-02-20 22:47:29 -08:00
draft.start.ts Add draft clock UI, Fischer increment timer logic, and security fixes (#19) 2026-02-21 16:51:12 -08:00
queue.add.ts feat: Implement drag-and-drop functionality for queue items; add duplicate prevention for participants in queue 2025-10-25 21:02:16 -07:00
queue.clear.ts feat: add queue management UI and API endpoints for draft room 2025-10-17 17:42:40 -07:00
queue.remove.ts feat: add queue management UI and API endpoints for draft room 2025-10-17 17:42:40 -07:00
queue.reorder.ts Improve draft room UX with better error handling and UI refinements (#17) 2026-02-20 21:50:27 -08:00