Skip to content

feat(sing): order "Your songs tonight" by queue position + clear sung songs (v0.88.0) - #201

Merged
beveradb merged 2 commits into
mainfrom
feat/sess-20260717-0213-singer-songs-tonight-ux
Jul 17, 2026
Merged

feat(sing): order "Your songs tonight" by queue position + clear sung songs (v0.88.0)#201
beveradb merged 2 commits into
mainfrom
feat/sess-20260717-0213-singer-songs-tonight-ux

Conversation

@beveradb

Copy link
Copy Markdown
Contributor

Summary

Two fixes to the singer-facing "Your songs tonight" done screen (sing.nomadkaraoke.com):

  • Ordering: the list rendered in submission order, so a reordered queue looked wrong. It now sorts into the order songs will actually be sung — 🎤 now singing → queue position → songs still awaiting the KJ.
  • Sung songs never cleared: a sing_request stays approved after its rotation entry is sung, so sung songs lingered (as a misleading "Added to the queue") and the list grew all night. Sung songs now move into a collapsed "✓ Already sung tonight (N)" section.

Changes

  • Backend (sing.py /my-requests): add a per-song performed flag, derived from the linked rotation entry being Done/Left (targeted get_entry lookup for ids not in the active queue); no stale estimate attached for performed songs.
  • Frontend (sing.js): _splitAndSortSongs + _activeSortKey sort the active list; _renderSungSection renders the collapsed read-only history (open/closed state preserved across the 15s poll); performed songs are read-only (no cancel/change/reorder); _liveSongs excludes performed so the "🎤 My songs (N)" bar count and boot smart-restore ignore sung songs (a singer who's finished lands on the request screen, not a stale list).
  • CSS (sing.css): style the collapsed sung section.
  • Docs (docs/ARCHITECTURE.md): document the new response shape + behavior.
  • Version bumped 0.87.0 → 0.88.0 (cache-bust; backend change → device needs a restart to take effect).

Testing

  • 1 new integration test (performed flag on a Done entry) + 4 new Playwright e2e tests (queue-order sort, sung-song collapse, read-only sung cards, no-section-when-none)
  • All 28 sing e2e + full sing suite green
  • The 5 repo-wide failures are pre-existing/environment (KJ-admin e2e drift + macOS-no-systemctl audio test); verified they also fail on the stashed pre-change tree

Review

  • CodeRabbit CLI attempted (hit OSS rate limit) → local /code-review fallback: no correctness bugs; only low-severity cosmetic/efficiency notes, none warranting a change

@coderabbitai ignore


🤖 Generated with Claude Code

beveradb and others added 2 commits July 17, 2026 12:12
… songs (v0.88.0)

The singer done screen rendered songs in submission order and never
removed sung ones, so a reordered queue looked wrong and the list grew
all night.

- backend /my-requests: add per-song `performed` flag (derived from the
  linked rotation entry being Done/Left); drop the stale estimate for
  performed songs.
- frontend: sort the active list into sung order (now singing → queue
  position → awaiting KJ); move performed songs into a collapsed
  "✓ Already sung tonight (N)" section (read-only); exclude performed
  songs from the "My songs" bar count + boot-restore.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@beveradb
beveradb force-pushed the feat/sess-20260717-0213-singer-songs-tonight-ux branch from 7a54f11 to 12167fd Compare July 17, 2026 16:12
@beveradb
beveradb merged commit 711c030 into main Jul 17, 2026
2 checks passed
@beveradb
beveradb deleted the feat/sess-20260717-0213-singer-songs-tonight-ux branch July 17, 2026 16:13
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