The before/after QP diff (with its null = "no prior award" and null → value "first-time score" semantics) was duplicated in processQualifyingEvent and rescoreTennisBracketAndDetectChanges. The two entry points must stay separate (tennis snapshots before an authoritative delete-all; CS2 preserves rows), but the comparison itself should live in one place. Add diffChangedQualifyingPoints(before, after) in qualifying-points.ts and call it from both paths. Unit-tested directly; the two integration tests still cover the end-to-end behavior. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hq3fG4Zn3unntbSQAGSqCq |
||
|---|---|---|
| .. | ||
| components | ||
| contexts | ||
| hooks | ||
| lib | ||
| models | ||
| routes | ||
| services | ||
| test | ||
| types | ||
| utils | ||
| welcome | ||
| app.css | ||
| entry.client.tsx | ||
| entry.server.tsx | ||
| root.tsx | ||
| routes.ts | ||