feat(phases): add live now/next to schedule#147
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds “Live” phase enhancements to the Schedule tab by introducing a Now/Next lead-in section (backed by a pure, injected-clock classifier) and Live-specific copy in the shared phase banner, while ensuring the Now/Next UI is only shown when schedule reveal level is full.
Changes:
- Introduces
classifyNowNext(sets, now)for Live-mode now/next classification, plus unit tests covering boundary conditions and tie-handling. - Adds a Live-only
NowNextSectionto the Schedule tab that renders “On now” / “Up next” groups using existingMobileSetCardbehavior. - Updates the shared
PhaseBannerto show Live copy when the festival phase islive.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/pages/EditionView/tabs/ScheduleTab/NowNextSection.tsx | Adds Live-only “On now / Up next” UI built from the classifier and existing set cards. |
| src/pages/EditionView/tabs/ScheduleTab.tsx | Renders the new Now/Next section above existing schedule navigation/content. |
| src/pages/EditionView/PhaseBanner.tsx | Adds Live-phase banner copy. |
| src/lib/nowNext.ts | Implements the pure now/next classifier with injected now. |
| src/lib/nowNext.test.ts | Adds unit tests for classifier behavior across edge cases and time boundaries. |
b7d7a3f to
60f34da
Compare
Adds a pure now/next set classifier, a Live-only Now/Next section leading the Schedule tab (reusing MobileSetCard), and Live copy in the shared phase banner. Skipped below reveal level full; no background timer. Closes #138. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AXf1EyBWLa985JwjYwvKX
Falls back to the sets query's stage_name when the stage lookup misses, hides the stage badge entirely for stage-less sets, and loads stages non-blocking so the Now/Next section never suspends the Schedule tab. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AXf1EyBWLa985JwjYwvKX
Replaces the Now/Next section that squeezed the timeline with a third schedule view at /schedule/now: one compact row per stage showing the current set and that stage's own next set. Live editions land there by default; the view is guarded (and hidden from the switcher) outside live or below reveal level full. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AXf1EyBWLa985JwjYwvKX
60f34da to
25048bf
Compare
Colocates the Now board in its route file, switches it to suspense queries with a sets loader prefetch, and rewrites the classifier comments as what/why JSDoc. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AXf1EyBWLa985JwjYwvKX
| const { data: sets } = useSuspenseQuery(setsByEditionQuery(edition.id)); | ||
| const { data: stages } = useSuspenseQuery(stagesByEditionQuery(edition.id)); | ||
|
|
||
| const byStage = classifyNowNextByStage(sets, new Date()); |
There was a problem hiding this comment.
this will cause the component to rerender every second, is that what we want?
Adds a Live-phase experience: a dedicated "Now" schedule view (one row per stage: current set + that stage's next set) that Live editions land on by default, backed by a pure injected-clock classifier, plus Live copy in the shared phase banner. Hidden and route-guarded outside Live or below reveal level
full, so hidden times never leak; no background timer. Closes #138.Verification
fulland dates spanning today, open the edition: it lands on Schedule → Now, shows the Live banner, and lists one row per stage with the current set (pulsing dot, "until HH:mm") and that stage's next set ("at HH:mm"), in festival time./schedule/nowon a non-Live edition or below revealfull: redirected to the timeline; no set times visible anywhere belowfull.🤖 Generated with Claude Code
https://claude.ai/code/session_016AXf1EyBWLa985JwjYwvKX