Animate live voice transcripts with split-flap tiles (#43656)

## What changed

Render live voice transcripts with a split-flap effect, a black background, and brief speaker-colored highlights as characters settle. Preserve settled characters when text is appended and include animation ticks in the active transcript cache key so frames refresh.

Respect `animations = false`, preserve Unicode graphemes and raw transcript text, and keep completed transcripts as ordinary history cells. Stop requesting animation frames once the effect settles.

## Testing

Add frame snapshots and regression coverage for row styling, speaker colors, appended text, reduced motion, Unicode width, frame scheduling, and unchanged final transcript history.

GitOrigin-RevId: 934f577c7279158f9161d6232634087ab32b0ea3
This commit is contained in:
Benjamin Carlsson authored and copyberry committed 2026-09-08 02:46:14 +00:00
1 parent 4b0d9669cc
commit 4e93cf9b4e
6 files changed
+560 -5

No files matched your search

+17 -2
View File
@@ -6,11 +6,13 @@ mod recording_controls;
use super::ChatWidget;
use super::HistoryCell;
use super::PARENT_OWNED_INPUT_MESSAGE;
use super::realtime_split_flap::SplitFlapTranscriptCell;
use super::realtime_split_flap::VoiceAmplitudeHistory;
use crate::app_command::AppCommand;
use crate::app_event::AppEvent;
use crate::history_cell;
use crate::key_hint;
use crate::motion::MotionMode;
use codex_app_server_protocol::ThreadItem;
use codex_app_server_protocol::UserInput;
use codex_features::Feature;
@@ -1244,9 +1246,22 @@ impl ChatWidget {
.transcript_role
.as_deref()
.unwrap_or("");
self.realtime_conversation.live_transcript_cell = Some(
self.realtime_transcript_history_cell(role, &self.realtime_conversation.transcript),
let previous = self
.realtime_conversation
.live_transcript_cell
.as_deref()
.and_then(|cell| cell.as_any().downcast_ref::<SplitFlapTranscriptCell>());
let cell =
self.realtime_transcript_history_cell(role, &self.realtime_conversation.transcript);
let live_cell = SplitFlapTranscriptCell::new(
cell,
role,
&self.realtime_conversation.transcript,
previous,
MotionMode::from_animations_enabled(self.config.animations),
self.frame_requester.clone(),
);
self.realtime_conversation.live_transcript_cell = Some(Box::new(live_cell));
self.bump_active_cell_revision();
self.request_redraw();
}