Update storage strategy: user always selects folder location
Changed from opaque platform-specific defaults to user-controlled storage: Before: - Default to hidden platform directories (%APPDATA%, ~/.local/share, etc.) - User could optionally select custom folder After: - User MUST select folder on first run (no hidden defaults) - Full transparency and control over data location - Examples: ~/Documents/Tasks, ~/Dropbox/Tasks, etc. Key changes: - CLI init requires folder path argument - GUI shows folder picker on first launch - Mobile prompts for folder location with suggestions - App config (theme, window size) still in platform-specific location - Task data always in user-visible, user-controlled folder Benefits: - Users can easily find and backup their data - Works seamlessly with cloud sync (Dropbox, iCloud, OneDrive) - Can use with other tools (Obsidian, VS Code) - Git-friendly for version control - Multiple task vaults possible (work/personal) - No lock-in, no hidden data Updated: - Storage strategy section - AppConfig model (local_path is required, not optional) - CLI examples (init requires path) - First run experience description - Repository API (takes tasks_folder directly) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
f2025b11ab
commit
774b884236
76
PLAN.md
76
PLAN.md
|
|
@ -109,12 +109,14 @@ TaskList {
|
||||||
}
|
}
|
||||||
|
|
||||||
AppConfig {
|
AppConfig {
|
||||||
storage_type: StorageType, // Local or WebDAV
|
// Stored in platform-specific config location
|
||||||
local_path: Option<PathBuf>,
|
local_path: PathBuf, // User-selected tasks folder (required)
|
||||||
webdav_url: Option<String>,
|
webdav_url: Option<String>, // Optional WebDAV server
|
||||||
webdav_credentials: Option<Credentials>,
|
webdav_credentials: Option<Credentials>,
|
||||||
theme: Theme,
|
theme: Theme,
|
||||||
last_sync: Option<DateTime>,
|
last_sync: Option<DateTime>,
|
||||||
|
window_size: Option<(u32, u32)>,
|
||||||
|
last_opened_list: Option<Uuid>,
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -197,8 +199,8 @@ pub struct TaskRepository {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TaskRepository {
|
impl TaskRepository {
|
||||||
pub fn new(config: Config) -> Result<Self>;
|
pub fn new(tasks_folder: PathBuf) -> Result<Self>;
|
||||||
pub fn init(path: PathBuf) -> Result<Self>;
|
pub fn init(tasks_folder: PathBuf) -> Result<Self>;
|
||||||
|
|
||||||
// Task operations
|
// Task operations
|
||||||
pub fn create_task(&mut self, list_id: Uuid, task: Task) -> Result<Task>;
|
pub fn create_task(&mut self, list_id: Uuid, task: Task) -> Result<Task>;
|
||||||
|
|
@ -229,19 +231,23 @@ pub trait Storage {
|
||||||
### Storage Strategy
|
### Storage Strategy
|
||||||
|
|
||||||
#### Local Storage
|
#### Local Storage
|
||||||
- **Location**: User-selectable folder OR platform-specific app data directory
|
- **Location**: **User must select a folder** on first run
|
||||||
- Windows: `%APPDATA%/bevy-tasks/` (default)
|
- Can be anywhere with read/write permissions
|
||||||
- Linux: `~/.local/share/bevy-tasks/` (default)
|
- Examples: `~/Documents/Tasks`, `~/Dropbox/Tasks`, `D:\My Tasks`
|
||||||
- macOS: `~/Library/Application Support/bevy-tasks/` (default)
|
- Users can change location later in settings
|
||||||
- iOS: App sandbox documents directory
|
- **No hidden default directories** - full user control and visibility
|
||||||
- Android: Internal storage app directory
|
- **App Configuration Storage** (separate from task data):
|
||||||
- User can select any folder with read/write permissions
|
- Windows: `%APPDATA%/bevy-tasks/config.json`
|
||||||
|
- Linux: `~/.config/bevy-tasks/config.json`
|
||||||
|
- macOS: `~/Library/Application Support/bevy-tasks/config.json`
|
||||||
|
- iOS: App sandbox preferences
|
||||||
|
- Android: App preferences
|
||||||
|
- Stores: selected folder path, theme, last sync time, window position
|
||||||
- **Format**: Markdown files with YAML frontmatter (Obsidian-compatible)
|
- **Format**: Markdown files with YAML frontmatter (Obsidian-compatible)
|
||||||
- **Structure**:
|
- **Structure**:
|
||||||
```
|
```
|
||||||
data/
|
~/Documents/Tasks/ # User-selected folder
|
||||||
├── .bevy-tasks/
|
├── .bevy-tasks/
|
||||||
│ ├── config.json # App configuration
|
|
||||||
│ └── metadata.json # List ordering, sync state
|
│ └── metadata.json # List ordering, sync state
|
||||||
├── My Tasks/ # Task list folder
|
├── My Tasks/ # Task list folder
|
||||||
│ ├── Buy groceries.md
|
│ ├── Buy groceries.md
|
||||||
|
|
@ -253,13 +259,20 @@ pub trait Storage {
|
||||||
└── Team meeting prep.md
|
└── Team meeting prep.md
|
||||||
```
|
```
|
||||||
|
|
||||||
**Benefits of Markdown Format**:
|
**First Run Experience**:
|
||||||
- Human-readable and editable in any text editor
|
- CLI: `bevy-tasks init ~/Documents/Tasks` (user specifies path)
|
||||||
- Compatible with Obsidian, Logseq, and other markdown tools
|
- GUI: Folder picker dialog on first launch
|
||||||
- Easy to version control (git-friendly)
|
- Mobile: Folder picker with suggested locations (Documents, iCloud Drive, etc.)
|
||||||
- Future-proof format
|
|
||||||
- Enables external editing and scripting
|
**Benefits of User-Selected Storage**:
|
||||||
- Natural organization with folders
|
- **Full transparency**: Users can see exactly where their data is
|
||||||
|
- **Easy backup**: Users can backup the folder however they want (Time Machine, cloud sync, etc.)
|
||||||
|
- **Portable**: Move folder between machines, cloud drives, USB drives
|
||||||
|
- **No lock-in**: Data is in plain markdown, accessible without the app
|
||||||
|
- **Git-friendly**: Users can version control their tasks folder
|
||||||
|
- **Compatible with other tools**: Use with Obsidian, Logseq, VS Code, etc.
|
||||||
|
- **Multiple vaults**: Users can have separate task folders for work/personal
|
||||||
|
- **User choice**: Dropbox, iCloud, OneDrive, local folder - user decides
|
||||||
|
|
||||||
#### WebDAV Sync
|
#### WebDAV Sync
|
||||||
- **Conflict Resolution**: Last-write-wins with timestamp
|
- **Conflict Resolution**: Last-write-wins with timestamp
|
||||||
|
|
@ -317,10 +330,19 @@ pub trait Storage {
|
||||||
|
|
||||||
**CLI Example**:
|
**CLI Example**:
|
||||||
```bash
|
```bash
|
||||||
bevy-tasks init ~/my-tasks
|
# First run: initialize tasks folder
|
||||||
|
bevy-tasks init ~/Documents/Tasks
|
||||||
|
|
||||||
|
# Or use a cloud-synced folder
|
||||||
|
bevy-tasks init ~/Dropbox/Tasks
|
||||||
|
|
||||||
|
# Then use normally
|
||||||
bevy-tasks add "Buy groceries" --list "Personal"
|
bevy-tasks add "Buy groceries" --list "Personal"
|
||||||
bevy-tasks list
|
bevy-tasks list
|
||||||
bevy-tasks complete <task-id>
|
bevy-tasks complete <task-id>
|
||||||
|
|
||||||
|
# Change folder location
|
||||||
|
bevy-tasks config set-folder ~/new/location
|
||||||
```
|
```
|
||||||
|
|
||||||
### Phase 2: WebDAV Sync (Backend + CLI)
|
### Phase 2: WebDAV Sync (Backend + CLI)
|
||||||
|
|
@ -358,7 +380,7 @@ bevy-tasks sync --status
|
||||||
- [ ] Basic task list view
|
- [ ] Basic task list view
|
||||||
- [ ] Create/edit/delete tasks
|
- [ ] Create/edit/delete tasks
|
||||||
- [ ] Mark tasks complete
|
- [ ] Mark tasks complete
|
||||||
- [ ] Settings screen (storage location, WebDAV config)
|
- [ ] Settings screen (change folder location, WebDAV config)
|
||||||
- [ ] Desktop support (Windows, Linux, macOS)
|
- [ ] Desktop support (Windows, Linux, macOS)
|
||||||
- [ ] Sync status indicators
|
- [ ] Sync status indicators
|
||||||
|
|
||||||
|
|
@ -379,7 +401,7 @@ bevy-tasks sync --status
|
||||||
- [ ] Rich markdown editor for task notes
|
- [ ] Rich markdown editor for task notes
|
||||||
- [ ] Drag & drop reordering
|
- [ ] Drag & drop reordering
|
||||||
- [ ] Move tasks between lists
|
- [ ] Move tasks between lists
|
||||||
- [ ] Folder picker for custom storage
|
- [ ] Change storage folder location in settings
|
||||||
- [ ] Keyboard shortcuts
|
- [ ] Keyboard shortcuts
|
||||||
- [ ] Search functionality
|
- [ ] Search functionality
|
||||||
|
|
||||||
|
|
@ -679,7 +701,7 @@ cargo test --watch # with cargo-watch
|
||||||
2. **Build CLI to test backend**:
|
2. **Build CLI to test backend**:
|
||||||
```bash
|
```bash
|
||||||
cd crates/bevy-tasks-cli
|
cd crates/bevy-tasks-cli
|
||||||
cargo run -- init ~/my-tasks
|
cargo run -- init ~/Documents/TestTasks
|
||||||
cargo run -- add "Test task"
|
cargo run -- add "Test task"
|
||||||
cargo run -- list
|
cargo run -- list
|
||||||
```
|
```
|
||||||
|
|
@ -824,5 +846,5 @@ To be determined.
|
||||||
---
|
---
|
||||||
|
|
||||||
**Last Updated**: 2025-10-27
|
**Last Updated**: 2025-10-27
|
||||||
**Document Version**: 2.1
|
**Document Version**: 2.2
|
||||||
**Status**: Ready to Implement - egui Hybrid Approach Confirmed
|
**Status**: Ready to Implement - User-Controlled Storage
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue