feat(calls): Phase 2 - transcription for enclave voice channels (LC-393) #406
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/lc-393-phase2-voice-transcription"
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?
Phase 2 of LC-393: extends call transcription from 1:1 DM calls to enclave voice channels (full-mesh, N participants), reusing the Phase 1 tables, endpoints, and client. Phase 1 (#PR) is merged.
The hard part: participant-scoped targeting
A voice room has many room members but only some are joined to the channel at any moment. Broadcasting transcript events (which auto-start each receiver's mic capture) to all room members would capture the mics of people who never joined the call. So:
hub.voice_room_users). A room member who never joined gets 403 and is never auto-captured.hub.voice_room_users) for voice rooms, the DM members otherwise.What changed
Server (
routes/transcripts.rs,ws.rs):fetch_call_roomacceptsis_voicerooms as call-capable;require_participant(mutations) vsrequire_access(view);recipients()picks participants-vs-members by room type.handle_voice_leavefinalizes any session still open for the channel (save + post the notice) - the shared-channel equivalent of Phase 1's per-user disconnect backstop.Client:
layout.html, so one#lc-caption-logserves both surfaces.data-lc-room), shown on join;voice.jspublishes the channel room +lc:voice-joined/lc:voice-left.transcribe.jsreads the room from the clicked toggle and, on leaving a channel, stops its own capture without ending the shared session (any participant can end it for everyone via the toggle).Consent is unchanged: turning it on broadcasts the "being transcribed" banner to everyone in the call.
Testing
tests/transcripts.rsextended (5 tests green): newvoice_channel_participant_transcribes_nonparticipant_forbiddenregisters a hub voice participant and asserts a non-participant gets 403 while a joined participant can start + post + end; the Phase 1 DM tests still pass.just check,just test,just test-saasall green (exit 0);just build-cssregenerated.finalizeis covered by the explicit/endtest.Known limitation (noted for Phase 3+)
Re-joining a channel that already has an active session does not auto-resume capture (the join roster doesn't yet surface the open session). No correctness impact; tracked for a follow-up.
No operator action: tables already shipped in Phase 1, no new env var.