onyx-tasks/Audit.md
Claude 125f1e19ac
fix: audit — debounced save data loss, silent workspace errors, code duplication
- Fix debouncedSave in TaskDetailView losing edits when title and
  description are changed within 400ms (shared timer only saved the
  last-changed field)
- Return errors from Tauri commands when workspace ID doesn't exist
  instead of silently succeeding (set_webdav_config, set_workspace_theme,
  set_sync_interval, set_sync_interval_unfocused)
- Remove duplicate atomic_write_bytes in google_tasks.rs; reuse
  pub(crate) atomic_write from storage.rs
- Fix failing test using wrong frontmatter field name (due → date)
- Add Audit.md log

https://claude.ai/code/session_0186pnnUJxj2uv1KhHjWoAGA
2026-04-15 07:16:40 +00:00

11 lines
954 B
Markdown

# Audit Log
## 2026-04-15
Found and fixed 4 issues:
1. **Bug: debouncedSave shared timer loses edits** (TaskDetailView.svelte) - When user edits both title and description within 400ms, only the last-edited field was saved. Fixed by always saving both fields in the debounced callback.
2. **Code duplication: atomic_write_bytes** (google_tasks.rs) - Identical copy of `atomic_write` from storage.rs. Removed duplicate and reused the shared `pub(crate)` function.
3. **Bug: silent success on missing workspace** (lib.rs) - Four Tauri commands (`set_webdav_config`, `set_workspace_theme`, `set_sync_interval`, `set_sync_interval_unfocused`) silently succeeded when given a nonexistent workspace ID. Fixed to return an error.
4. **Bug: failing test due to wrong frontmatter field name** (storage.rs) - `test_parse_frontmatter_with_optional_fields` used `due:` instead of `date:` in frontmatter YAML, causing the assertion on `fm.date.is_some()` to fail.