Make transcript list spacing uniform after streaming (#46899)

## Why

Adding blank lines only after multiline items gives lists uneven spacing. Completed lists in redrawable transcript views can use consistent spacing based on their rendered width.

## What changed

- Keep assistant and plan lists compact while streaming in the fullscreen transcript, without holding back completed list rows.
- On completion or interruption, separate all sibling items if any item spans multiple rows; keep single-line lists compact and recompute spacing on resize.
- Preserve the reader's displayed content when consolidating streamed cells, and include spacing policy in the Markdown render cache key.
- Retain existing list spacing for native terminal scrollback.

## Testing

Add regression and snapshot coverage for streaming completion and interruption, width-dependent reflow, reader position, nested and quoted lists, item paragraphs, and preservation of links and source metadata.

GitOrigin-RevId: b2230aaf76ae798ebb6bf15563f8b8dcb6f3d19d
This commit is contained in:
Felipe Coury
2026-09-20 22:55:19 +00:00
committed by copyberry
parent d99213289f
commit 4ca8e7afff
25 changed files with 789 additions and 68 deletions
+2 -4
View File
@@ -154,10 +154,8 @@ impl TranscriptView {
width,
expanded,
)
} else if detailed {
TextLayout::new(cell.transcript_hyperlink_lines(width), width)
} else if mode == HistoryRenderMode::Rich {
TextLayout::new(cell.compact_hyperlink_lines(width), width)
} else if detailed || mode == HistoryRenderMode::Rich {
TextLayout::new(cell.retained_hyperlink_lines(width, detailed), width)
} else {
TextLayout::new(cell.display_hyperlink_lines_for_mode(width, mode), width)
}