feat(dock): recede the inactive group's tabs in a split dock #119
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/inactive-group-recede"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes the known limitation shipped in #112 and #118: with all four
--dv-*-tab-background-colorset totransparent(so the session wash is a tab's only fill), nothing distinguished the focused dock group from an unfocused one. In a split there was no way to tell which half the next panel would open into.Approach
Rather than add chrome, the group you are not acting in steps down one tier, using the three things the tab already paints: wash, underline, name colour.
dockview keeps exactly one
.dv-active-groupat all times — it is last-interacted selection, not DOM focus (BaseGrid.doSetGroupActive), and it never clears when focus leaves the dock. So an inactive group exists if and only if there are two or more, and these rules are inert until the dock is actually split. No group counting, no JS, no new tokens.24 lines of CSS in one file.
The three levers are not equal
Measured across all eight
SESSION_PALETTEcolours, worst case:--surfacevs--surface-2is 1.04:1 — decoration, not signal--text→--mutedThe ordering is the reverse of the intuitive one. The name carries the signal; the wash cannot, and is present only to keep the four states coherent.
Two floors this respects:
--muted. Stepping them to--muted-2measures 3.27:1 — under AA, for very little gain.The underline is explicitly exempt: it is decorative, and the tab is already identified by its name's emphasis.
Why not the obvious alternatives
--accent-dim) is the hue conflict #112 removed.:has()gate so it doesn't sit there permanently on an unsplit dock.Implementation notes
calc()on the alpha rather than new tokens:--wash-tabis a bare number, so one multiplier expresses "one tier down" and keeps tracking the base values if they change.color-mixagainst--sess, notrgba(var(--idc-rgb), …)—--idc-rgbis unset on a tab with no scope, where an invalidvar()computes tocurrentColor.--sessis always defined, and istransparentin exactly that case.Verification
Gates: typecheck 4898 files / 0 errors, lint clean, 121 files / 1202 tests.
Driven in a real split in a running instance (a two-group layout restored through
nexus.dock.layout.v2, which is the genuinefromJSONpath):0.07, namergb(138,138,138), underline--sess / 0.45, hue text--sess / 0.8.0.03, name--muted, no underline.0.14,#e8e8e8, full-strength hue.44pxon both sides — no layout shift.Also checked: Svelte emits all three rules into the built CSS (none pruned); the
.dockview-theme-vsborder-toprules that read the zeroed vars do not apply to ourabysstheme; and the overflow dropdown is portalled to.dv-popover-anchorat the dockview root, so it is outside.dv-inactive-groupand unaffected.Known trade
Once the name drops to
--muted, "which tab is current over there" rests on the wash step and the underline alone. That is intended — you are not acting in that group — but it is the thing to look at in use.Still open, separate
Zeroing the four vars in #112 also emptied
.dv-tabs-overflow-container .dv-active-tab, dockview's own "+N more" list, which has no current-panel highlight. It renders dockview's rows rather thanSessionTab, so the fill there is free to use — a one-liner, not folded into this PR.