Skip to content

fix: recap first-timer chronology + roster-only archive noise#624

Merged
BreakableHoodie merged 1 commit into
mainfrom
fix/recap-stats-and-archive-noise
Jul 17, 2026
Merged

fix: recap first-timer chronology + roster-only archive noise#624
BreakableHoodie merged 1 commit into
mainfrom
fix/recap-stats-and-archive-noise

Conversation

@BreakableHoodie

Copy link
Copy Markdown
Owner

Summary

Two recap-page fixes found while grading the newly backfilled Vol 1 archive. #613: is_returning checked for a performance at any other archived event with no date predicate — playing Vol 3 retroactively made a band "returning" at Vol 1 (all 8 Vol 1 bands should be first-timers; the page showed 4/4). It now requires a chronologically earlier published-or-archived event, with an id tie-break for same-day editions, and counts published (not only archived) prior editions so fresh recaps don't miscount. #614: roster-only historical archives (Vols 1–14: no venue/time data) rendered three flavours of we-don't-know noise — "Venues: 0" tile, "TBD–TBD" time spans, and an "Unscheduled" group heading. Per the #608 omit-zero rule: the tile is omitted (grid drops to 4 columns — no dangling cell), empty time ranges render nothing, and the lone group is headed "Lineup"; partially-scheduled events keep "Unscheduled" where it's genuinely accurate.

Closes #613
Closes #614

What changed

File Change
functions/api/events/[id]/recap.js is_returning predicate: (e2.is_published = 1 OR e2.status = 'archived') AND (e2.date < ? OR (e2.date = ? AND e2.id < ?)); redundant event_id != ? kept as cheap defense; rationale commented
functions/api/events/__tests__/recap.test.js 5 new tests: band on both of two sequential events (first-timer at earlier, returning at later), later-only band, same-day tie-break determinism
frontend/src/pages/EventRecapPage.jsx hasVenueData from backend stats.venue_count (single source of truth); tile omission + conditional grid; guarded the one unguarded time-range site; Lineup/Unscheduled distinction commented
frontend/src/pages/__tests__/EventRecapPage.test.jsx New file, 6 tests: roster-only (no tile, no TBD, "Lineup"), fully-scheduled (all present), partially-scheduled ("Unscheduled" retained)

Deliberately left alone: per-band inline "Unscheduled" metadata text (issue scoped to the group heading); formatTimeRange util (recap builds inline strings — guarded at the one call site instead).

Security / correctness notes

None — public read-only endpoint + display logic. The recap response shape is unchanged.

Verification

  • Tests: backend 759 pass | 6 todo (74 files); frontend 528 pass (52 files) incl. the 11 new
  • ESLint: 0 errors both stacks
  • Format check: clean both stacks
  • Build: green
  • validate:openapi: n/a — response shape unchanged
  • Manual smoke: post-deploy, /events/lwbc01/recap should read First Timers: 8 / Returning: 0, no Venues tile, "Lineup" heading, no TBD–TBD

Built by Sonny · Reviewed by Theo · 🤖 Claude Code

is_returning now requires a chronologically EARLIER published-or-
archived event (date, id tie-break) — a band whose only other
appearance was a later edition no longer counts as returning back in
time, so Vol 1's recap correctly shows all first-timers. Roster-only
archives (no venue/time data) drop the "Venues: 0" tile (grid adjusts
to 4 columns), render nothing instead of "TBD-TBD", and head their
single group "Lineup" instead of "Unscheduled"; partially-scheduled
events keep "Unscheduled" for the genuine leftover group.

Closes #613
Closes #614

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@BreakableHoodie BreakableHoodie added bug Something isn't working priority:p3 Lower priority labels Jul 17, 2026
Copilot AI review requested due to automatic review settings July 17, 2026 15:49
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@BreakableHoodie
BreakableHoodie enabled auto-merge (squash) July 17, 2026 15:49
@BreakableHoodie
BreakableHoodie merged commit cff0a71 into main Jul 17, 2026
22 checks passed
@BreakableHoodie
BreakableHoodie deleted the fix/recap-stats-and-archive-noise branch July 17, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority:p3 Lower priority

Projects

None yet

2 participants