Skip to content

Fix transcript flicker when switching to running sessions - #8

Merged
SmartAI merged 2 commits into
mainfrom
fix/session-rendering
Sep 11, 2026
Merged

SmartAI merged 2 commits into
mainfrom
fix/session-rendering

Conversation

@SmartAI

@SmartAI SmartAI commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Summary

Fix continuous transcript flicker when switching back to a running session with long, mixed-height history. The native macOS reproduction showed jumps of up to 4,011 logical pixels even while the provider was sending no new SSE content.

  • Follow the measured last message plus the running-status height, rather than the estimated footer position. Avoid re-entering layout from geometry callbacks.
  • Stop pooling variable-height message containers whose lazy content was being unloaded. The transcript remains virtualized.
  • Apply Markdown styling synchronously so streamed updates do not expose unstyled paragraph heights for a frame.
  • Add real backend/SSE regressions covering sidebar switching, frame stability, split Markdown delimiters, reading older output, and jumping back to live output. The down-arrow regression checks actual glyph pixels after the latest message leaves the viewport and receives more output. This catches the pre-fix blank destination that a transient atYEnd check missed. Also harden the native screenshot checkpoint.

Verification

  • 24 focused offscreen desktop tests passed.
  • All four native macOS regression cases passed across three consecutive runs: streaming at 5 ms and 25 ms with tail/paragraph stability checked within one logical pixel, plus down-arrow pixel checks for 60- and 600-paragraph messages.
  • Ruff, QML lint with zero warnings, and git diff --check passed.

Qt behavior

Checked against Qt 6.11.2 documentation and source: setMarkdown() replaces the whole document, and variable-height ListView delegates affect content-size estimates. Keep Qt's native renderer and accumulated Markdown source; parsing arbitrary SSE fragments separately breaks syntax split across chunks. The rationale is documented in docs/desktop-design-system.md.

@SmartAI
SmartAI merged commit 29e2e07 into main Sep 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant