Skip to content

Long messages can break chat layout after window changes #458

@GuilhermeVieiraDev

Description

@GuilhermeVieiraDev

I found a rendering bug in the desktop app when a conversation contains a very long user message.

After certain window/layout changes, the chat can break in a few ways:

  • a huge empty vertical gap appears between messages
  • some messages visually overlap other messages
  • rows can appear out of place / visually out of order

I first noticed it when moving the app from a very wide monitor to a smaller/normal monitor, but it is not limited to cross-monitor moves. I can also trigger it by changing the window state/layout on the same monitor, for example when the app is fullscreen and I grab the window and move it around.

Changing zoom after the bug appears makes the layout correct itself immediately, which makes this feel like a rendering/measurement issue rather than a content issue.

Environment:

  • Arch Linux
  • Observed first in t3code-bin from AUR
  • Also reproduced after cloning the repo locally

How to reproduce:

  1. Open a chat/thread
  2. Send a very large message so it wraps heavily and becomes very tall
  3. Let the conversation continue so there are several rows after it
  4. Change the window layout somehow:
    • move it between monitors, or
    • take it out of fullscreen / drag it around, or
    • otherwise cause a noticeable window/layout change, like resizing the window
  5. Look at the layout of the rows that follow the very long message

What happens:

  • a very large empty vertical gap can appear between rows
  • some messages can overlap other messages
  • the visual order can become wrong because rows are drawn on top of each other

My guess is that this is related to stale cached measurements in the virtualized chat/message timeline after a resize/reflow/layout change. I’m not confident enough in the project’s internal patterns to propose a PR, but this seems reproducible and likely frontend-only.

I’m attaching:

  • a video showing the bug happening
  • a screenshot showing rows overlapping
  • the large text I used to reproduce it
Image Image
Screencast.From.2026-03-07.23-48-52_fixed.mp4
Large text used to reproduce

Testing a very long message, use some tool calls to explore the project

╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ ┌─────────────────────────────────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────┐ │
│ │ │ │ │
│ ├─────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────┤ │
│ │ │ │ │
│ ├─────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────┤ │
│ │ │ │ │
│ ├─────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────┤ │
│ │ │ │ │
│ ├─────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────┤ │
│ │ │ │ │
│ ├─────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────┤ │
│ │ │ │ │
│ ├─────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────┤ │
│ │ │ │ │
│ ├─────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────┤ │
│ │ │ │ │
│ ├─────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────┤ │
│ │ │ │ │
│ ├─────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────┤ │
│ │ │ │ │
│ ├─────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────┤ │
│ │ │ │ │
│ ├─────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────┤ │
│ │ │ │ │
│ └─────────────────────────────────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────┘ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions