pingdotgg / pingdotgg/t3code

[Bug]: Terminal UI corrupts and gets permanently stuck when scrolling in Neovim

Open
#7,790 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage
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/web

Steps to reproduce
  1. Open a project in T3 Code and open its integrated Terminal panel.
  2. Inside the terminal, launch nvim against any file.
  3. Scroll within Neovim (e.g. Ctrl-D/Ctrl-U, mouse wheel, or j/k repeated quickly) so it repaints the screen rapidly.
  4. Repeat scrolling for a bit. Intermittently, mid-scroll, the terminal canvas will render a corrupted, mixed-up frame.
Expected behavior

The terminal should always show either the previous complete frame or the next complete frame from Neovim — never a mixture of the two — and should recover on its own even if a frame update is somehow left unterminated.

Actual behavior

The terminal canvas occasionally freezes into a torn/garbled frame (parts of the old screen and parts of the new screen mixed together) while scrolling in Neovim. Once this happens, the UI does not self-correct: further input and rendering stay visually broken until the user closes the Terminal panel and reopens it, recreating the terminal session from scratch.

Impact

Major degradation or frequent failure

Version or commit

main @ be7d35aae

Environment

Reproduces on web/desktop (Chromium-based Ghostty WASM renderer) and Android's native Ghostty JNI bridge; not reproducible on iOS, which renders through Ghostty's native renderer rather than a custom dirty-row snapshot loop.

Logs or stack traces

Screenshots, recordings, or supporting files

Pasted image 20260821130848.png

Workaround

Close and reopen the Terminal panel/tab to recreate the terminal session, which resets the renderer state.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in apps/web and trace the terminal canvas update path, focusing on the Ghostty WASM renderer's dirty-row snapshot loop and its frame-boundary handling. Compare the web/desktop path with the Android Ghostty JNI bridge, then reproduce rapid Neovim scrolling; done means no torn frames and automatic recovery without recreating the terminal session.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, wasm
Domain
cli, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.