Skip to content

Desktop: rows of a loaded chat are drawn when they come into view, no more blank bubbles (#497) - #498

Open
MopigamesYT wants to merge 1 commit into
perf/auditfrom
fix/497-transcript-row-gaps
Open

MopigamesYT wants to merge 1 commit into
perf/auditfrom
fix/497-transcript-row-gaps

Conversation

@MopigamesYT

@MopigamesYT MopigamesYT commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Part of #497

Summary

Opening an existing chat could leave rows as empty slots: the bubble kept the height of its text but nothing was drawn in it (a user message showed as a big blank box with only Copy / Edit under it). Rows are now drawn again when they come into view.

Screenshots

None: the intermittent gaps could not be reproduced in the headless test driver, and I did not start VM 111. The blank-bubble state is the one the unit test below reproduces and the fix removes.

Technical details

  • Base used: perf/audit (Desktop: performance audit of November 2026, baseline and work packages #477 is still open). This PR must be retargeted to dev once Desktop: performance audit of November 2026, baseline and work packages #477 merges.
  • Cause found: the chat loader measures each row hidden (measure + Hide), which flows the text in measure-only mode (no drawing objects, paintedWidth stays 0), and transcriptLayout.Layout then Shows the row and calls Resize with the size it already has. Fyne skips the layout for an unchanged size, so the text is never drawn, while its height stays in the row. Scrolling away and back (release) does the same. Fix: Layout refreshes a row that comes back from hidden.
  • Prefix sums (Desktop: long chats: transcript layout, streamed markdown, scroll bench (#473) #486): checked store/forget/sync/sum and tested that a changed height moves every following row by exactly the difference (TestTranscriptRowsFollowAChangedHeight); no defect found there. After load and after resizes, every row's stored height equals a fresh measure (TestTranscriptRowsKeepTheirHeight). So I found no evidence that Desktop: long chats: transcript layout, streamed markdown, scroll bench (#473) #486 caused the ~80 px gaps; the ~80 px gaps themselves are NOT reproduced and may need the real app (images/fonts loading late), so please do not close the issue on this alone unless the reporter confirms.
  • Not compared against a dev build (no gaps reproduced to compare); the hide-then-show design is the same in dev.
  • Tests: TestTranscriptRowsDrawAfterScrollingBack (fails before the fix), plus the two above.

Assisted-by: Sonnet 5.5 low

🤖 Generated with Claude Code

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

bug Something isn't working desktop Desktop app (Linux, Windows)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants