Apply render suspend to canvas terminals
Closed
AU
2mo ago+68+68+01234567890123456789-18-18-01234567890123456789
Fixes #5497
Summary
- apply renderer visibility bookkeeping when canvas terminal panes enter/leave the render region
- realize terminal renderers before canvas panes unocclude again
- cover canvas terminal render visibility with a regression test
Validation
- git diff --check
- ./scripts/lint-pbxproj-test-wiring.sh
- python3 scripts/check-package-resolved-policy.py
- python3 scripts/check-workspace-package-groups.py --check
Note: per task instructions, I did not run reload.sh or xcodebuild.
Summary by cubic
Suspend canvas terminal rendering when panes leave the render region, and resume by realizing the renderer when they re-enter. Fixes #5497 by stopping offscreen draws, preventing GPU leaks on deselected canvas tabs, and avoiding frozen terminals on re-host.
-
Bug Fixes
- Drive terminal renderer portal visibility and occlusion from canvas render state; call realizeRenderer() when rendering turns on.
- On unmount, hide via the authoritative portal path (setVisibleInUI(false)) to keep portal visibility/occlusion in sync, allow renderer reclaim, and ensure clean re-hosts.
-
Tests
- Migrate visibility-policy and geometry callback tests to Swift Testing; add regressions for render on/off and portal-hidden state after unmount.
- Fix canvas renderer visibility test fixture.
Summary by CodeRabbit
- Bug Fixes
- Improved terminal rendering lifecycle by toggling renderer portal visibility and realizing the renderer only when rendering is enabled.
- Updated unmount behavior to hide the terminal through the authoritative UI path, keeping portal state consistent and avoiding reconciliation leftovers.
- Tests
- Migrated visibility-policy and geometry callback tests from XCTest to Swift’s
Testing. - Added/updated coverage to verify renderer portal visibility and realization when rendering toggles and after unmount.
- Migrated visibility-policy and geometry callback tests from XCTest to Swift’s