Alejandro Gómez dd40a5baca feat: make layout presets adaptive to all windows
Major redesign of preset system from static templates to adaptive algorithms:

**Grid preset** (fully adaptive):
- Now arranges ALL windows in best-fit grid (2x2, 2x3, 3x3, etc.)
- Minimum: 2 windows (down from 4)
- Algorithm calculates optimal rows/cols for any N windows
- Examples:
  * 4 windows → 2×2 grid
  * 6 windows → 2×3 grid
  * 9 windows → 3×3 grid

**Side-by-side preset** (adaptive with limit):
- Arranges 2-4 windows in single horizontal row
- Maximum 4 windows (prevents unusably narrow splits)
- Equal splits: 50%, 33%, 25%
- Clear error message if >4 windows

**Main + Sidebar preset** (unchanged):
- Already worked correctly (intentionally hierarchical)
- One main window (70%) + sidebars stacked (30%)
- Adapts naturally to any N ≥ 2 windows

Architecture changes:
- Replace static MosaicNode templates with generate() functions
- Add minSlots/maxSlots instead of single slots field
- Implement buildHorizontalRow(), buildVerticalStack(), buildGridLayout()
- Remove fillLayoutTemplate() (no longer needed)
- Remove extra window stacking (all windows now equal)

Benefits:
- No arbitrary hierarchy (no "featured" vs "extra" windows)
- Matches tiling window manager patterns (Amethyst, yabai, etc.)
- More intuitive: "grid" grids ALL windows, not just first 4
- Better UX: Works with any number of windows in range

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 13:14:35 +01:00
2025-12-16 12:55:07 +01:00
👶
2025-12-09 16:26:31 +01:00
2025-12-11 00:09:26 +01:00
2025-12-17 11:44:12 +01:00
2025-12-13 15:06:05 +01:00
2025-12-10 13:00:39 +01:00
👶
2025-12-09 16:26:31 +01:00
2025-12-15 22:19:28 +01:00
2025-12-18 10:59:38 +01:00
👶
2025-12-09 16:26:31 +01:00
👶
2025-12-09 16:26:31 +01:00
👶
2025-12-09 16:26:31 +01:00
👶
2025-12-09 16:26:31 +01:00
2025-12-14 16:50:16 +01:00
2025-12-12 22:22:28 +01:00
Description
No description provided
MIT 14 MiB
Languages
TypeScript 98.9%
CSS 0.8%
JavaScript 0.3%