[Bug]: Right-panel terminal does not re-fit on resize - cursor lands in the wrong column and typed text draws over the prompt
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
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
- Open a thread and open a terminal in the right side panel.
- Let a prompt render at the panel's current width.
- 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.
- 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in apps/desktop by tracing the right side panel terminal's resize handling and PTY size update, then compare it with the bottom terminal drawer fix described in #4860. Resize the panel narrower and verify that columns, rows, cursor placement, line editing, and shell redraw all remain aligned with the prompt.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100