Skip to content

Transcript: streamed answers no longer drawn over the next row (#440) - #557

Open
MopigamesYT wants to merge 1 commit into
devfrom
fix/440-transcript-overlap
Open

MopigamesYT wants to merge 1 commit into
devfrom
fix/440-transcript-overlap

Conversation

@MopigamesYT

@MopigamesYT MopigamesYT commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Part of #440 (in the real app this alone was not shown to be the cause; see the comment below)

What changed

  • ParseMarkdown lays the answer's blocks out again until each one is as high as it measures. A rebuilt block first reported its height at a provisional 600 px width (flowRenderer.MinSize) and was placed with it. A list then kept large gaps between its items, and its end was drawn below the answer, over the next row (Copy row, tool rows, the next message). Nothing corrected it when the answer's total height had not changed, which is frequent while words are added to a line.
  • New tests in internal/ui/transcript_overlap_test.go check that no part of the transcript reaches past what holds it or crosses another part:
    • TestStreamedAnswerDoesNotOverlap streams an answer word by word (lists, a nested list, a code block). It fails before the fix ("ends at 74.2, below its holder (50.2)").
    • TestLoadedAnswerDoesNotOverlap covers an answer of a chat being opened. It already passed before the fix and is kept as a guard.

Screenshots

Before/after screenshots of a streamed list answer are still to be attached.

Checked here: go test ./internal/ui (whole package, Fyne test driver, built with zig cc), go vet, gofmt. Not run here: -race, the real app.

Related: #497 (the opposite symptom, gaps between rows of a loaded chat) may share part of this cause, but this PR does not claim to fix it.

Assisted-by: Claude Opus 5.5 medium

🤖 Generated with Claude Code

A rebuilt Markdown block gave its height at a provisional width (600 px)
before flowing at its own, and the answer was laid out with that height:
a list kept gaps between its items and its end was drawn below the
answer, under the next row, whenever the answer's height did not change
and nothing laid it out again. ParseMarkdown now lays out again until
each block is as high as it measures.

Tests: TestStreamedAnswerDoesNotOverlap (fails before the fix),
TestLoadedAnswerDoesNotOverlap; go test ./internal/ui passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MopigamesYT

Copy link
Copy Markdown
Member Author

Tried in the real app, on the linux-test VM (Plasma Wayland, 1280×800). The mock model streamed a list answer word by word, followed by a second message.

dev without this PR does not show the overlap either: not during the stream (5 screenshots) and not at the end. In the real driver, Fyne re-measures the visible objects on every frame (ensureMinSize), which re-lays out the answer's blocks. The headless test only lays the transcript out, so it keeps the wrong heights the frame loop would have corrected.

So:

Assisted-by: Claude Opus 5.5 medium

This branch has not been deployed

No deployments
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.

2 participants