From 815f171f373547c3ce1b8b96c2acef019708870c Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Fri, 29 May 2026 19:45:14 -0500 Subject: [PATCH] fix(desktop): stop streaming caret from shifting layout on completion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The streaming caret (::after on the running message's last child) was an in-flow inline-block adding ~0.78em of inline width, which could wrap the last line mid-stream; when the caret is removed on completion the line un-wraps and reflows — the visible post-response layout shift. Net-zero its inline advance with a compensating negative margin so it paints at the text end without consuming layout width. --- apps/desktop/src/styles.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/desktop/src/styles.css b/apps/desktop/src/styles.css index 33090db769db..1f1e7f47945a 100644 --- a/apps/desktop/src/styles.css +++ b/apps/desktop/src/styles.css @@ -962,6 +962,11 @@ canvas { width: 0.6em; height: 1em; margin-left: 0.18em; + /* Net-zero the caret's inline advance so it paints at the text end without + consuming layout width. Otherwise its ~0.78em footprint can wrap the last + line mid-stream, and removing the caret on completion un-wraps it — the + visible "layout shift after the cursor goes away". */ + margin-right: calc(-0.6em - 0.18em); vertical-align: middle; border-radius: 0.09375rem; background: repeating-conic-gradient(currentColor 0% 25%, transparent 0% 50%) 0 0 / 0.125rem 0.125rem;