From f423aebb80fc59276b4b27ec0e71191efe4f90bd Mon Sep 17 00:00:00 2001 From: alt-glitch Date: Mon, 8 Jun 2026 18:13:04 +0000 Subject: [PATCH] opentui(v2): fix streaming caret alignment during model response (item 10) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A just-started assistant turn (message.start, no deltas yet) rendered an EMPTY fallback on the glyph's line plus the `▍` caret on a SEPARATE line below — so `⚕` sat alone with the caret dangling beneath it, indented. Folded the caret into the no-parts fallback so it renders inline with the glyph (` ⚕ ▍`); a settled row still shows its flat text, a turn with parts renders the parts. 71 pass. Live-smoked: streaming start now shows `⚕ ▍` on one line; the reply text then aligns with the glyph. --- ui-tui-opentui-v2/src/view/messageLine.tsx | 23 ++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/ui-tui-opentui-v2/src/view/messageLine.tsx b/ui-tui-opentui-v2/src/view/messageLine.tsx index 34d559db186..b241d996863 100644 --- a/ui-tui-opentui-v2/src/view/messageLine.tsx +++ b/ui-tui-opentui-v2/src/view/messageLine.tsx @@ -36,9 +36,21 @@ export function MessageLine(props: { message: Message }) { - {m().text} - + // No parts yet: the just-started streaming turn shows ONLY the caret, + // inline with the glyph (not an empty line + a dangling caret below — + // item 10 cursor misalignment); a settled row shows its flat text. + + {m().text} + + } + > + + + + } > @@ -59,11 +71,6 @@ export function MessageLine(props: { message: Message }) { )} - - - - - )