brackt/app/routes/leagues
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__ feat: Add comprehensive scoring system database schema 2025-10-28 23:40:11 -07:00
$leagueId.draft-board.$seasonId.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
$leagueId.draft.$seasonId.tsx Optimize draft room performance with memoization and refactoring (#15) 2026-02-20 21:10:26 -08:00
$leagueId.server.ts feat: add recharts library and implement PointProgressionChart component for historical views 2025-11-14 21:18:34 -08:00
$leagueId.settings.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
$leagueId.sports-seasons.$sportsSeasonId.server.ts Fix sports season page 404 when sports season is linked to multiple leagues (#10) 2026-02-20 11:35:35 -08:00
$leagueId.sports-seasons.$sportsSeasonId.tsx feat: Add routes and components for sports season display, including playoff brackets and standings 2025-11-12 23:44:33 -08:00
$leagueId.standings.$seasonId.teams.$teamId.tsx feat: Implement team breakdown pages with detailed score breakdown 2025-11-14 20:01:21 -08:00
$leagueId.standings.$seasonId.tsx feat: add FIFA World Cup 48-team bracket template with group stage and projected scoring 2026-02-14 22:30:12 -08:00
$leagueId.tsx Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
new.tsx Add implementation plan for commissioner-without-team feature (#6) 2026-02-20 08:45:09 -08:00