docs: update stale documentation after audit fixes

Fix outdated thread safety note in API.md — Storage trait now requires
Send + Sync and Tauri uses Mutex<AppState>. Mark completed Phase 5
features in PLAN.md (subtasks, due dates, move tasks, keyboard shortcuts).
Fix CLAUDE.md formatting.
This commit is contained in:
Tristan Michael 2026-04-02 09:01:19 -07:00
parent 7fde1a09f9
commit ab71de9110
3 changed files with 9 additions and 9 deletions

View file

@ -32,6 +32,7 @@ Two-crate workspace (`resolver = "2"`, edition 2021) plus a Tauri app:
- **onyx-core** — Pure Rust library. Storage trait with `FileSystemStorage` implementation, `TaskRepository` (main API), data models, config, error types. No CLI/UI dependencies. `keyring` feature-gated behind `keyring-storage` (default on) for Android compatibility. - **onyx-core** — Pure Rust library. Storage trait with `FileSystemStorage` implementation, `TaskRepository` (main API), data models, config, error types. No CLI/UI dependencies. `keyring` feature-gated behind `keyring-storage` (default on) for Android compatibility.
- **onyx-cli** — CLI frontend using clap. Commands are in `src/commands/` (init, workspace, list, task, group). Output formatting in `src/output.rs`. - **onyx-cli** — CLI frontend using clap. Commands are in `src/commands/` (init, workspace, list, task, group). Output formatting in `src/output.rs`.
- **apps/tauri/** — Tauri v2 GUI. Svelte 5 frontend in `src/`, Rust backend in `src-tauri/` with Tauri commands that call into `onyx-core`. `notify` crate feature-gated for Android. - **apps/tauri/** — Tauri v2 GUI. Svelte 5 frontend in `src/`, Rust backend in `src-tauri/` with Tauri commands that call into `onyx-core`. `notify` crate feature-gated for Android.
### Key patterns ### Key patterns
- **Storage trait** (`storage.rs`): Strategy pattern for task persistence. `FileSystemStorage` reads/writes markdown files with YAML frontmatter and JSON metadata files. - **Storage trait** (`storage.rs`): Strategy pattern for task persistence. `FileSystemStorage` reads/writes markdown files with YAML frontmatter and JSON metadata files.

View file

@ -856,17 +856,17 @@ npm run tauri ios build
#### Desktop & Mobile #### Desktop & Mobile
- [x] Multiple task lists (folders) - [x] Multiple task lists (folders)
- [x] Switch between lists - [x] Switch between lists
- [ ] Subtasks support - [x] Subtasks support
- [ ] Due dates with date picker - [x] Due dates with date picker
- [ ] Rich markdown editor for task notes - [ ] Rich markdown editor for task notes
- [ ] Move tasks between lists - [x] Move tasks between lists
- [ ] Change storage folder location in settings - [ ] Change storage folder location in settings
- [ ] Search functionality - [ ] Search functionality
- [x] Theme selection (light/dark mode) - [x] Theme selection (light/dark mode)
#### Desktop-Specific #### Desktop-Specific
- [x] Drag & drop reordering - [x] Drag & drop reordering
- [ ] Keyboard shortcuts - [x] Keyboard shortcuts
- [ ] Multiple windows (optional) - [ ] Multiple windows (optional)
#### Mobile-Specific #### Mobile-Specific

View file

@ -441,10 +441,9 @@ Key test areas:
## Thread Safety ## Thread Safety
**Note:** The current implementation is not thread-safe. If you need concurrent access: The `Storage` trait requires `Send + Sync`, and `TaskRepository` wraps `Box<dyn Storage + Send + Sync>`, so repository instances can be shared across threads behind a `Mutex`. The Tauri GUI uses `Mutex<AppState>` for this purpose.
1. Use external synchronization (e.g., `Mutex<TaskRepository>`) For concurrent access:
2. Create separate repository instances per thread (file system will handle locking)
3. Consider implementing a service layer with proper locking
Future versions may include built-in concurrency support. 1. Wrap `TaskRepository` in `Mutex` or `RwLock` (the Tauri app does this)
2. Or create separate repository instances per thread (file system handles locking)