Glass polish 2: central split cap, keyboard access, disabled split buttons - #301
Merged
Conversation
…split buttons - Split cap (4 panes) moves from a button-only check to the BonsplitDelegate shouldSplitPane veto, so Cmd+D, drag-to-edge, and socket splits respect it; session restore bypasses the veto so pre-cap layouts round-trip intact - Split capsule disables with a Split limit reached tooltip at the cap instead of vanishing - Anchor frame/bounds/window-join observers are per-object now; the global pair only serves the ancestor-resize path - ensureInstalled caches the terminal host instead of re-walking the window - Tab pills join the key-view loop (Full Keyboard Access gated), activate on Space/Return, draw a capsule focus ring
…ion test test_g19_alternating_close_reverse and test_new_tab_interactive_after_splits each created 5 panes; the new shouldSplitPane veto refuses the 4th split, so both would die mid-setup. Both now build exactly 4 panes. New test_split_pane_cap asserts the 4th split is refused and the layout survives.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Second polish pass on the glass chrome (#299, #300). The 4-pane split limit now actually holds: it was only a button check, so Cmd+D or dragging a tab to a pane edge could still create a fifth pane while the UI claimed the limit was reached. The limit is now a single predicate enforced in the split operation itself, and session restore bypasses it so older saved layouts with more than 4 panes still come back whole. Also: keyboard users can reach tab pills, and the split buttons explain themselves at the cap instead of disappearing.
Summary
SplitPolicy.maxPanesPerWorkspace(4) enforced viaWorkspace'sshouldSplitPanedelegate veto; everysplitPanecall site already rolls back cleanly on nil.isRestoringSessionLayoutbypasses the veto duringrestoreSessionLayout.ensureInstalled()caches the terminal host weakly, re-finding only when it leaves the window.acceptsFirstRespondergated on Full Keyboard Access (a plain click cannot pull focus off the terminal), Space/Return activate, capsule-shaped focus ring.Test plan