fix: improve error handling across Rust and TypeScript

- Log swallowed errors in file watcher and window operations (lib.rs, watcher.rs)
- Propagate recovery errors from bridge::recover_pending to SyncResult.errors
  so the frontend can display them instead of silently dropping failures
- Fix useTauriEvent/useTauriEvents race condition where cleanup fires before
  async listen() resolves, leaking the listener (cancelled flag pattern)
- Guard computeStaleness against invalid date strings (NaN -> 'normal'
  instead of incorrectly returning 'urgent')
- Strengthen isMcError type guard to check field types, not just presence
- Log warning when data directory resolution falls back to '.' (state.rs, bridge.rs)
- Add test for computeStaleness with invalid date inputs
This commit is contained in:
teernisse
2026-02-26 10:13:17 -05:00
parent 29b44f1b4c
commit 23a4e6bf19
7 changed files with 556 additions and 13 deletions

File diff suppressed because one or more lines are too long