Conversation
Plan: mac-terminal-performance (tmp/done-plans/2026-07-06) - Terminal activation no longer does reset()+full-scrollback replay twice; performance mode does fit+refresh behind the existing activation mask, batterySaver keeps a single re-sync - WebGL reattach paints after next layout (fixes blank canvas on refocus) - Light themes use a baked inverted palette instead of a per-frame invert()+hue-rotate() compositor filter over every terminal canvas; minimumContrastRatio 4.5 in light mode - terminal:getState omits the serialized snapshot when raw scrollback exists and caps restore payloads at 512KiB (matches Orca/Superset) - Serialize-on-hide throttled to 10s per panel - CSS animations pause on window blur, not just document.hidden
…ecycle Background-mounted keep-alive tabs ran fitAddon.fit() against their display:none (0x0) container at mount, post-restore, and font change. FitAddon has no cols floor, so the grid shrank to a few columns and background PTY output parsed into a garbage-width buffer that xterm reflow cannot repair. The old every-activation reset+replay silently rebuilt the buffer on view, masking the defect; the light activation repaint exposed it. - Skip grid fits when the container is below MIN_VIABLE_RECT_PX (mount, post-restore, font-change), matching resizePtyToFit - Arm needsFullActivationRefreshRef when the mount fit is skipped, so the first activation of a hidden-mounted panel does one full replay - Add a component-level lifecycle doc covering mount/hidden/activation/ WebGL/persistence/unmount invariants
6 tasks
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
Fixes the multi-second freezes when switching panes/tabs on macOS and the high GPU-helper energy impact (300–400 in Activity Monitor). Root causes found by investigation: every terminal activation replayed its full scrollback through xterm's parser twice (avg 585KB, max 4.8MB per panel measured in a live DB), and light themes ran a per-frame
invert(1) hue-rotate(180deg)compositor filter over every terminal canvas.Work Completed
Mac terminal performance (tmp/done-plans/2026-07-06-mac-terminal-performance.md)
reset(), no scrollback replay. Battery saver keeps exactly one full re-sync (its PTY output is cadence-gated while hidden, so the buffer can genuinely be stale). The manual Refresh button keeps full replay.:root.lightnow defines real--color-terminal-*tokens computed as the exactinvert+hue-rotateof the dark palette, so ANSI output looks identical to the old filtered rendering with zero per-frame GPU cost; the.light .xtermfilter rule is deleted. Truecolor TUI content now shows true colors (standard emulator behavior).minimumContrastRatio4.5 in light mode.terminal:getStateno longer ships the up-to-8MB serialized snapshot alongside raw scrollback, and restore payloads are ceilinged at 512KiB (matches Orca'sTERMINAL_SCROLLBACK_REPLAY_BYTE_LIMITand Superset'sMAX_HISTORY_SCROLLBACK_BYTES).window-blurredroot class wired towindow:focus-changed, not justdocument.hidden(which rarely fires for a visible-but-unfocused window on macOS).Pre-Merge Testing
[Session Restored]markerBuild Verification
pnpm typecheckpasses (all workspaces)pnpm lintpasses (0 errors)pnpm build:main+pnpm build:frontendpass (xterm request-mode build verification OK)