Adds real-time updates when lore syncs new GitLab data by watching
the lore.db file for changes.
React hook (src/hooks/useTauriEvents.ts):
- useTauriEvent(): Subscribe to a single Tauri event with auto-cleanup
- useTauriEvents(): Subscribe to multiple events with a handler map
- Typed payloads for each event type:
- global-shortcut-triggered: toggle-window | quick-capture
- lore-data-changed: void (refresh trigger)
- sync-status: started | completed | failed
- error-notification: code + message
Rust watcher (src-tauri/src/watcher.rs):
- Watches lore's data directory for lore.db modifications
- Uses notify crate with 2-second poll interval
- Emits "lore-data-changed" event to frontend on file change
- Handles atomic writes by watching parent directory
- Gracefully handles missing lore.db (logs warning, skips watcher)
Test coverage:
- Hook subscription and cleanup behavior
- Focus store test fix: clear localStorage before each test
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>