fix: restore full masked refresh on every panel activation#314
Merged
Conversation
…swap ghosting" This reverts commit 7654d9f.
The full reset+replay on panel activation is load-bearing for paint correctness, not just a buffer re-sync. Two shipped attempts to lighten it both regressed rendering: - v2.4.11 replaced it with a light fit+repaint: stale frames from the hide->show renderer swap survived as ghosted/overdrawn rows - v2.4.14 kept WebGL contexts across hides and cleared the texture atlas on attach: xterm terminals sharing a font/theme share ONE texture atlas, so the clear poisoned other live terminals' glyph cache — garbage glyphs that only repaired where text was selected (selection re-rasterizes those cells) Restore the v2.4.10 (#308) activation policy: full masked refresh on every panel activation and always in battery saver; the light silent repaint remains only for pure performance-mode window refocus, where no renderer swap occurred. Replay cost stays bounded by the v2.4.11 wins that remain (single replay, 512KiB getState cap, no 8MB serialized snapshot tag-along). Also documents the shared-atlas hazard and marks the activation refresh as do-not-remove without an offline renderer-swap repro.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reverts the two attempts to lighten the activation refresh (v2.4.11 light repaint, v2.4.14 WebGL keep-alive + atlas clear) and restores the proven v2.4.10 (#308) painting policy: full masked reset+replay on every panel activation, light silent repaint only on pure window refocus. Both lightweight approaches shipped rendering regressions in production; the full refresh is load-bearing for paint correctness.
What each attempt broke
clearTextureAtlason attach): xterm terminals with the same font/theme share one texture atlas — clearing it from one terminal poisoned every other live terminal's glyph cache. Symptom: garbage glyphs that self-repair only where text is selected (selection re-rasterizes those cells with new colors → fresh atlas entries).What is kept from the perf work
getStatecap and no 8MB serialized-snapshot tag-along — bounds each replayCode changes
needsFullActivationRefreshRefback touseRef(true), re-armed on every panel hide (and battery saver), consumed on execution — i.e. fix: repaint terminal panels on window refocus (#306) #308's exact depth policypanelActivationRef/showMasksplit (mask == full refresh again)clearTextureAtlasPre-Merge Testing
Build Verification
pnpm typecheckpassespnpm lintpasses (0 errors)