Skip to content

fix: thread minWidth/minHeight through addPane#69

Merged
ohxyz merged 1 commit into
mainfrom
fix/add-pane-min-size
Jun 13, 2026
Merged

fix: thread minWidth/minHeight through addPane#69
ohxyz merged 1 commit into
mainfrom
fix/add-pane-min-size

Conversation

@ohxyz

@ohxyz ohxyz commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

What

addPaneSash declared minWidth/minHeight in its signature but never passed them to the inner split helpers (addPaneSashTo{Left,Right,Top,Bottom}), so a pane added at runtime couldn't carry min-size constraints and silently differed from config-built panes.

This plumbs both props through the full call chain:

  • src/frame/pane-utils.js — all four split helpers accept and forward minWidth/minHeight onto the new Sash; dispatcher threads them; removed the resolved @todo.
  • src/frame/pane.jsFrame.addPane forwards the props.
  • src/binary-window/binary-window.jsBinaryWindow.addPane destructures them out before ...glassProps so they reach super.addPane rather than leaking into glass construction.

Why

Fixes the resolved bullet of the [low] "Unresolved design questions" tech-debt entry — updated docs/TECH_DEBT.md accordingly (the remaining sash.js and frame.js questions stay open).

Tests

New src/frame/pane-utils.test.js:

  • all four directions carry minWidth/minHeight onto the new pane sash
  • omitting the props falls back to Sash DEFAULTS
  • the retained sibling sash keeps its own defaults

Full suite green (30/30).

addPaneSash declared minWidth/minHeight but never passed them to the
inner split helpers, so a pane added at runtime couldn't carry min-size
constraints and silently differed from config-built panes. Plumb both
props through Frame.addPane and BinaryWindow.addPane down to the new
Sash, add coverage in pane-utils.test.js, and drop the resolved @todo
and tech-debt bullet.
@ohxyz ohxyz merged commit 45dca2a into main Jun 13, 2026
@ohxyz ohxyz deleted the fix/add-pane-min-size branch June 13, 2026 06:55
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