Ticket #72 — bubble rendering stabilization
Scope: fix the transcript remount storm and bubble chrome regressions from the v5.5 bubble overhaul.
Root cause and fix
mergedRows()allocated fresh wrapper objects on every 250 ms snapshot poll, defeatingstableLinesand remounting native<markdown>rows ~4×/s — the observed ghosting/overlap. Fixed with a purestabilizeMergedRowsfold that reuses the previous wrapper when the inner message reference and completion payload are unchanged. Idle polls now mount nothing.- Agent and user bubbles now use a full rounded border (
borderStyle="rounded") withpadding={1}on all sides; the user edge uses the muted theme color so it is visible but quiet. Auto height accounts for padding/border. - Fallback text and native Markdown share one wrap width (
bubbleContentWidth(..., BUBBLE_CHROME)), so height cannot disagree when paths swap. - The fake provider gained a long/multi-element bubble fixture for live coverage.
Verification
Environment: Node v26.12.1, host OpenCode v2.2.5 vs pinned types 2.2.1, Linux/tmux.
| Command | Result |
|---|---|
npm run check | exit 0 |
npm test | 356 passed, 0 failed |
npm run test:live | passed |
npm run test:live:fake | passed |
npm run test:live:fake:empty | passed |
No skips. Rounded corners and colors are structurally verified (text capture preserves indentation/content, not pixels); a human visual pass is recommended. Long-content fixture asserts content presence and no clipping markers, not exact heights.