Cache stable active-cell layout measurements (#38242)

## What changed

- Reuse desired and rendered heights for active transcript cells that report a stable height.
- Invalidate the cached layout when the cell identity, revision, width, render mode, or syntax theme changes, and when the active cell is removed.
- Continue rebuilding display lines on every frame so animated content stays live, while dynamic-height cells bypass the persistent cache.

## Testing

- Add rendering tests for height reuse, bottom-anchored overflow, cache invalidation, animated display lines, and dynamic-height cells.

GitOrigin-RevId: 414cc4269bfb6b68105837c82e31787272d335a7
This commit is contained in:
Charlie Marsh authored and copyberry committed 2026-08-12 19:43:32 +00:00
1 parent 74004b5397
commit 3d7bb2dd2e
5 files changed
+345 -7

No files matched your search

@@ -0,0 +1,14 @@
---
source: tui/src/chatwidget/rendering_tests.rs
expression: "format!(\"{transcript:?}\")"
---
Buffer {
area: Rect { x: 0, y: 0, width: 80, height: 2 },
content: [
" ",
"frame 2 row 2 ",
],
styles: [
x: 0, y: 0, fg: Reset, bg: Reset, underline: Reset, modifier: NONE,
]
}