feat(app): recursive splits (quarters) + window chooser via command palette - #64
Conversation
…alette (#64) Two features, both tmux-inspired: 1. **Recursive splits (quarters):** A pane that's already inside a split can itself be split, nesting a second SplitContainerView inside the first. Each container still holds exactly 2 children -- nesting is compositional, not a tree model rewrite. Depth capped at 2 (max 4 panes per tab). ⌘⇧\ and ⌘⇧- now work on the focused pane regardless of nesting level. ⌘W collapses the innermost split first. 2. **Window chooser (⌘⇧A):** Opens the command palette with dynamic Space entries, so you can fuzzy-search and switch between open Spaces -- the Umber equivalent of tmux ctrl-b w. No new floating panel; reuses the proven CommandPalette infrastructure. Architecture (splits): - SplitEntry.swift: the data model -- a primary's peer, direction, and optional sub-splits on either half (primarySubSplit / peerSubSplit) - SplitContainerView gains replaceChild(_:with:) for swapping a leaf with a nested container - SpaceViewController+Splits.swift: makeSplit now has 3 cases (no split, outer split, sub-split). Teardown is 3-phase sequential loops, no recursion - SpaceViewController+SplitFocus.swift: spatial focus movement via bounding-rect geometry (works for 2, 3, or 4 panes) - SpaceViewController+SplitPresentation.swift: dimming + click callbacks + nested container restoration on tab switch Audited for: retain cycles (all closures use [weak self]), view hierarchy consistency (replaceChild owns removeFromSuperview, no zombie views), teardown completeness (sub-peers closed before outer peers), focus correctness (spatial rather than binary toggling). SpaceViewController.swift was already 354 LOC (4 over ceiling) before this change; this commit reduces it by 1 to 353. The pre-existing ceiling violation is not addressed here.
|
F7's claim about Config.swift at 427 LOC is verified but this is a pre-existing violation not introduced by this PR. SpaceViewController at 353 is also pre-existing (was 354, reduced by 1 per PR body). Both are pre-existing carries, not introduced by PR #64. Wave 1.5 verification manifest:
Now I need to dispatch Wave 2 synthesis. But first -- since there is one finding that was F1 is straightforward: the asymmetry between become (fans via F2's inference ("leaving views in partially-detached state is problematic") was already partially debunked by Wave 1.5 -- No overridden findings depart from the default blocking table in ways that need shadow-verify (all three medium findings from the security agent were correctly marked I'll proceed directly to the synthesis. PR #64 Review: feat(app): recursive splits (quarters) + window chooser via command paletteReviewed ref: Blocking findings1.
|
…ordering, LOC ceiling splits, nits
Re-review: fix commit 1e7fac0Reviewed ref: Blocking findings from prior review — status
All 123 source files within the 350-line ceiling. Build clean. New findings from fix commitNone blocking. 1.
|
Two tmux-inspired features:
1. Recursive Splits (Quarters)
A pane that's already inside a split can itself be split, creating up to 4 panes (quarters) per tab. The implementation nests
SplitContainerViewinstances -- each container still holds exactly 2 children, and nesting is compositional. Depth capped at 2.How it works:
⌘⇧\or⌘⇧-: splits the tab into 2 panes (same as v1)⌘⇧\or⌘⇧-on a focused pane: creates a sub-split inside that half, yielding 3 or 4 panes⌘W: collapses the innermost split first, then the outer split on the next press⌘⇧H/J/K/L: spatial focus movement via bounding-rect geometry (works for 2, 3, or 4 panes)New files:
SplitEntry.swift-- the data model (peer document + optional sub-splits)SpaceViewController+SplitFocus.swift-- spatial focus movementSpaceViewController+SplitPresentation.swift-- dimming, click callbacks, nested container restoration2. Window Chooser (⌘⇧A)
Opens the existing command palette with dynamic Space entries, so you can fuzzy-search and switch between open Spaces. The Umber equivalent of tmux
ctrl-b w. No new floating panel -- reuses the provenCommandPaletteinfrastructure (~20 lines total).Verification
swift build-- clean (no new warnings)check-keybindings.sh-- all 17 cases passcheck-space-restore.sh-- all 13 cases passcheck-command-outcome.sh-- all cases passcheck-cursor-style.sh-- all cases passcheck-renderer-config.sh-- all cases passcheck-shell-integration.sh-- all cases passcheck-file-size.sh-- all new files under 350-LOC ceiling. SpaceViewController.swift at 353 is pre-existing (was 354, reduced by 1).