Skip to content

fix: prevent terminal white flash when closing a split - #99

Merged
chenbstack merged 1 commit into
chenbstack:mainfrom
defia:fix/pane-close-white-screen
Aug 10, 2026
Merged

fix: prevent terminal white flash when closing a split#99
chenbstack merged 1 commit into
chenbstack:mainfrom
defia:fix/pane-close-white-screen

Conversation

@defia

@defia defia commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • defer stale outgoing surface-host claims until the current SwiftUI commit completes
  • keep the newer surviving host attached instead of briefly detaching the Ghostty surface
  • cover the pre-commit host arbitration race with a regression test

Root cause

When a split collapsed, the incoming host could claim the surviving surface before it entered the window. A final update from the outgoing tree then treated that detached incoming host as abandoned and stole the surface back, leaving the survivor blank until a later SwiftUI update restored it.

Performance

The normal path adds only generation and attachment-state comparisons. The race path schedules one main-queue callback; there is no polling, timer, or continuous redraw.

Verification

  • PerformanceRegressionTests: 25 passed, 0 failed
  • full Debug build succeeded
  • live Ghostty/IOSurface reproduction no longer observed a detach; resized IOSurface appeared in about 4 ms

@chenbstack
chenbstack merged commit 41cac9e into chenbstack:main Aug 10, 2026
1 check passed
CtriXin pushed a commit to CtriXin/glint that referenced this pull request Aug 10, 2026
CtriXin pushed a commit to CtriXin/glint that referenced this pull request Aug 10, 2026
Tracks upstream chenbstack/glint v0.1.27-beta.2: two-finger touch
scrolling and stale-connection recovery in Web Remote (chenbstack#97), and the
white-flash fix when closing a split (chenbstack#99). Both cherry-picked cleanly
onto the distribution branch.
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.

2 participants