feat: define and mitigate unavoidable global retiles in grid new-pane #115

Closed
opened 2026-04-28 01:58:02 +00:00 by barrettruth · 0 comments
barrettruth commented 2026-04-28 01:58:02 +00:00

Problem

grid has pane counts where the final new-pane region is a true global repartition rather than a child split of any current pane. It also has smaller role-shift cases like 2 -> 3. Without an explicit issue, those cases get mixed up with avoidable wrong-branch births.

Blocked by: #101, #102

Proposed solution

Define the exact unavoidable global-retile counts and mitigate the rest. At a minimum, this issue should:

  • enumerate the true global-reshape counts in tests and docs
  • separate them from avoidable wrong-branch births in non-global counts
  • decide what “best effort” means for grid when exact first-split birth is impossible

Context

The current matrix identifies true global-reshape counts when current n is k^2 or k(k + 1) for k >= 2, with examples like 4 -> 5, 6 -> 7, and 9 -> 10. Surveyed external plugins (tmux-tiling-revamped, tmux-tilit) simply call built-in tiled after split.

Acceptance notes

  • Do not pretend grid can always be solved with one exact birth split.
  • Make the unavoidable cases explicit and testable.
  • Improve the avoidable cases where possible.

Alternatives considered

  • Keep generic split -> tiled for every grid case.
  • Demand exact first-split births even when the final region is not a refinement of one current pane.
## Problem `grid` has pane counts where the final new-pane region is a true global repartition rather than a child split of any current pane. It also has smaller role-shift cases like `2 -> 3`. Without an explicit issue, those cases get mixed up with avoidable wrong-branch births. Blocked by: #101, #102 ## Proposed solution Define the exact unavoidable global-retile counts and mitigate the rest. At a minimum, this issue should: - enumerate the true global-reshape counts in tests and docs - separate them from avoidable wrong-branch births in non-global counts - decide what “best effort” means for grid when exact first-split birth is impossible ## Context The current matrix identifies true global-reshape counts when current `n` is `k^2` or `k(k + 1)` for `k >= 2`, with examples like `4 -> 5`, `6 -> 7`, and `9 -> 10`. Surveyed external plugins (`tmux-tiling-revamped`, `tmux-tilit`) simply call built-in `tiled` after split. ## Acceptance notes - Do not pretend grid can always be solved with one exact birth split. - Make the unavoidable cases explicit and testable. - Improve the avoidable cases where possible. ## Alternatives considered - Keep generic split -> tiled for every grid case. - Demand exact first-split births even when the final region is not a refinement of one current pane.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/tmux-mosaic#115
No description provided.