Skip to content

Vim window tree: splits, ctrl+w chords, multi-window rendering (phase 2)#86

Closed
gammons wants to merge 10 commits into
window-management-phase1from
window-management-phase2
Closed

Vim window tree: splits, ctrl+w chords, multi-window rendering (phase 2)#86
gammons wants to merge 10 commits into
window-management-phase1from
window-management-phase2

Conversation

@gammons

@gammons gammons commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Stacked on #81 (command mode + ctrl+w reclaim). Merge that first; this PR's base is window-management-phase1.

Summary

  • New pure-data internal/ui/wintree package: vim-style split tree with exact-tiling geometry, simulate-and-check minimum-size refusal (validates actual resulting rects, rolls back), Close/Only/Cycle, and geometric ctrl+w h/j/k/l neighbor lookup
  • :sp / :vsp / :q / :only (:on) commands plus the full ctrl+w chord set (s v h j k l w q c o) behind a pending-key state with a status-bar hint — disarmed centrally on any mode change
  • Multi-window rendering: the focused window renders the real (cached) messages pane at its rect; unfocused windows render placeholder panes (Phase 3 makes them live). Single-window rendering is byte-identical to today — test-pinned
  • Phase 2 semantics: one live model; focusing a window on a different channel re-dispatches the standard channel selection (documented interim, replaced by per-window models in phase 3)
  • Hardening from review: workspace-switch window-tree reset (cross-workspace state leak), resize-after-split crash clamps, interim mouse guard in split mode (full routing is phase 4)

Spec: docs/superpowers/specs/2026-06-11-window-management-design.md (§1, §4-6, Phasing item 2); plan: docs/superpowers/plans/2026-06-11-window-management-phase2-window-tree.md (on main).

Test Plan

  • 27 wintree unit tests (tiling incl. odd/offset bounds, refusal incl. nested-sibling regression, rollback exactness, navigation overlap rules)
  • App-level tests: commands, chords (incl. esc-mid-chord swallow, hint lifecycle, mode-change disarm), workspace-switch reset, hard-shrink crash regressions, split-mode mouse guard
  • Full suite green (go test ./... -count=1), vet clean, every commit builds
  • Manual smoke: :vsp → side-by-side with live focused pane + placeholder; ctrl+w h/l moves focus and live pane follows channel; :q/ctrl+w o collapse; shrink until "Not enough room"; ? lists window commands

@gammons

gammons commented Jun 11, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #87, which combines all three window-management phases into one mergeable PR.

@gammons gammons closed this Jun 11, 2026
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