mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-09 15:07:10 +02:00
cc6f8d646bbd8d6179c334959eb261f78803cee7
Add per-workspace layout configuration with smart auto-balancing: **Core Changes:** - Add LayoutConfig interface to Workspace type with insertionMode, splitPercentage, insertionPosition - Create layout-utils.ts with smart direction algorithm that auto-balances horizontal/vertical splits - Update addWindow() to use workspace layoutConfig instead of hardcoded values - Migrate state from v7→v8, adding layoutConfig to all workspaces with smart defaults **Smart Direction Algorithm:** - Analyzes layout tree to count horizontal vs vertical splits - Automatically balances by favoring the less-common direction - Defaults to horizontal (row) for first split - Provides foundation for "Balanced (auto)" insertion mode **Testing:** - Add 30 comprehensive tests for layout-utils.ts (tree analysis, smart direction, window insertion) - Add 30 tests for logic.ts addWindow() with different layout configs (row/column/smart modes) - Update migration tests to verify v6→v7→v8 and v7→v8 paths **Migration:** - v7→v8 adds layoutConfig with defaults: smart mode, 50% split, second position - All existing workspaces automatically get smart auto-balancing behavior Implements orthogonal design: layout behavior = workspace settings (not command flags)
Languages
TypeScript
98.9%
CSS
0.8%
JavaScript
0.3%