game room voice: light the burger voice btn for seated gamers across ROLE/SIG/SKY_SELECT; keep POST's composer inline (OK beside the input) — TDD

Voice (Phase C, room path) — the my_sea voice mesh now extends to the epic game room. room_view sets voice_active for a SEATED gamer (a TableSeat with their gamer) while table_status is in {ROLE_SELECT, SIG_SELECT, SKY_SELECT} — from ROLE_SELECT onset (all tokens committed, seats pre-created by pick_roles) continuously through SKY_SELECT, which hosts the in-page DRAW SEA felt; dark at IN_GAME. voice_room_id = the room UUID (the WebRTC mesh key), voice_muted_at = the persisted mute so an in-arc nav/refresh rejoins muted (mirrors my_sea). The burger fan's shared #id_voice_btn lights .active + carries data-room-id; room.html now includes voice-glow.js (the glow/pulse machine, coexisting w. the sea-btn glow handoff).

No consumer/JS change needed: RoomVoiceConsumer._can_join already gates an epic room on TableSeat membership, the ws/voice/<str:room_id> route serves both mysea-… + bare-UUID keys, and burger-btn.js/voice-mesh.js read data-room-id generically. TDD: RoomVoiceActivationTest (9 ITs — active across the arc, dark at IN_GAME, dark for a non-seated viewer, room-id = UUID, muted-at passthrough) + RoomVoiceConsumerEpicGateTest (2 channels ITs — seated gamer admitted + receives welcome; non-seated refused). 390 epic-view + 11 voice channels ITs green.

- _room.scss: POST composer kept as a flex row — the OK btn sits inline beside the 'Enter a post line' input (the felt/pill chrome stays salvaged in YARN, but the input<->OK row layout is retained; follow-up to 577ef30).

- bundled (parallel work): _room.scss reelhouse h2 font --priUser -> --secUser (SCROLL/POST/PULSE); rootvars.scss chroma-hue primaries brightened (yellow/lime/cyan/indigo/violet/fuschia/magenta).

[[project-my-sea-invite-voice-blueprint]] [[project-character-creation-spec]]

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Disco DeDisco
2026-06-08 19:08:38 -04:00
parent 577ef30f5c
commit 039152a787
6 changed files with 153 additions and 8 deletions

View File

@@ -800,6 +800,23 @@ def room_view(request, room_id):
seen_seated.add(seat.gamer_id)
seated_others.append(seat.gamer)
ctx["seated_others"] = seated_others
# Voice (Phase C, room path) — the burger fan's #id_voice_btn lights for a
# SEATED gamer across the whole character-creation arc: ROLE_SELECT onset
# (all tokens committed, seats pre-created by pick_roles) continuously through
# SKY_SELECT (which hosts the in-page DRAW SEA felt), going dark at IN_GAME.
# The room UUID is the WebRTC mesh key — RoomVoiceConsumer._can_join already
# gates an epic room on TableSeat membership (no consumer change), and
# voice-mesh.js / burger-btn.js bind the active click → join/toggle-mute.
# voice_muted_at carries the persisted mute so an in-arc nav/refresh rejoins
# MUTED (mirrors my_sea). [[project-my-sea-invite-voice-blueprint]]
VOICE_PHASES = {Room.ROLE_SELECT, Room.SIG_SELECT, Room.SKY_SELECT}
is_seated = room.table_seats.filter(gamer=request.user).exists()
ctx["voice_active"] = is_seated and room.table_status in VOICE_PHASES
ctx["voice_room_id"] = str(room.id)
ctx["voice_muted_at"] = (
request.user.voice_muted_at.isoformat()
if getattr(request.user, "voice_muted_at", None) else ""
)
return render(request, "apps/gameboard/room.html", ctx)