dock: Keep a split filled when its last slot is hidden (#2788)
## Summary A dock split pins every slot to a fixed size with `flex_none` and leaves one flexible, to absorb whatever the container has spare. `render_node` picked that slot by tree position — the last child — without asking whether the slot is drawn at all. A slot whose container holds only hidden panels renders a bare `div` and grows nothing. When that is the trailing slot, every drawn slot stays rigid and the split stops short of its frame, leaving a band of `split_frame`'s own `tab_bar` background under the last visible panel. Hiding a slot is an everyday event: a panel that only applies to some symbols answers `visible` with `false` for the rest. This is a regression from #2772. The old `StackPanel::render` never sized a slot, so every one of them carried `ResizablePanel`'s `flex_grow: 1` and the leftover was always shared out; the rigid slots arrived with the layout engine. `render_node` now picks the last *shown* slot. The new test builds a three-slot dock over `HideableProbe`, measures what each slot is really drawn at, and walks every subset of hidden slots. Only the subsets that hide the trailing slot regress — a 1080px dock left 277px empty — which is what makes the fix positional rather than a special case. No public API change. ## Test plan - [x] `cargo test -p gpui-base --lib` — 555 passed - [x] `cargo test -p gpui-component --lib` — 447 passed - [x] `cargo clippy -p gpui-base -p gpui-component --all-targets` — no new warnings - [x] `cargo fmt --check` — clean for the changed files - [x] Reverting the one-line pick makes `a_split_fills_its_container_whichever_slots_are_hidden` fail on exactly the trailing-slot subsets 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
J
Jason Lee committed
c6ffd3e166abb43bff8845f0aa61711adb128dcf
Parent: 4922937
Committed by GitHub <noreply@github.com>
on 8/20/2026, 1:48:31 PM