Skip to content

[Bug]: Opening a side panel loses the visible text position in messages and drafts #41179

Closed

Description

@caezium

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Open a thread containing a long, wrapped message and expand the message if needed.
  2. Scroll up so a sentence partway through that message is near the top of the conversation viewport, with end-follow inactive.
  3. Open the right side panel, reducing the conversation width.
  4. Repeat with a long unsent draft, scrolled partway down inside the composer.

Expected behavior

The text being read stays at roughly the same vertical position as lines rewrap. The composer retains its selection and focus. A conversation already following the latest output continues doing so.

Actual behavior

The sentence being read jumps away when the available width changes. A deterministic real-app scenario measured a maximum displacement of 250.25 pixels across the conversation and draft, against a 30-pixel tolerance. Separate focused browser cases reproduce long-paragraph displacement in both surfaces.

Impact

Minor bug or occasional failure: opening the panel interrupts reading and requires finding the previous sentence again.

Version or commit

Reproduced on main at def64e3a54. The affected production components are unchanged at the later base 8ff66fc563.

Environment

macOS, local web development build, the repository's Playwright Chromium, and the deterministic Replay provider. The reproduction does not depend on a live provider or a remote environment.

Screenshots, recordings, or supporting files

Conversation after opening the panel Draft after opening the panel
Conversation text moves after the panel opens Draft text moves after the panel opens

Short reproduction recording.

Related PR #32826 addresses terminal height changes during streaming and explicitly excludes width-only changes. This report concerns the visible text position within a wrapped message or draft when the width changes.

Workaround

Manually scroll back to the sentence after opening or closing the panel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions