Commit Graph

145 Commits

Author SHA1 Message Date
Alejandro Gómez
2987a37e65 feat: spells 2025-12-20 14:25:40 +01:00
Alejandro Gómez
a39dc658cd feat: make workspace tabs reorderable via drag and drop 2025-12-19 22:10:42 +01:00
Alejandro Gómez
8f80742ef1 feat: tab names 2025-12-19 12:49:29 +01:00
Alejandro Gómez
812b719ea0 feat: debug command, simplify state 2025-12-18 23:32:00 +01:00
Alejandro Gómez
1b9e50ed89 fix: scroll shift as new events are added to the timeline 2025-12-18 23:12:38 +01:00
Alejandro Gómez
3f45cebaee feat: more flexible -e flag 2025-12-18 17:08:11 +01:00
Alejandro Gómez
f6f813d382 refactor: collapse migrations 2025-12-18 16:49:24 +01:00
Alejandro Gómez
f283ef6208 docs: improve 2025-12-18 16:25:34 +01:00
Alejandro Gómez
967f1eb89b ux: improvements to keyboard navigation 2025-12-18 16:14:56 +01:00
Alejandro Gómez
a6650ff6e1 fix: type errors 2025-12-18 16:00:56 +01:00
Alejandro Gómez
1c981a4e12 chore: add playwright files to gitignore 2025-12-18 15:46:19 +01:00
Alejandro Gómez
6f76109d66 ai: keyboard navigation 2025-12-18 15:46:02 +01:00
Alejandro Gómez
5cc97484b5 fix: improved balanced window algo 2025-12-18 15:45:34 +01:00
Alejandro Gómez
3fba62b316 ui: simpler streams 2025-12-18 15:29:01 +01:00
Alejandro Gómez
b57ff31907 feat: balance layout and kbd workspace navigation 2025-12-18 13:47:40 +01:00
Alejandro Gómez
1581e313f3 test: add comprehensive tests for grid layouts with odd numbers
Verify that grid preset correctly handles uneven window counts:
- 2 windows → 1×2 grid
- 3 windows → 1×3 single row
- 4 windows → 2×2 perfect grid
- 5 windows → 2×3 grid (last row expands to fill)
- 7 windows → 2×4 grid (last row expands)
- 9 windows → 3×3 perfect grid
- 11 windows → 3×4 grid (last row expands)

Key behaviors verified:
- No empty space (last row windows expand to 100% width)
- All windows preserved in layout
- Window order maintained (depth-first traversal)
- Works with any N ≥ 2 windows

Also tests:
- Side-by-side with 2-4 windows (and error for 5+)
- Main + Sidebar with various window counts
- Error handling for too few/many windows

All 22 tests pass ✓

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 13:20:38 +01:00
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
Alejandro Gómez
b81ac599a2 feat: improve layout animations and consolidate controls
Animation improvements:
- Use professional easing curve: cubic-bezier(0.25, 0.1, 0.25, 1)
- Reduce duration from 200ms to 150ms for snappier feel
- Enable animations only during preset application (not manual resize/drag)
- Add CSS layout containment for better performance
- Add/remove 'animating-layout' class to control when animations occur

UI consolidation:
- Merge layout preset dropdown and insertion settings into single control
- Create unified LayoutControls component with sections:
  * Presets (apply existing layouts)
  * Insert Mode (balanced/horizontal/vertical)
  * Split ratio slider with +/- buttons
- Remove separate icons, now just one SlidersHorizontal button
- Cleaner, more discoverable interface

Benefits:
- Smoother, more natural-feeling animations
- No animation jank during manual operations
- Single unified control reduces UI clutter
- All layout settings in one place

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 13:02:19 +01:00
Alejandro Gómez
4c19ad2fd3 chore: install @radix-ui/react-popover dependency
Required for the new compact popover-based layout settings UI.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 12:57:09 +01:00
Alejandro Gómez
d624b5b05a ui: simplify layout settings and add smooth animations
- Remove success notification when applying layouts (keep only errors)
- Add CSS transitions for smooth window resizing/repositioning
- Replace large settings Dialog with compact Popover
- Reduce settings UI from ~220 lines to ~97 lines
- Remove verbose descriptions and preview section
- Make settings match site's minimal UI patterns
- Settings now update live without Save/Cancel buttons
- Create popover.tsx component using Radix UI primitives

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 12:55:26 +01:00
Alejandro Gómez
f2599772f6 fix(ui): reorganize bottom bar and clarify preset requirements
Changes:
- Added TODO comment about IndexedDB unavailability in test runtime
- Moved layout preset selector to rightmost side of bottom bar
- Moved window settings button to rightmost side as well
- Removed per-workspace settings icon (now global button on right)
- Added spacer to separate workspace tabs from layout controls
- Changed preset descriptions to show "4+ windows" instead of "4 windows"
  to clarify that presets work with more windows than the minimum
- Changed dropdown alignment from "start" to "end" for right-aligned opening

The bottom bar now has clearer visual separation:
[Workspace Tabs] [+] ................ [Layout Presets] [Settings]

Generated with [Claude Code](https://claude.com/claude-code)
2025-12-18 12:27:54 +01:00
Alejandro Gómez
4db7e9690c refactor(layouts): simplify to global config + preserve windows + add UI dropdown
Simplified layout system based on user feedback:

**1. Global Layout Config (Simpler)**
- Moved layoutConfig from per-workspace to global state
- One configuration applies to all workspaces (easier to understand)
- Updated state migration v8→v9 to move config to global level
- Updated WorkspaceSettings UI to edit global config
- Renamed updateWorkspaceLayoutConfig → updateLayoutConfig

**2. Preserve Extra Windows (Fixed Bug)**
- Fixed applyPresetToLayout to keep windows beyond preset slots
- When applying 4-window grid to 6 windows, windows 5-6 are preserved
- Extra windows stacked vertically on right side (70/30 split)
- No more window loss when applying presets

**3. Layout Dropdown in TabBar (Better UX)**
- Added dropdown menu next to workspace tabs
- Shows all available presets with icons (Grid2X2, Columns2, Split)
- Displays window requirements and availability
- Disables presets that need more windows than available
- One-click preset application with toast feedback
- More accessible than /layout command

All tests passing (457 passed). State migration handles v6→v7→v8→v9 correctly.

Generated with [Claude Code](https://claude.com/claude-code)
2025-12-18 12:24:00 +01:00
Alejandro Gómez
52f39a8073 feat: add layout presets system with /layout command
Phase 3 implementation:
- Created layout-presets.ts with 3 built-in presets (side-by-side, main-sidebar, grid)
- Implemented fillLayoutTemplate() for recursive template filling with window IDs
- Added collectWindowIds() for depth-first traversal of layout trees
- Created applyPresetToLayout() to reorganize existing windows

- Created layout-parser.ts for /layout command argument parsing
- Added layout command to man.ts with documentation and examples

- Built LayoutViewer component with:
  * Visual preset gallery with diagrams
  * Window count validation
  * Apply preset functionality
  * Error handling for insufficient windows
  * Command-line preset specification support

- Wired LayoutViewer into WindowRenderer with lazy loading
- Added "layout" to AppId type definition
- Exposed applyPresetLayout in useGrimoire hook

Presets allow users to quickly reorganize multiple windows into
common layouts: 50/50 splits, 70/30 main+sidebar, or 2×2 grids.

Generated with [Claude Code](https://claude.com/claude-code)
2025-12-18 12:13:28 +01:00
Alejandro Gómez
a78b5226ce feat(layouts): Phase 2 - workspace settings UI
Add per-workspace layout configuration UI with visual controls:

**Core Changes:**
- Add updateWorkspaceLayoutConfig() function to logic.ts for updating workspace layout settings
- Expose updateWorkspaceLayoutConfig in useGrimoire hook

**UI Components:**
- Create WorkspaceSettings dialog with three sections:
  * Insertion Mode selector (Balanced/Horizontal/Vertical) with icons
  * Split Percentage slider (10-90%) with real-time preview
  * Insertion Position toggle (Left-Top/Right-Bottom)
- Add settings icon (SlidersHorizontal) to workspace tabs that appears on hover
- Settings button opens configuration dialog for that workspace

**UX Details:**
- Settings icon only visible on hover to reduce visual clutter
- Clear visual feedback for selected options with primary color highlights
- Preview section shows current configuration in plain language
- Reset to Defaults button restores smart mode defaults
- Prevents workspace switch when clicking settings icon

**Icons Used:**
- Sparkles: Balanced (smart auto-balancing)
- SplitSquareHorizontal: Horizontal splits
- SplitSquareVertical: Vertical splits
- SlidersHorizontal: Settings access

Each workspace can now have independent layout behavior configured through an intuitive UI.
2025-12-18 12:05:47 +01:00
Alejandro Gómez
cc6f8d646b feat(layouts): Phase 1 - workspace layout configuration system
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)
2025-12-18 11:59:45 +01:00
Alejandro Gómez
727c38d2ef fix: note reply mentions 2025-12-18 11:32:41 +01:00
Alejandro Gómez
6c6f3728c0 ui: adjust spacing for quote skeletons 2025-12-18 11:10:30 +01:00
Alejandro Gómez
1ebd38dfd3 chore: add todo 2025-12-18 10:59:38 +01:00
Alejandro Gómez
a066284825 chore: petrify 2025-12-18 10:19:52 +01:00
Alejandro Gómez
a7dd4635dc feat: kind schemas and better man pages 2025-12-18 10:18:53 +01:00
Alejandro Gómez
3b06e23686 ui: improve man page layout for options and examples
- Display option flags on separate lines with indented descriptions to prevent overflow
- Parse and separate example commands from their descriptions
- Highlight commands in accent color with muted descriptions below
- Increase spacing between items for better readability
2025-12-18 09:37:14 +01:00
Alejandro Gómez
97c89142ae wip: live video events 2025-12-17 11:44:12 +01:00
Alejandro Gómez
c9a6df928e feat: relay liveness tracking 2025-12-17 10:26:59 +01:00
Alejandro Gómez
8fe0ffd5c3 ui: only show direct replied to 2025-12-17 09:48:11 +01:00
Alejandro Gómez
ce18567900 feat: kind 11 and 1111 renderer, show reply and root 2025-12-16 23:34:28 +01:00
Alejandro Gómez
63121f6233 feat: add title command line flag 2025-12-16 20:50:03 +01:00
Alejandro Gómez
6126f43e34 ui: aspect ratios, url styles in auth prompt 2025-12-16 17:28:50 +01:00
Alejandro Gómez
24d2640774 feat: since and until 2025-12-16 14:15:16 +01:00
Alejandro Gómez
a7059c8e8f feat: outbox relay selection 2025-12-16 12:55:07 +01:00
Alejandro Gómez
6f05f414d3 feat: case insensitive names 2025-12-16 00:07:20 +01:00
Alejandro Gómez
f4a0d5e669 feat: -P filter tag 2025-12-15 23:42:19 +01:00
Alejandro Gómez
390290d2eb wip: skeletons 2025-12-15 22:19:28 +01:00
Alejandro Gómez
aa2e74bcd7 feat: show zapped e and a 2025-12-15 17:57:20 +01:00
Alejandro Gómez
a5d2ccacea fix: don't show copy on single line code samples 2025-12-15 17:57:07 +01:00
Alejandro Gómez
88a6e38ee9 refactor: use applesauce for profile parsing 2025-12-15 17:38:51 +01:00
Alejandro Gómez
78a2deeadd ai: theme 2025-12-15 17:30:18 +01:00
Alejandro Gómez
98723a25aa refactor: consolidate markdown renderer 2025-12-15 16:59:57 +01:00
Alejandro Gómez
001424b611 fix: break long ass links 2025-12-15 16:53:01 +01:00
Alejandro Gómez
6ff877e8a5 refactor: unify nostr markdown rendering 2025-12-15 15:54:45 +01:00
Alejandro Gómez
5dd885b888 feat: community NIPs 2025-12-15 15:42:11 +01:00