Skip to content

fix(venue): fly in once per set, not before every gig song#978

Merged
byrongamatos merged 1 commit into
mainfrom
fix/gig-flyover-once
Jul 15, 2026
Merged

fix(venue): fly in once per set, not before every gig song#978
byrongamatos merged 1 commit into
mainfrom
fix/gig-flyover-once

Conversation

@byrongamatos

@byrongamatos byrongamatos commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Tester, mid-gig: "the second song in the gig started when the first one ended. But it showed the flyover intro again."

The flyover is arriving at the venue, and you arrive once. #968 stopped it replaying on an arrangement switch (same filename), but a gig's song 2 is a genuinely different file, so it took the full-teardown path and flew the camera in from the back of the room before every track of the set.

The play queue now answers isContinuation() — false for the first song of a set (or a standalone play: an arrival), true for song 2..N. onSongLoaded carries the room over to the new song's loop on a continuation, and only a real arrival plays the intro.

Verified on the built AppImage: isContinuation goes false (song 1) → true (song 2) across an advance, and song 2 no longer flies in.

Also from the same report — NOT a bug

"I think it didn't show the author for the second song." The credits card does show on a queue advance whenever the song carries authors — reproduced with a song that has them as the advanced-to track. The tester's song 2 simply had no authors: metadata (most auto-converted feedpaks don't). No code change.

Tests: isContinuation across start/advance/clear, and that onSongLoaded gates the flyover on the continuation check. Both fail on pre-fix source. JS 1214/1214.

Summary by CodeRabbit

  • New Features

    • Added detection for tracks continuing within an active play queue.
    • Subsequent tracks in a set now skip the arrival flyover and transition directly into the venue loop.
  • Bug Fixes

    • Prevented the arrival intro from replaying between tracks in the same set.
  • Tests

    • Added coverage for queue continuation states and intro behavior during set playback.

Tester, mid-gig: "the second song in the gig started when the first one ended.
But it showed the flyover intro again."

The flyover is arriving at the venue, and you arrive once. #968 stopped it
replaying on an arrangement SWITCH (same filename), but a gig's song 2 is a
genuinely different file, so it took the full-teardown path and played the
arrival flyover again — the camera flew in from the back of the room before
every track of the set.

The play queue now answers isContinuation(): false for the first song of a set
(or a standalone play — an arrival), true for song 2..N. onSongLoaded carries
the room over to the new song's loop on a continuation, and only a real arrival
plays the intro.

Verified on the built AppImage: isContinuation goes false (song 1) -> true
(song 2) across an advance, and song 2 no longer flies in.

Also confirmed NOT a bug, same session: "didn't show the author for the second
song." The credits card shows on a queue advance whenever the song carries
authors — reproduced with a song that has them as the advanced-to track. The
tester's song 2 simply had no `authors:` metadata (most auto-converted feedpaks
don't). No code change.

Tests: isContinuation across start/advance/clear, and that onSongLoaded gates the
flyover on the continuation check. Both fail on pre-fix source. JS 1214/1214.
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The play queue now exposes whether the current track follows the first queued track. Venue crowd loading uses this signal to skip repeated arrival flyovers during a set while preserving standalone intro behavior and fallback handling.

Changes

Set continuation flow

Layer / File(s) Summary
Queue continuation contract
static/app.js, tests/js/play_queue_peek.test.js
The public queue API reports continuation status for active tracks after the first position, with coverage for idle, initial, advanced, and cleared states.
Venue arrival handling
static/v3/venue-crowd.js, tests/js/venue_scope.test.js
onSongLoaded() advances directly for set continuations and retains playIntro() with showLoop() fallback for standalone arrivals; regression coverage verifies the ordering.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SongLoader
  participant PlayQueue
  participant VenueCrowd
  SongLoader->>PlayQueue: isContinuation()
  PlayQueue-->>SongLoader: continuation status
  alt Continuation
    SongLoader->>VenueCrowd: showLoop(machine.current, FADE_MS)
  else Standalone arrival
    SongLoader->>VenueCrowd: playIntro()
    VenueCrowd-->>SongLoader: intro failure
    SongLoader->>VenueCrowd: showLoop(machine.current, FADE_MS)
  end
Loading

Possibly related PRs

  • got-feedBack/feedBack#968: Changes the same arrival handling to detect arrangement switches rather than queue continuations.

Suggested reviewers: chrisbewithyou

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the fix and tests, but it does not follow the required template sections or include the feedpak/checklist items. Reformat into the repository template with ## What, ## feedpak surface, and ## Checklist, and include the feedpak/no-change note plus CHANGELOG, tests, and DCO status.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately captures the main user-visible change: the flyover now plays once per set instead of before every song.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/gig-flyover-once

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (1)
tests/js/venue_scope.test.js (1)

120-138: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider testing via execution instead of brace-matching the source string.

This test slices onSongLoaded's body by manual brace counting and regexes for symbol names, which is fragile to formatting/comment changes. play_queue_peek.test.js already has a sandboxed-execution harness for app.js; a similar approach here (stub _isSetContinuation/playIntro via spies and assert call order) would be more robust to refactors.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/js/venue_scope.test.js` around lines 120 - 138, The test around
onSongLoaded should execute the function in a sandbox rather than extracting its
source with manual brace counting and regex checks. Reuse the sandboxed harness
pattern from play_queue_peek.test.js, stub _isSetContinuation and playIntro with
spies, and assert that a continuation skips the intro while a real arrival still
invokes it.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@tests/js/venue_scope.test.js`:
- Around line 120-138: The test around onSongLoaded should execute the function
in a sandbox rather than extracting its source with manual brace counting and
regex checks. Reuse the sandboxed harness pattern from play_queue_peek.test.js,
stub _isSetContinuation and playIntro with spies, and assert that a continuation
skips the intro while a real arrival still invokes it.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2853a3d1-a190-4f2d-97a7-949bc6d40880

📥 Commits

Reviewing files that changed from the base of the PR and between e14ef64 and adaf3e9.

📒 Files selected for processing (4)
  • static/app.js
  • static/v3/venue-crowd.js
  • tests/js/play_queue_peek.test.js
  • tests/js/venue_scope.test.js

@byrongamatos
byrongamatos merged commit 2f2a095 into main Jul 15, 2026
6 checks passed
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