fix(tui): keep the newline above the streaming assistant text

Finalized assistant messages rendered the thinking/tools trail inside
MessageLine with marginBottom=1 before the response body — giving a
clean blank line above the text. The streaming path rendered the
progress ToolTrail and the streaming MessageLine as two separate
siblings with no margin between, so the in-progress response butted
right up against the thinking panel. That's the "newline appears
after it's done" jank.

Wrap the streaming MessageLine in a Box with marginTop=1 whenever the
progress area is visible above it. Same spacing as the finalized
version, continuous through the handoff.
This commit is contained in:
Brooklyn Nicholson 2026-04-16 20:35:46 -05:00
parent 26859e3fcb
commit 15096903c7

View file

@ -73,14 +73,16 @@ const TranscriptPane = memo(function TranscriptPane({
)}
{progress.showStreamingArea && (
<MessageLine
cols={composer.cols}
compact={ui.compact}
detailsMode={ui.detailsMode}
isStreaming
msg={{ role: 'assistant', text: progress.streaming }}
t={ui.theme}
/>
<Box flexDirection="column" marginTop={progress.showProgressArea ? 1 : 0}>
<MessageLine
cols={composer.cols}
compact={ui.compact}
detailsMode={ui.detailsMode}
isStreaming
msg={{ role: 'assistant', text: progress.streaming }}
t={ui.theme}
/>
</Box>
)}
</Box>
</ScrollBox>