brackt/drizzle/meta
Chris Parsons 43dbdf0040
Add not-participating exclusion support for event results (#446)
* Add notParticipating flag to allow excluding withdrawn participants from qualifying-points simulators

Adds a `not_participating` boolean column to `event_results` so admins can
mark a participant as not competing in a specific upcoming major (e.g. Alcaraz
withdrawing from Wimbledon due to injury). The golf, tennis, and CS2 major
simulators now query this flag for incomplete events and exclude those
participants from the event's draw/field, redistributing probability weight
to the remaining field. Admin UI for qualifying major_tournament events gains
a "Not Participating" card to mark/unmark withdrawals before the event runs.

https://claude.ai/code/session_01HxNPLEXzr5Km3suWrJe2F9

* Address code review feedback on not-participating flag

Security: unmark-not-participating now validates the result exists, belongs
to this event, and is actually a DNP row before deleting. mark-not-participating
now returns a user-friendly error on duplicate-key constraint violations.

Code quality: extract shared getExcludedByEventMap() utility to event-result
model, eliminating the duplicated 20-line exclusion-loading block that was
copy-pasted into all three simulators. Fix hasParticipantResult() to exclude
notParticipating rows so it correctly reflects actual competition participation.
Remove optional chaining on the non-optional notParticipatingIds field in the
admin UI. Fix misleading empty-state message.

Tests: replace the misleading first tennis DNP test (which never used the
activeIds variable it created) with a test that explicitly validates the
fallback behaviour when too few players remain after exclusion. Add three CS2
DNP tests covering the excluded-team-gets-zero-QP path, the redistribution
of wins, and per-event pool independence.

https://claude.ai/code/session_01HxNPLEXzr5Km3suWrJe2F9

* Fix lint errors: replace non-null assertions in CS2 DNP test

https://claude.ai/code/session_01HxNPLEXzr5Km3suWrJe2F9

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-05-19 11:13:32 -07:00
..
0000_snapshot.json Initial commit from create-react-router 2025-10-10 23:04:50 -07:00
0001_snapshot.json feat: add fantasy league schema and new league routes 2025-10-11 00:07:39 -07:00
0002_snapshot.json feat: add commissioner model and league management features 2025-10-11 00:29:04 -07:00
0003_snapshot.json feat: add user model, routes, and Clerk webhook integration 2025-10-11 00:53:39 -07:00
0004_snapshot.json feat: add user model, routes, and Clerk webhook integration 2025-10-11 00:53:39 -07:00
0005_snapshot.json refactor: remove guest book feature and update league settings success flow 2025-10-11 01:03:31 -07:00
0006_snapshot.json feat: add current season tracking and active league listing by user 2025-10-11 21:10:01 -07:00
0007_snapshot.json feat: add sports and participant models with admin user functionality 2025-10-12 21:16:00 -07:00
0008_snapshot.json feat: add icon support for sports with file upload and active seasons display 2025-10-13 10:30:47 -07:00
0009_snapshot.json refactor: remove isRequired field from season sports and templates 2025-10-13 15:00:59 -07:00
0010_snapshot.json feat: add invite code system for league seasons with member access control 2025-10-14 12:20:36 -07:00
0011_snapshot.json feat: add username field to users and display in league views 2025-10-14 21:20:58 -07:00
0012_snapshot.json feat: add team settings route and logo URL field to teams table 2025-10-14 22:04:37 -07:00
0013_snapshot.json feat: add draft order management with UI for manual and random ordering 2025-10-15 08:58:35 -07:00
0014_snapshot.json feat: add bulk participant creation and expected value field 2025-10-15 21:21:33 -07:00
0015_snapshot.json feat: add draft rounds configuration to league settings 2025-10-15 21:50:02 -07:00
0016_snapshot.json feat: add draft date/time selection to league creation and settings 2025-10-15 22:02:21 -07:00
0017_snapshot.json feat: add draft pick, queue, and timer models with database schema updates 2025-10-16 00:32:48 -07:00
0018_snapshot.json feat: add public draft board and simplify draft speed settings 2025-10-20 15:03:11 -07:00
0019_snapshot.json feat: add autodraft status and team connection indicators to draft grid 2025-10-21 23:22:17 -07:00
0020_snapshot.json feat: Add comprehensive scoring system database schema 2025-10-28 23:40:11 -07:00
0021_snapshot.json feat: Implement bracket expansion plan to support various tournament structures 2025-11-03 09:36:16 -08:00
0022_snapshot.json feat: Implement bracket expansion plan to support various tournament structures 2025-11-03 09:36:16 -08:00
0023_snapshot.json Refactor code structure for improved readability and maintainability 2025-11-03 13:16:37 -08:00
0024_snapshot.json feat: implement Expected Value System with ICM probability calculator 2025-11-17 22:19:46 -08:00
0035_snapshot.json User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
0038_snapshot.json feat: progressive floor scoring for playoff brackets (#100) 2026-03-10 10:27:58 -07:00
0040_snapshot.json Add playoff match game scheduling and odds management (#135) 2026-03-11 14:17:43 -07:00
0041_snapshot.json Add event_starts_at timestamp to scoring events for sub-day ordering (#146) 2026-03-15 10:22:42 -07:00
0043_snapshot.json Add per-event configurable region config for NCAA-style brackets (#149) (#149) 2026-03-15 21:52:47 -07:00
0048_snapshot.json Add Discord webhook notifications for standings updates (#157) 2026-03-17 11:16:36 -07:00
0050_snapshot.json Add NHL playoff simulator and fix simulator dropdown (#166) 2026-03-18 01:23:53 -07:00
0052_snapshot.json Add isDraftable toggle to sport seasons (#165) (#178) 2026-03-18 22:40:19 -07:00
0053_snapshot.json Add standard draft clock mode (#67) (#189) 2026-03-20 21:36:39 -07:00
0054_snapshot.json Add regular season standings for NBA/NHL (fixes #89) (#192) 2026-03-21 00:12:01 -07:00
0055_snapshot.json Add regular season standings for NBA/NHL (fixes #89) (#192) 2026-03-21 00:12:01 -07:00
0056_snapshot.json Add AFL season + finals simulator (closes #126) (#204) 2026-03-22 01:57:39 -07:00
0057_snapshot.json Add snooker bracket simulator and Elo ratings admin UI, fixes #119 2026-03-23 08:24:28 -07:00
0058_snapshot.json Add snooker bracket simulator and Elo ratings admin UI, fixes #119 2026-03-23 08:24:28 -07:00
0059_snapshot.json Add tennis Grand Slam simulator with surface Elo ratings, fixes #116 (#216) 2026-03-23 23:59:35 -07:00
0060_snapshot.json Add tennis Grand Slam simulator with surface Elo ratings, fixes #116 (#216) 2026-03-23 23:59:35 -07:00
0061_snapshot.json Add golf qualifying points simulator (Plackett-Luce Monte Carlo) (#223) 2026-03-24 21:46:02 -07:00
0063_snapshot.json Add WNBA playoff simulator with SRS-based Elo ratings, fixes #125 (#231) 2026-03-26 00:34:51 -07:00
0064_snapshot.json Prevent duplicate participants within a sports season, fixes #69 (#236) 2026-03-27 01:09:04 -07:00
0065_snapshot.json Add FIFA World Cup 2026 support with group stage display and Monte Carlo simulator (#242) 2026-03-29 10:27:47 -07:00
0066_snapshot.json Add FIFA World Cup 2026 support with group stage display and Monte Carlo simulator (#242) 2026-03-29 10:27:47 -07:00
0067_snapshot.json Clean up migration chain and add verification migration (#268) 2026-04-06 10:53:51 -04:00
0068_snapshot.json Clean up migration chain and add verification migration (#268) 2026-04-06 10:53:51 -04:00
0069_snapshot.json Clean up migration chain and add verification migration (#268) 2026-04-06 10:53:51 -04:00
0070_snapshot.json Clean up migration chain and add verification migration (#268) 2026-04-06 10:53:51 -04:00
0071_snapshot.json Add NFL season + playoffs Monte Carlo simulator (#272) 2026-04-07 09:39:34 -04:00
0072_snapshot.json Add NCAA Football CFP simulator (12-team bracket) (#278) 2026-04-08 09:48:32 -04:00
0073_snapshot.json Add LLWS bracket Monte Carlo simulator (#280) 2026-04-08 16:52:10 -04:00
0074_snapshot.json feat: add vorp_value column to participants table 2026-04-09 01:57:22 +00:00
0075_snapshot.json Add audit logging for commissioner actions (#293) 2026-04-13 15:45:39 -07:00
0076_snapshot.json fix: league settings sports swap and audit log detail improvements (#294) 2026-04-14 21:41:05 -07:00
0077_snapshot.json New design (#309) 2026-04-23 13:14:55 -07:00
0078_snapshot.json New design (#309) 2026-04-23 13:14:55 -07:00
0079_snapshot.json New design (#309) 2026-04-23 13:14:55 -07:00
0080_snapshot.json New design (#309) 2026-04-23 13:14:55 -07:00
0081_snapshot.json Migrate authentication from Clerk to BetterAuth (#324) 2026-04-24 22:00:49 -07:00
0082_snapshot.json Migrate authentication from Clerk to BetterAuth (#324) 2026-04-24 22:00:49 -07:00
0083_snapshot.json Add overnight pause for draft timers (#335) 2026-04-26 22:31:52 -07:00
0084_snapshot.json Migrate auth from Clerk to BetterAuth (#354) 2026-04-29 10:03:50 -07:00
0085_snapshot.json Mobile draft room improvements: watchlist, collapsible picks feed, autodraft controls (#355) 2026-04-29 11:49:26 -07:00
0086_snapshot.json Add draft room closure after completion (#359) 2026-04-30 10:14:14 -07:00
0087_snapshot.json Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
0088_snapshot.json Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
0089_snapshot.json Canonical tournament layer: 2026-05-01 21:04:48 -07:00
0090_snapshot.json Canonical tournament layer: 2026-05-01 21:04:48 -07:00
0091_snapshot.json Canonical golf skills migration + copy participants feature (#369) 2026-05-02 10:29:28 -07:00
0092_snapshot.json Add sports season ↔ tournament linking with admin UI (#372) 2026-05-02 12:45:53 -07:00
0093_snapshot.json Remove sports_season_tournaments junction table — derive from scoring_events (#373) 2026-05-02 22:19:59 -07:00
0094_snapshot.json Add Brackt as a league-private meta-sport (#200) (#377) 2026-05-04 20:31:44 -07:00
0095_snapshot.json Add Cloudinary-backed avatar system (#385) 2026-05-06 14:47:37 -07:00
0096_snapshot.json Deduplicate soccer simulator helpers (#391) 2026-05-07 11:48:57 -07:00
0097_snapshot.json Add Cloudinary sports icon uploads (#393) 2026-05-07 16:07:34 -07:00
0098_snapshot.json Fix college hockey bracket resolution (#396) 2026-05-08 12:29:39 -07:00
0099_snapshot.json Remove first and last name from user profiles (#399) 2026-05-09 09:18:50 -07:00
0100_snapshot.json Refactor user profile to comprehensive settings page (#403) 2026-05-10 17:26:14 -07:00
0101_snapshot.json Refactor user profile to comprehensive settings page (#403) 2026-05-10 17:26:14 -07:00
0102_snapshot.json Formalize simulator system with manifest, input-policy, runner, and admin UI (#409) 2026-05-11 21:09:53 -07:00
0103_snapshot.json Add NLL box lacrosse simulator implementation plan and preseason-draftability guidance (#417) 2026-05-12 14:22:34 -07:00
0104_snapshot.json Add MLS sport simulator (mls_bracket) (#422) 2026-05-14 12:45:53 -07:00
0105_snapshot.json Add opt-in Discord pings to standings notifications (#429) 2026-05-15 10:06:54 -07:00
0106_snapshot.json Add user onboarding flow with username selection (#430) 2026-05-15 11:17:15 -07:00
0107_snapshot.json Add user onboarding flow with username selection (#430) 2026-05-15 11:17:15 -07:00
0108_snapshot.json Add auto-start draft at scheduled time (#437) (#438) 2026-05-16 23:37:29 -07:00
0109_snapshot.json Add not-participating exclusion support for event results (#446) 2026-05-19 11:13:32 -07:00
_journal.json Add not-participating exclusion support for event results (#446) 2026-05-19 11:13:32 -07:00