feat(voice): show saved listening versions when a thread reopens - #180
Merged
Conversation
The player's expansion was per-mount local state that defaulted to collapsed for user-requested recordings, so leaving a thread and coming back hid every saved recording behind the hover-only headphones icon. The default now follows the message: a row that already owns a recording opens expanded on web and mobile, so revisiting a thread shows which messages have listening versions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The listening player's expanded/collapsed state was per-mount local state, and it defaulted to collapsed for user-requested recordings. Leave a thread, come back, and every saved recording was hidden again. The only way to find one was to hover each assistant message and look for the headphones icon, which is itself hover-only. Recordings persist across devices now, so hiding them by default made a thread's audio effectively invisible.
Fix
The default follows the message instead of the mount: a row that already owns a recording opens expanded, on web and on mobile. Rows with no recording stay collapsed as before. Hiding a player still works and still lasts for that mount.
Agent voice replies already defaulted to expanded, so this only widens that rule to user-requested listening versions. Mobile's
expandedbecomes the sameboolean | null"untouched" state web already used.Covered by a focused test in
MessagesTimeline.test.tsx: a message carrying a stored recording renders the player and reportsaria-expanded="true", and one without renders no player.Implemented and verified by Claude Opus 5 on Claude Code.