Skip to content

[Bug]: Right-panel terminal does not re-fit on resize - cursor lands in the wrong column and typed text draws over the prompt #12058

Description

@martin-ptsoft

Before submitting

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

Area

apps/desktop

Steps to reproduce

  1. Open a thread and open a terminal in the right side panel.
  2. Let a prompt render at the panel's current width.
  3. Drag the panel divider to resize the terminal. It does not always reproduce on the first drag - dragging the panel narrower than its starting width is the reliable trigger.
  4. Start typing at the prompt.

Expected behavior

After the panel is resized, the terminal recomputes its columns and rows, tells the PTY the new dimensions, and reflows. The cursor sits immediately after the shell prompt, and typed characters appear there.

Actual behavior

The terminal keeps the column count it had before the drag. The shell still believes it has the old width, so the cursor is placed at the wrong column - typed text is drawn on top of / "behind" the prompt path instead of after it. In the attached screenshot the caret sits several characters into the ...t3code-6b302549$ prompt rather than after it.

Line editing is affected too: backspace, arrow keys, and history recall redraw at the wrong offset, so the visible line stops matching what the shell actually has in its buffer.

This looks like the same class of bug as #4842 ("Terminal drawer does not re-fit when its container is resized"), which was fixed for the bottom terminal drawer by #4860. The right side panel terminal appears to still miss the resize.

Impact

Minor bug or occasional failure

Version or commit

0.0.42 (stable channel)

Environment

T3 Code client 0.0.42 on macOS 27. Server: T3 Code 0.0.42, Ubuntu 26.04.1 LTS, Linux 7.0.0-31-generic x86_64, Node v24.19.0, Bun 1.4.2. Shell: bash

Logs or stack traces

none - purely a rendering/size-negotiation problem, nothing logged

Screenshots, recordings, or supporting files

Screen.Recording.2026-09-16.at.10.39.39.mov

Workaround

Close and reopen the terminal, or run clear / press Ctrl+L after resizing - the shell redraws at the correct width once it learns the new size.

Activity

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

    acceptedfeature request acceptedbugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions