brackt/app
Chris Parsons 623fb1dfc0
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 1m35s
🚀 Deploy / ʦ TypeScript (pull_request) Successful in 1m20s
🚀 Deploy / 🔍 Lint (pull_request) Successful in 49s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
Fix slow bracket save and stale projected points
Saving a bracket result was slow and left the projected-points column
showing pre-result EVs until the next simulation.

Root causes:
- Side effects ran in the wrong order: recalculateAffectedLeagues
  (which reads EVs to compute projected points) fired before
  updateProbabilitiesAfterResult wrote the new EVs.
- calculateTeamProjectedScore issued one getParticipantEV query per
  unfinished pick, multiplied by every team in every affected league.

Changes:
- Swap side-effect order in processMatchResult, processPlayoffEvent,
  and the set-round-winners route so probabilities update first.
- Pre-fetch every EV referenced by a season's draft picks in a single
  inArray query inside recalculateStandings and pass the map down to
  calculateTeamProjectedScore (with a getParticipantEV fallback).
- Add skipProbabilities option to processPlayoffEvent and use it from
  autoCompleteRoundIfDone, where the caller has already refreshed EVs.

Fixes #31

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 21:23:40 -07:00
..
components Fix snake draft Discord pick numbering and small UX tweaks (#2) 2026-05-22 04:18:11 +00:00
contexts feat: implement middleware and context provider for Express integration 2025-10-11 20:56:00 -07:00
hooks Fix autodraft settings panel not reflecting auto-disable after pick 2026-05-23 18:29:13 -07:00
lib Fix draft order initialization for teams added mid-season (#449) 2026-05-19 18:22:47 -07:00
models Fix slow bracket save and stale projected points 2026-05-26 21:23:40 -07:00
routes Fix slow bracket save and stale projected points 2026-05-26 21:23:40 -07:00
services Fix slow bracket save and stale projected points 2026-05-26 21:23:40 -07: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 Add public sports overview page (#451) 2026-05-19 23:02:58 -07: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