[Bug]: Terminal UI corrupts and gets permanently stuck when scrolling in Neovim
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/web
Steps to reproduce
- Open a project in T3 Code and open its integrated Terminal panel.
- Inside the terminal, launch nvim against any file.
- Scroll within Neovim (e.g. Ctrl-D/Ctrl-U, mouse wheel, or j/k repeated quickly) so it repaints the screen rapidly.
- 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
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/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