Commit graph

1 commit

Author SHA1 Message Date
Danny Avila
461a4c2c52
🔇 fix: Stop Every Row's Read-Aloud Element From Loading the Page (#18168)
Each assistant row mounts a hidden `<audio autoplay>` for its read-aloud
button and passed it `src={audioRef.current?.src}`. An element with no
source reports `''`, so the row's second render wrote an empty `src`, and
its third wrote that back as the document's base URL. Both start a media
load: the first fails at once, the second fetches the app's HTML and fails
to decode it. A thread of 250 rows did that twice per row each time the
thread was opened and a run began.

The player assigns the source itself when speech starts, so the prop
carried nothing. Without it React never touches the attribute.

The live-run benchmarks ran with read-aloud off and so never mounted these
elements. They now leave it on, as the app does, and `speech.perf.spec.ts`
counts the media errors and requests the rows make.
2026-11-14 15:02:16 -05:00