Work guests' requests from the console #44

Merged
forgejo-admin merged 2 commits from feature/console-requests-panel into main 2026-09-28 06:54:50 +00:00

Problem

Guests can request songs (#40) and the console can go online (#41), but the DJ can't see those requests or act on them.

Solution

Requests panel

  • A third column that only appears while the console is online. Offline, the layout is unchanged.
  • Each card shows art, title, artist, "Ana, Ben · 5 min", and a badge: "in library", "excluded" or "new to you". The badge is worked out locally, so no library data leaves the Mac.
  • Queue:
    • it takes the card out of the panel and tells guests the request is "queued"
    • a track that isn't in the library is added as a needs-review stub with Spotify's metadata and no ratings
    • taking the track back out of the queue returns the card
  • Dismiss takes the card out of the panel, and the request disappears for guests too.

Credits

  • A played request marks the request played on the app server and records the request id on the local play.
  • Guests see "requested by Ana, Ben" in their history. The Retro rows and the CSV export show the same.

Requests playlist

  • A local table keeps every request, including dismissed ones, with handles and dates.
  • The panel's "all ›" opens it in the board's browse mode.

Plumbing

  • A new djOnInvalidate subscription on the app server tells the console when requests change. The console also polls every 5s, so a dead socket only costs seconds.
  • Status changes go through the outbox as a new requestStatus kind. A change still waiting to send beats the server's older state, so cards don't flicker while offline.

E2e: the full flow is enabled. A phone guest requests "Oblivion", which isn't in the library. The DJ's panel shows it with "Ana" and "new to you", and the DJ queues it. It plays through the fake Spotify, and the guest's history says "requested by Ana". Each console spec now starts a new set, because the console is shared across specs and a set keeps its passcode.

This is Slice 6 of projects/2026-09-27-dj-online-companion/plan.md.

Testing

  • bun run test: 211 pass. The console-seam tests run against a real in-process app server.
  • bun run check: clean.
  • bun run e2e: 7 passed and 1 skipped (the reconnecting-notice test), three runs in a row.

🤖 Generated with Claude Code

## Problem Guests can request songs (#40) and the console can go online (#41), but the DJ can't see those requests or act on them. ## Solution **Requests panel** - A third column that only appears while the console is online. Offline, the layout is unchanged. - Each card shows art, title, artist, "Ana, Ben · 5 min", and a badge: "in library", "excluded" or "new to you". The badge is worked out locally, so no library data leaves the Mac. - **Queue:** - it takes the card out of the panel and tells guests the request is "queued" - a track that isn't in the library is added as a needs-review stub with Spotify's metadata and no ratings - taking the track back out of the queue returns the card - **Dismiss** takes the card out of the panel, and the request disappears for guests too. **Credits** - A played request marks the request played on the app server and records the request id on the local play. - Guests see "requested by Ana, Ben" in their history. The Retro rows and the CSV export show the same. **Requests playlist** - A local table keeps every request, including dismissed ones, with handles and dates. - The panel's "all ›" opens it in the board's browse mode. **Plumbing** - A new `djOnInvalidate` subscription on the app server tells the console when requests change. The console also polls every 5s, so a dead socket only costs seconds. - Status changes go through the outbox as a new `requestStatus` kind. A change still waiting to send beats the server's older state, so cards don't flicker while offline. **E2e:** the full flow is enabled. A phone guest requests "Oblivion", which isn't in the library. The DJ's panel shows it with "Ana" and "new to you", and the DJ queues it. It plays through the fake Spotify, and the guest's history says "requested by Ana". Each console spec now starts a new set, because the console is shared across specs and a set keeps its passcode. This is Slice 6 of `projects/2026-09-27-dj-online-companion/plan.md`. ## Testing - `bun run test`: 211 pass. The console-seam tests run against a real in-process app server. - `bun run check`: clean. - `bun run e2e`: 7 passed and 1 skipped (the reconnecting-notice test), three runs in a row. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A requests panel beside the candidates while the set is online: one card per
track with everyone who asked, how long ago, and whether it is in the library,
excluded, or new. Queue (stubbing a new track into the library for review)
or dismiss; unqueueing brings the card back; a played request is credited on
guests' phones, in the retro and in the CSV. Every request is kept locally as
the requests playlist, browsable from the board. The console hears new
requests over the app server's socket, polling as a fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
E2e: a guest's request reaches the panel, plays, and is credited
All checks were successful
pr-validate / validate (pull_request) Successful in 8s
pr-validate / e2e (pull_request) Successful in 39s
ff6209e373
The console is shared by every spec and a set keeps its passcode, so each
console spec starts a new set before going online.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
forgejo-admin deleted branch feature/console-requests-panel 2026-09-28 06:54:51 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
celilo/tango-dj!44
No description provided.