Matthias Nott
2026-03-07 0e888d62af1434fef231e11a5c307a5b48a8deb1
refs
author Matthias Nott <mnott@mnsoft.org>
Saturday, March 7, 2026 10:49 +0100
committer Matthias Nott <mnott@mnsoft.org>
Saturday, March 7, 2026 10:49 +0100
commit0e888d62af1434fef231e11a5c307a5b48a8deb1
tree 49285ae4f3f93cdbb66e7d55aec3b0c03aa19a7a tree | zip | gz
parent af1543135d42adc2e97dc5243aeef7418cd3b00d view | diff
feat: singleton audio, transcript reflection, voice persistence

- audio.ts: true singleton player — only one audio at a time, with
URI-based tracking so each bubble knows its play state
- audio.ts: playSingle() for manual playback, playAudio() for
autoplay queue, explicit pause before remove to stop native audio
- MessageBubble: show transcript text below voice player, track
playing state via singleton URI
- VoiceButton: pass recording duration from recorder.currentTime
- ChatContext: handle incoming 'transcript' type to update voice
bubbles with transcribed text, send messageId with voice messages
- ChatContext: voice messages persist transcript text, empty chunks
are filtered on reload, transcribed voices become text bubbles
- ConnectionContext: pass messageId with voice messages to gateway
- wol.ts: add 5s timeout with settled guard to prevent hanging
- types: add WsIncomingTranscript, messageId on WsVoiceMessage
9 files modified
changed files
app/chat.tsx diff | view | blame | history
components/chat/InputBar.tsx diff | view | blame | history
components/chat/MessageBubble.tsx diff | view | blame | history
components/chat/VoiceButton.tsx diff | view | blame | history
contexts/ChatContext.tsx diff | view | blame | history
contexts/ConnectionContext.tsx diff | view | blame | history
services/audio.ts diff | view | blame | history
services/wol.ts diff | view | blame | history
types/index.ts diff | view | blame | history