brackt/app/components
Chris Parsons edc4eb75e8
Optimize draft room performance with memoization and refactoring (#15)
* Fix flex spot count in draft room Teams Drafted view

The flexSpots column in the database defaults to 0 and was never
populated, causing the Teams Drafted grid to always show "0 of 0 flex".
Calculate numFlexPicks dynamically in the loader as
max(0, draftRounds - seasonSports.length) so teams see the correct
flex count (e.g. 7 rounds - 5 sports = 2 flex).

https://claude.ai/code/session_01CSzF4aWuyppGBDqM4MJmhc

* Clean up draft room flex calculation area

- Fix bug: force pick dialog now uses its own isolated search/sport
  filter state so it no longer mutates the main participants tab filters
- TeamsDraftedGrid: remove dead first pass in flexPicksByTeam memo,
  trim season prop to numFlexPicks only, drop unused type field from
  picks sport shape
- Loader: derive userAutodraftSettings from already-loaded
  autodraftSettings list, eliminating a redundant DB query
- Extract shared transformedPicks, transformedParticipants, and
  seasonSportsData into their own useMemos so both eligibility memos
  reuse them instead of duplicating the work
- Memoize draftGrid, draftedParticipantIds, and uniqueSports which
  were being recomputed on every render

https://claude.ai/code/session_01CSzF4aWuyppGBDqM4MJmhc

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-20 21:10:26 -08:00
..
__tests__ Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
draft Optimize draft room performance with memoization and refactoring (#15) 2026-02-20 21:10:26 -08:00
scoring Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
sports Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
standings Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
ui feat: Integrate accordion component for sidebar and update autodraft settings to sync with props 2025-10-25 10:04:21 -07:00
AutodraftSettings.tsx feat: Prevent simultaneous updates in AutodraftSettings and disable controls during updates 2025-10-26 22:09:22 -07:00
DraftGrid.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
DraftSidebar.tsx Add browser push notifications toggle to draft page (#11) 2026-02-20 19:30:53 -08:00
navbar.tsx feat: add admin navigation link for authenticated admin users 2025-10-13 09:44:59 -07:00
NotificationSettings.tsx Add browser push notifications toggle to draft page (#11) 2026-02-20 19:30:53 -08:00
ParticipantSelector.tsx feat: Add ParticipantSelector component for improved participant selection in brackets 2025-11-08 21:36:29 -08:00
StandingsTable.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00