mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-09 15:07:10 +02:00
dd40a5baca9ee2fe7ad744f9cd9d946f3b40e4c7
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>
Languages
TypeScript
98.9%
CSS
0.8%
JavaScript
0.3%