diff --git a/app/models/__tests__/upcoming-calendar.test.ts b/app/models/__tests__/upcoming-calendar.test.ts index 1178a33..5d0810a 100644 --- a/app/models/__tests__/upcoming-calendar.test.ts +++ b/app/models/__tests__/upcoming-calendar.test.ts @@ -362,6 +362,8 @@ describe("getUpcomingEventsForDraftedParticipants — bracket sports", () => { // Should use the earlier time expect(result[0].earliestGameTime).toBe(gameTime1.toISOString()); + // Both games in the window → multi-game series → show lowest game number + expect(result[0].matchLabel).toBe("Knockout Stage Game #1"); }); it("sets matchLabel to round name only (no game number) for single-game matchup", async () => { diff --git a/app/models/scoring-event.ts b/app/models/scoring-event.ts index befaf35..73d7ef3 100644 --- a/app/models/scoring-event.ts +++ b/app/models/scoring-event.ts @@ -578,11 +578,13 @@ export async function getUpcomingEventsForDraftedParticipants( } } } else if (gameKeys.size > 1) { - // Multiple games across the matchup — use just the round name. + // Multiple games in the window — it's a series, show the lowest game number. const rounds = new Set([...gameKeys].map((k) => k.split("|")[0])); if (rounds.size === 1) { const round = [...rounds][0]; - event.matchLabel = round === event.name ? null : round; + const minGameNumber = Math.min(...[...gameKeys].map((k) => parseInt(k.split("|")[1], 10))); + event.matchLabel = + round === event.name ? `Game #${minGameNumber}` : `${round} Game #${minGameNumber}`; } } }