Skip to content

Glass polish 2: central split cap, keyboard access, disabled split buttons - #301

Merged
arzafran merged 2 commits into
mainfrom
feat/glass-polish-2
Aug 14, 2026
Merged

Glass polish 2: central split cap, keyboard access, disabled split buttons#301
arzafran merged 2 commits into
mainfrom
feat/glass-polish-2

Conversation

@arzafran

Copy link
Copy Markdown
Member

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 via Workspace's shouldSplitPane delegate veto; every splitPane call site already rolls back cleanly on nil. isRestoringSessionLayout bypasses the veto during restoreSessionLayout.
  • Split capsule disables (tertiary tint, "Split limit reached" tooltip, EN/JA) at the cap instead of hiding; counts registered panes, not visible ones, so split-zoom matches the veto.
  • Portal registry: anchor frame/bounds/window-join observers are object-scoped per pane (registered on publish, removed on remove/teardown); the app-global observer pair now serves only the ancestor-resize path.
  • ensureInstalled() caches the terminal host weakly, re-finding only when it leaves the window.
  • Tab pills: acceptsFirstResponder gated on Full Keyboard Access (a plain click cannot pull focus off the terminal), Space/Return activate, capsule-shaped focus ring.

Test plan

  • CI unit-tests green
  • Manual: with 4 panes open, Cmd+D does nothing and the split capsule shows the disabled tooltip
  • Manual: restore a saved session with 5+ panes — all panes return
  • Manual: Full Keyboard Access on, Tab reaches pills, Return selects; FKA off, clicking a pill keeps terminal focus

…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.
@arzafran
arzafran merged commit 7861b16 into main Aug 14, 2026
10 checks passed
@arzafran
arzafran deleted the feat/glass-polish-2 branch August 14, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant