diff --git a/CLAUDE.md b/CLAUDE.md index 7242b94..4445b64 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -56,7 +56,7 @@ The GUI uses Svelte 5 runes mode (`$state`, `$derived`, `$effect`, `$props()`). - **Task animations**: Grid-rows `0fr`/`1fr` trick for smooth collapse/expand. Module-level `animateInIds` Set coordinates expand-in after toggle. - **Inline editing**: Click task to edit, auto-save on blur. `debouncedSave` snapshots task before timer to prevent stale-reference errors on component destroy. - **Kebab menus**: Tasks and lists use kebab menus with custom `ConfirmDialog` component (not native `confirm()`). "Move to..." is inline in the menu (not a submenu) to avoid overflow. -- **Main panel header**: Hamburger + window controls in top bar; list name (large, bold) + kebab below divider (matching task detail layout). Kebab has Rename, Group by due date, Delete completed, Delete list. +- **Main panel header**: Hamburger + window controls in top bar; list name (large, bold) + kebab below divider (matching task detail layout). Kebab has Rename, Group by date, Delete completed, Delete list. - **New task**: FAB button opens bottom toast sheet (outside sliding container for fixed positioning). ### Development phase @@ -81,10 +81,10 @@ Pre-alpha. No users, no released builds, no data to migrate. Breaking changes to - Workspace switcher drop-up with add/remove - Per-workspace theme system (System default, Light, Dark, Nord, Dracula, Solarized Dark) via CSS `data-theme` attribute - Completed tasks section with animated show/hide -- Due date picker/editor (DateTimePicker in new task + task detail); `has_time: bool` field tracks whether time is set +- Date picker/editor (DateTimePicker in new task + task detail); `has_time: bool` field tracks whether time is set - Move task between lists (inline list in kebab menu, no submenu) - List rename (inline input in main panel header via kebab) -- Group-by-due-date toggle per list (main panel kebab; persists flag but display sorting not yet implemented) +- Group-by-date toggle per list (main panel kebab; persists flag but display sorting not yet implemented) - Delete completed tasks (main panel kebab + subtask kebab, with confirmation dialogs) - Keyboard shortcuts (Escape priority chain: settings → detail → list menu → drawer → menus) - Setup screen with 2-step mode selection (Local Folder vs WebDAV Server), window dragging, "Open Existing Folder" option, remote folder browsing diff --git a/apps/tauri/src-tauri/src/lib.rs b/apps/tauri/src-tauri/src/lib.rs index aa0922f..f865618 100644 --- a/apps/tauri/src-tauri/src/lib.rs +++ b/apps/tauri/src-tauri/src/lib.rs @@ -488,7 +488,7 @@ fn rename_list( } #[tauri::command] -fn set_group_by_due_date( +fn set_group_by_date( list_id: String, enabled: bool, state: State<'_, Mutex>, @@ -498,12 +498,12 @@ fn set_group_by_due_date( mute_watcher(&mut s); let id = Uuid::parse_str(&list_id).map_err(|e| e.to_string())?; repo_mut(&mut s)? - .set_group_by_due_date(id, enabled) + .set_group_by_date(id, enabled) .map_err(|e| e.to_string()) } #[tauri::command] -fn get_group_by_due_date( +fn get_group_by_date( list_id: String, state: State<'_, Mutex>, ) -> Result { @@ -511,7 +511,7 @@ fn get_group_by_due_date( ensure_repo(&mut s)?; let id = Uuid::parse_str(&list_id).map_err(|e| e.to_string())?; repo_ref(&s)? - .get_group_by_due_date(id) + .get_group_by_date(id) .map_err(|e| e.to_string()) } @@ -924,8 +924,8 @@ pub fn run() { reorder_task, move_task, rename_list, - set_group_by_due_date, - get_group_by_due_date, + set_group_by_date, + get_group_by_date, set_webdav_config, set_workspace_theme, set_sync_interval, diff --git a/apps/tauri/src/lib/components/NewTaskInput.svelte b/apps/tauri/src/lib/components/NewTaskInput.svelte index 4da85e2..e43c7b0 100644 --- a/apps/tauri/src/lib/components/NewTaskInput.svelte +++ b/apps/tauri/src/lib/components/NewTaskInput.svelte @@ -9,21 +9,21 @@ let title = $state(""); let description = $state(""); - let dueDate = $state(null); - let dueDateHasTime = $state(false); + let date = $state(null); + let dateHasTime = $state(false); let inputEl = $state(null); let showDatePicker = $state(false); async function handleSubmit() { if (!title.trim()) return; const created = await app.createTask(title.trim(), description.trim() || undefined); - if (dueDate && created) { - await app.updateTask({ ...created, due_date: dueDate, has_time: dueDateHasTime }); + if (date && created) { + await app.updateTask({ ...created, date: date, has_time: dateHasTime }); } title = ""; description = ""; - dueDate = null; - dueDateHasTime = false; + date = null; + dateHasTime = false; newTaskState.open = false; } @@ -31,14 +31,14 @@ newTaskState.open = false; title = ""; description = ""; - dueDate = null; - dueDateHasTime = false; + date = null; + dateHasTime = false; showDatePicker = false; } function handleDateChange(iso: string | null, hasTime: boolean = false) { - dueDate = iso; - dueDateHasTime = hasTime; + date = iso; + dateHasTime = hasTime; } function formatDateChip(iso: string): string { @@ -47,7 +47,7 @@ const dayNames = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; const day = dayNames[d.getDay()]; const pad = (n: number) => String(n).padStart(2, "0"); - const timePart = dueDateHasTime ? `, ${pad(d.getHours())}:${pad(d.getMinutes())}` : ""; + const timePart = dateHasTime ? `, ${pad(d.getHours())}:${pad(d.getMinutes())}` : ""; if (d.toDateString() === today.toDateString()) return `Today${timePart}`; return `${day}, ${pad(d.getDate())}/${pad(d.getMonth() + 1)}${timePart}`; } @@ -102,12 +102,12 @@ - {#if dueDate} + {#if date}
-