Skip to content
Source
Sign inSign up
pingdotgg/t3code

Long messages can break chat layout after window changes #458

ClosedGuilhermeVieiraDev(GitHub profile, opens in a new tab) opened this issue 3 comments

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

https://github.com/user-attachments/assets/a9202af7-88d7-4aa3-903f-a6c923d03849

Large text used to reproduce

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

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

  1. maria-rcks added labelsbug

  2. are you on the latest version, this should be fixed !! @GuilhermeVieiraDev ??

  3. Sorry for the delay @shivamhwp didn't get the notification. But it's still happening

    Image

Sign in to join this conversation.