From de7d9e8b220f675828ebebc4d3efa3d3ed6a5eda Mon Sep 17 00:00:00 2001 From: medric-z <180440015+medric-z@users.noreply.github.com> Date: Sun, 8 Nov 2026 21:35:41 +0300 Subject: [PATCH] fix(web): the citation comment box stays put while you dictate The live transcript in text-field dictation grows with each transcript chunk until it reaches its max-h-24 cap. Inside the citation comment popover, each of those resizes re-runs Base UI collision avoidance, so a quote in the lower part of the window sends the box above it, where it creeps upward with every chunk. Once the cap is reached, the transcript stays scrolled to the top, so the newest words are hidden. The transcript box now has a fixed height for the whole recording and is a flex-col-reverse scroller pinned to the newest words. The form resizes once, when recording starts, and not again while you talk. Co-Authored-By: Claude Opus 5.5 --- apps/web/src/speech/useTextFieldSpeech.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/web/src/speech/useTextFieldSpeech.tsx b/apps/web/src/speech/useTextFieldSpeech.tsx index 575072c71d096..838573684be11 100644 --- a/apps/web/src/speech/useTextFieldSpeech.tsx +++ b/apps/web/src/speech/useTextFieldSpeech.tsx @@ -74,14 +74,14 @@ export function TextFieldSpeechControls({ }) { return ( <> - {speech.preview ? ( -

- {speech.preview.committed} - {speech.preview.tentative} -

+ {speech.state.phase === "recording" || speech.state.phase === "transcribing" ? ( + // Fixed height pinned to the newest words, so dictating never resizes the form or moves its popover. +
+

+ {speech.preview?.committed} + {speech.preview?.tentative} +

+
) : null}