fix(desktop): lone tile header beats persisted headerHidden (unclosable dead zone) - #86191
fix(desktop): lone tile header beats persisted headerHidden (unclosable dead zone)#86191zmuleyu wants to merge 1 commit into
Conversation
…le dead zone) A lone preview/session tile whose zone had a persisted headerHidden:true (a double-tap hide, or a leftover from older builds) rendered with no tab strip: no tab to grab, no close gesture, and the webview/iframe body swallows right-click and focus, so neither the zone menu nor Ctrl+W could reach it — a layout reset was the only escape. resolveZoneHeaderHidden() centralizes the precedence: headerVeto wins; a lone closeable tile (forceLoneHeader) keeps its strip even over a persisted hide; every other zone keeps the user's persisted choice as before.
fix(desktop): lone tile header beats persisted headerHidden (unclosable dead zone) The precedence logic is clearly documented and the test matrix covers the important corners. Minor observations:
No blocking issues. |
Problem
A lone preview/session tile in a zone with a persisted
headerHidden: true(set by the double-tap-on-strip gesture, or left over from an older build) renders with no tab strip: no tab to grab and no close gesture. Because preview bodies are webview/iframe guests, right-click (zone menu) and keyboard focus never reach the host, so the zone menu's Close and ⌘W are both unreachable. The zone becomes an unclosable dead zone;normalizedeliberately preserves the persisted flag across restarts, so the only escape was a full layout reset.Repro: open a URL preview (it docks as its own lone zone,
placement: 'main') → double-click its tab strip to hide the header → restart the app (flag persists) → the preview has no strip and cannot be closed from the visible UI.Fix
forceLoneHeaderForPanesalready encodes the invariant "a closeable surface never becomes an unclosable dead zone", butTreeGroupevaluatednode.headerHidden ??before it, so the persisted flag silently won. This extracts the decision intoresolveZoneHeaderHidden()with explicit precedence:headerVeto(full-page views) still suppresses the strip;forceLoneHeader) keeps its strip even over a persisted hide — the fix;Tests
resolveZoneHeaderHiddencases inlone-header.test.ts: the dead-zone regression (persisted hide + lone tile → strip), veto, preserved choices, defaults.npx vitest run src/components/pane-shell: 20 files / 109 tests pass.tsc --buildclean.