Startup sequence now:
1. Creates data directories (~/.local/share/mc/)
2. Cleans up orphaned tmp files from crashes
3. Verifies CLI dependencies (lore, br, bv) asynchronously
4. Emits startup-warnings event with missing CLI warnings
5. Emits cli-availability event with tool status
6. Emits startup-sync-ready when CLIs available
This enables the frontend to:
- Display warnings for missing tools
- Know which features are available
- Trigger reconciliation when ready
bd-3jh
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements core startup infrastructure:
- AppConfig for data directory paths
- ensure_data_dir() to create ~/.local/share/mc/
- verify_cli_dependencies() async CLI availability check
- load_with_migration() for state file loading with migration support
- init() main entry point coordinating lock acquisition and setup
- StartupWarning enum for non-fatal issues (missing CLIs, state reset)
- InitError enum with conversion to McError
Also exposes Bridge::with_data_dir() publicly (was test-only).
Includes 11 tests covering directory creation, lock acquisition,
lock contention, corrupt file handling, and config paths.
bd-3jh
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add text search across all focus items
- Support filter commands: type: and stale:
- Keyboard navigation with arrow keys + Enter
- Click to select items
- Escape or backdrop click to close
- 17 tests covering search, filters, keyboard nav, and empty state
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create ReasonPrompt dialog for capturing optional reasons
- Add quick tag buttons (Blocking, Urgent, Context switch, etc.)
- Support keyboard navigation (Escape to cancel)
- Handle text input with trimming and null for empty
- Different titles for different actions (set_focus, defer, skip)
- All 10 tests pass
Closes bd-2p0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Integrates the bridge's cleanup_tmp_files() method into the Tauri
setup phase. This ensures any orphaned .json.tmp files from previous
crashes are cleaned up before the app starts operating.
The cleanup runs early in setup(), before tray and shortcuts, to
ensure a clean state for the bridge to operate in.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Completes the backend command layer, exposing bridge operations to the
frontend via Tauri IPC. Also adds system tray support and global hotkeys.
New commands:
- get_lore_status: Real CLI integration (was stub), returns issue/MR counts
- get_bridge_status: Mapping counts, pending items, sync timestamps
- sync_now: Trigger incremental sync (since_last_check events)
- reconcile: Full reconciliation pass (two-strike orphan detection)
- quick_capture: Create a new bead from freeform text
All commands use tokio::spawn_blocking for CLI I/O, preventing async
executor starvation. Commands accept trait objects for testability.
System integration:
- Global shortcut: Cmd+Shift+M toggles window visibility
- Global shortcut: Cmd+Shift+C opens quick capture overlay
- System tray: Left-click toggles window, right-click shows menu
- Tray menu: Show Mission Control, Quit
Tauri configuration:
- Added global-shortcut plugin with permissions
- Shell plugin scoped to lore, br, bv commands only
- Removed trayIcon config (using TrayIconBuilder instead)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>