feat(stage): speakers/listeners + request-to-speak control plane (LC-494) #491
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/LC-494-stage-control-plane"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
LC-494 - Stage: speakers vs listeners + request-to-speak (control plane)
LC-494 needs an SFU for the actual large-audience audio (the current stack is full-mesh, ~4-6 peers). Per the decision on the ticket, this PR ships the control plane - roles, the live roster, and request-to-speak - designed to drop onto an SFU later. The media transport is the dedicated follow-up LC-512. The panel says so explicitly ("audio is coming soon - needs a media server").
What works now
0078addsrooms.stage_enabled; a switch on the room Manage page (mod-log audited) turns stage mode on for a group room.StageState: participants / speakers / hands). A listener joins, can raise/lower a hand or leave; a speaker can step down; a host (room manager) can approve a raised hand (promote) or remove a speaker (demote).ChatEvent::StageChanged; each client re-renders the roster panel for itself (host controls + own-state differ per viewer), id-keyed so connections not viewing the room drop the swap. Last-tab disconnect drops the user from every stage.stage.jsbridges the panel'sdata-lc-stage-*buttons to WS frames over the shared chat socket.What's deferred (LC-512)
The audio itself. Speakers publishing / listeners subscribing at scale needs an SFU; the control plane here is exactly what grants/revokes publish rights once that lands.
Tests
stage_control: hub roster state machine (join -> raise hand -> promote clears hand -> demote -> leave empties the room) +stage_leave_allaffected-rooms + the per-room toggle.just check,just test,just test-saasall green; i18n parity covers newstage-*/room-stage-*keys (en+es); Tailwind rebuilt.Not operator-visible (no env/config/contract change; off by default).
🤖 Generated with Claude Code
get_room pre-renders the stage panel for stage-enabled group rooms; room/page.html mounts it above the composer. A manage-page switch (POST /room/{id}/stage, mod-log audited) toggles stage mode. New stage-* and room-stage-* i18n (en+es). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>