Skip to content

terminal: fix split sizing and renderer teardown - #8213

Open
MisterTea wants to merge 1 commit into
vercel:canaryfrom
MisterTea:split_dimensions_race_condition
Open

MisterTea wants to merge 1 commit into
vercel:canaryfrom
MisterTea:split_dimensions_race_condition

Conversation

@MisterTea

Copy link
Copy Markdown
Contributor

Hi folks. I found some issues when adding tmux -CC support, and here's the PR to go along with my plugin that adds tmux & htm support https://github.com/MisterTea/hyper-htm

Fixes #8032

Split sessions previously started before the renderer reported their final grid, so shells could draw their first prompt at the default PTY size and then be resized afterward. Prepare split sessions immediately but defer PTY construction until resize events settle, buffering existing-session resizes while the split layout is pending.

Run terminal fitting without the old 500 ms delay and clear pending fit work when components unmount. Track Canvas and WebGL renderer addons by xterm instance so their ownership survives React remounts.

Dispose renderer addons while xterm's render service is still alive, unpausing and draining deferred resize work first. This avoids the xterm 5.3 teardown ordering error that escaped through the Terms error boundary as a plugin crash or blank screen.

Fixes vercel#8032

Split sessions previously started before the renderer reported their final grid, so shells could draw their first prompt at the default PTY size and then be resized afterward. Prepare split sessions immediately but defer PTY construction until resize events settle, buffering existing-session resizes while the split layout is pending.

Run terminal fitting without the old 500 ms delay and clear pending fit work when components unmount. Track Canvas and WebGL renderer addons by xterm instance so their ownership survives React remounts.

Dispose renderer addons while xterm's render service is still alive, unpausing and draining deferred resize work first. This avoids the xterm 5.3 teardown ordering error that escaped through the Terms error boundary as a plugin crash or blank screen.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Closing a tab results in a blank screen

1 participant