Skip to content

bug: match cards show [0:0] instead of T/CT round wins - #590

Closed
lukepolo wants to merge 1 commit into
mainfrom
fix/match-side-wins
Closed

lukepolo wants to merge 1 commit into
mainfrom
fix/match-side-wins

Conversation

@lukepolo

@lukepolo lukepolo commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The map total (e.g. 9–7) was correct, but the [T:CT] split next to each lineup stayed at [0:0].
  • Side wins now go through matchSideWins: accept the T alias, sort by round number, trust score deltas when they move, and infer missing per-round sides from the current map assignment and MR.
  • Hide the badge until at least one round can be attributed, so we do not fake zeros on live maps with no usable rounds.

Test plan

  • Open a live match with a non-zero score: each lineup shows a T:CT split that adds up to its map score, not [0:0]
  • Open a match still 0–0: the side-win badge is hidden
  • Finished match with halves: splits still match the round history (including after halftime)
  • npx vitest run tests/utilities/matchSideWins.spec.ts

The total map score was correct, but the per-side split only counted
TERRORIST and assumed rounds arrived newest-first, so live rows that
send T or omit sides stayed at zero.

Co-authored-by: Cursor <cursoragent@cursor.com>
@lukepolo

Copy link
Copy Markdown
Contributor Author

Closing — the [0:0] on live maps was Hasura hiding match_map_rounds until Finished/Surrendered, not the web counter. That is 5stackgg/api#423. The match page already fetches rounds, so this client rewrite is not needed.

@lukepolo lukepolo closed this Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant