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:
parent
7fde1a09f9
commit
ab71de9110
|
|
@ -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-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.
|
||||
|
||||
### Key patterns
|
||||
|
||||
- **Storage trait** (`storage.rs`): Strategy pattern for task persistence. `FileSystemStorage` reads/writes markdown files with YAML frontmatter and JSON metadata files.
|
||||
|
|
|
|||
8
PLAN.md
8
PLAN.md
|
|
@ -856,17 +856,17 @@ npm run tauri ios build
|
|||
#### Desktop & Mobile
|
||||
- [x] Multiple task lists (folders)
|
||||
- [x] Switch between lists
|
||||
- [ ] Subtasks support
|
||||
- [ ] Due dates with date picker
|
||||
- [x] Subtasks support
|
||||
- [x] Due dates with date picker
|
||||
- [ ] Rich markdown editor for task notes
|
||||
- [ ] Move tasks between lists
|
||||
- [x] Move tasks between lists
|
||||
- [ ] Change storage folder location in settings
|
||||
- [ ] Search functionality
|
||||
- [x] Theme selection (light/dark mode)
|
||||
|
||||
#### Desktop-Specific
|
||||
- [x] Drag & drop reordering
|
||||
- [ ] Keyboard shortcuts
|
||||
- [x] Keyboard shortcuts
|
||||
- [ ] Multiple windows (optional)
|
||||
|
||||
#### Mobile-Specific
|
||||
|
|
|
|||
|
|
@ -441,10 +441,9 @@ Key test areas:
|
|||
|
||||
## 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>`)
|
||||
2. Create separate repository instances per thread (file system will handle locking)
|
||||
3. Consider implementing a service layer with proper locking
|
||||
For concurrent access:
|
||||
|
||||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue