test(desktop): pin that a multi-tab zone can still hide its strip
The resolver's own suite only ever asserted `never` against a LONE pane, so the whole-stack stranding check passed every existing case while Hide tabs was dead in the one zone users keep tabs in. Adds the missing count: an explicit `never` is honored once a closeable tile has a neighbor to cycle to, and those same stacks still paint their strip on auto (the rung resolves before `mode`, so a stack it stops claiming has to reach the auto rule). Verified as a tripwire — reverting the resolver fails the first case.
This commit is contained in:
committed by
brooklyn!
parent
2c52945974
commit
b0ab2e163a
@@ -37,7 +37,7 @@ describe('the stored choice', () => {
|
||||
// force-visible rule, so hiding a zone that held only a closeable tile left a
|
||||
// surface with no tab, no ✕ and no menu — the "how do I get it back" reports.
|
||||
describe('no dead zone', () => {
|
||||
it('keeps the strip for a closeable tile even when the zone says never', () => {
|
||||
it('keeps the strip for a lone closeable tile even when the zone says never', () => {
|
||||
expect(resolveTabStripVisible({ mode: 'never', shown: [tile()] })).toBe(true)
|
||||
})
|
||||
|
||||
@@ -60,6 +60,26 @@ describe('no dead zone', () => {
|
||||
})
|
||||
})
|
||||
|
||||
// The regression the rung above caused on its way to holding that invariant.
|
||||
// The stranding check ran over the whole stack, so ONE closeable tile anywhere
|
||||
// in a zone pinned the strip on at any tab count — and main is where tabs
|
||||
// accumulate. Hide tabs (menu row AND ⌘⌥T) silently did nothing there, which
|
||||
// reads as "hide tabs is broken", not as a stranding bug.
|
||||
describe('hiding a stack that has other handles', () => {
|
||||
it('honors never once a closeable tile has a neighbor to cycle to', () => {
|
||||
expect(resolveTabStripVisible({ mode: 'never', shown: [workspace(), tile()] })).toBe(false)
|
||||
expect(resolveTabStripVisible({ mode: 'never', shown: [tile(), tile()] })).toBe(false)
|
||||
expect(resolveTabStripVisible({ mode: 'never', shown: [workspace(), tile(), tile()] })).toBe(false)
|
||||
})
|
||||
|
||||
it('leaves those same stacks alone on auto', () => {
|
||||
// The stranding rung is resolved before `mode`, so a stack it no longer
|
||||
// claims must still reach the auto rule and keep its strip.
|
||||
expect(resolveTabStripVisible({ shown: [workspace(), tile()] })).toBe(true)
|
||||
expect(resolveTabStripVisible({ shown: [tile(), tile()] })).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
// A full-page view is not a tab-able surface, and it lifts itself the moment
|
||||
// the chat comes back — so it outranks even the stranding rule and, unlike
|
||||
// `mode`, is never written to the tree.
|
||||
|
||||
Reference in New Issue
Block a user