fix: stop the dock from squeezing the not-classified bucket

The bucket was allowed to shrink inside the capped dock, so an expanded
default workspace squeezed it below one row and left a halved row above the
bar. The bucket now keeps its height (it scrolls on its own past its cap),
the dock never shrinks below its own rows, and the expanded session list is
the only child that gives up height.
This commit is contained in:
qyh15 2026-10-28 20:43:45 +08:00
parent a97644d08c
commit 49ffe318f3
4 changed files with 15 additions and 12 deletions

File diff suppressed because one or more lines are too long

View File

@ -92,26 +92,28 @@
sit outside the tree's scroll area, so a long session list can never push
them away. The dock owns the divider against the tree; the default-workspace
bar adds a second one only when the bucket sits above it.
The dock is a bounded, opaque panel: it may shrink (never grow past its cap),
clips its own overflow, and scrolls its expanded session list internally — so
an expanded default workspace can never be cut off mid-row by the sidebar's
bottom edge, and nothing from the tree ever shows through it. */
The dock is bounded: it never grows past its cap, and it never shrinks below
the height of its own rows. Only the expanded session list gives up height
and scrolls, so no row is ever cut in half (a halved row reads as an overlap)
and nothing from the tree is painted underneath the dock. */
.wgDock {
flex:0 1 auto;
min-width:0;
min-height:0;
/* Never shrink below the dock's own rows: a clipped row would look like an
overlap. The session list is the only child allowed to give up height. */
min-height:min-content;
max-height:min(62vh,560px);
display:flex;
flex-direction:column;
overflow:hidden;
border-top:1px solid var(--dsw-alias-border-l2,#7f7f7f47);
background:var(--dsw-bg-1,transparent);
}
/* The docked bucket scrolls on its own and never grows past a fixed share of
the sidebar: a big "not classified yet" pile must not swallow the tree. */
/* The docked bucket never gives up height to the expanded session list (a
squeezed bucket would clip its own row in half); it scrolls on its own past a
fixed share of the sidebar so a big pile cannot swallow the tree. */
.wgDockBucket {
flex:0 1 auto;
flex:0 0 auto;
min-width:0;
min-height:0;
max-height:min(240px,38vh);

View File

@ -61,7 +61,8 @@ const block = (selector) => {
assert.match(block('.wgDock'), /border-top:1px solid/, 'the dock draws the divider against the tree')
assert.match(block('.wgDock'), /max-height:min\(62vh,560px\)/, 'the dock is capped so the tree always keeps room')
assert.match(block('.wgDock'), /overflow:hidden/, 'the dock clips its own overflow instead of painting over the tree')
assert.match(block('.wgDock'), /background:var\(--dsw-bg-1,transparent\)/, 'the dock paints an opaque surface so nothing shows through')
assert.match(block('.wgDock'), /flex:0 1 auto/, 'the dock gives way to the tree but never grows past its cap')
assert.match(block('.wgDockBucket'), /flex:0 0 auto/, 'the bucket never gives up height, so its row is never cut in half')
assert.match(block('.wgDockBucket'), /overflow-y:auto/, 'a long bucket scrolls on its own')
assert.match(block('.wgDockBucket'), /max-height:min\(240px,38vh\)/, 'the bucket is capped so it cannot swallow the tree')
assert.match(block('.wgDockSessions'), /overflow-y:auto/, 'an expanded default workspace scrolls inside the dock')

View File

@ -66,8 +66,8 @@ assert.ok(!rule('.wgIconGrid').includes('max-height:'), 'the scroll box moved fr
const dock = rule('.wgDock')
assert.ok(dock.includes('border-top:'), 'the dock is separated from the tree')
assert.ok(dock.includes('max-height:') && dock.includes('overflow:hidden;'), 'the dock is capped and clips its own overflow')
assert.ok(dock.includes('background:'), 'the dock paints an opaque surface')
const bucket = rule('.wgDockBucket')
assert.match(bucket, /flex:0\s*0\s*auto;/, 'the bucket keeps its height so its row is never halved')
assert.ok(bucket.includes('overflow-y:auto;') && bucket.includes('max-height:'), 'a long bucket scrolls on its own')
assert.ok(rule('.wgDockSessions').includes('overflow-y:auto;'), 'an expanded default workspace scrolls inside the dock')
assert.ok(rule('.wgDefaultWorkspaceBar .wgProjectRow').includes('flex:none;'), 'the default-workspace row itself never shrinks or scrolls')