You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ flutter test --coverage # with coverage
31
31
32
32
-**App shell:**`AppShell` in `main.dart` hosts a 3-tab `PageView` (Today, Starred, All Tasks) with `NavigationBar`. Completed tasks are accessed via archive icon in each tab's AppBar. Tabs use `AutomaticKeepAliveClientMixin` to preserve state across switches. `TaskProvider` manages a navigation stack (`_parentStack`) for drill-down within All Tasks.
33
33
-**DB schema:** Core tables: `tasks`, `task_relationships` (parent_id, child_id), `task_dependencies` (blocker relationships), `todays_five_state` (daily pin state), `task_schedules` (recurring), `sync_queue` (pending mutations). Multi-parent DAG with cycle prevention via recursive CTE (`DatabaseHelper.hasPath()`).
34
-
-**DB migrations:** Sequential `onUpgrade` in `DatabaseHelper` (currently at v22, constant `_dbVersion`). Foreign keys via `PRAGMA foreign_keys = ON`. **NEVER modify a released migration** — if a previous version shipped with migration N, new DDL must go in migration N+1 or later. Retroactive changes to released migrations are silently skipped on devices already past that version. Also update `_validateBackup` version check (uses `_dbVersion` automatically) and the backup version test.
34
+
-**DB migrations:** Sequential `onUpgrade` in `DatabaseHelper` (currently at v23, constant `_dbVersion`). Foreign keys via `PRAGMA foreign_keys = ON`. **NEVER modify a released migration** — if a previous version shipped with migration N, new DDL must go in migration N+1 or later. Retroactive changes to released migrations are silently skipped on devices already past that version. Also update `_validateBackup` version check (uses `_dbVersion` automatically) and the backup version test.
35
35
-**Cloud sync:** Optional Google Sign-In + Firestore via REST APIs (no Firebase SDK). `SyncService` orchestrates push/pull; mutations queued in `sync_queue` table and debounced. **Mutation flow:**`TaskProvider.onMutation` callback → `SyncService.schedulePush()` (5s debounce) → batch REST calls to Firestore. Pull runs on startup + every 5 min.
36
36
-**When adding a column to `tasks`:** Also add to `Task` model (`toMap`/`fromMap`/`copyWith`), `taskToFirestoreFields`, and `taskFromFirestoreDoc` in `firestore_service.dart`.
37
37
-**Provider pattern:** 3 providers (`TaskProvider`, `AuthProvider`, `ThemeProvider`) + `SyncService` via `ProxyProvider<AuthProvider, SyncService>`. `TaskProvider._refreshCurrentList()` reloads children only, NOT `_currentParent` — see gotcha below. **Every provider method that mutates data must call `_refreshAfterMutation()`** (which reloads the task list, auxiliary data, and calls `notifyListeners` + `onMutation`). Calling only `onMutation` without `_refreshAfterMutation` causes stale UI — icons, indicators, and sort order won't update until the user navigates away and back.
Copy file name to clipboardExpand all lines: docs/UI_VIEWS.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,8 +33,9 @@ Reference for manual test instructions. Use these names consistently.
33
33
34
34
### All Tasks tab
35
35
-**Task card** — grid card for each task. Shows task name, top-left indicator icons (Today's 5, worked-on, started, priority, someday, deadline, scheduled today, starred). **Tap** navigates into the task. **Long-press** opens a context-menu bottom sheet. Items: **Rename**, **Also show under...** (add another parent), **Do after...** (add/change dependency), **Schedule**, **Delete**, plus two that appear **only when drilled into a parent (non-root), never at root level**: **Move to...** (`drive_file_move_outline` — move from the current list to another) and **Remove from here** (unlink from the current parent). At root level a task has no "current list" to move from or unlink from, so both are hidden.
36
+
-**Known limitation — "Also show under..." on a root task removes it from the root list.** The root level shows only **parentless** tasks (root = the *absence* of a parent, not a parent itself). So the first time you "Also show under..." a task that currently sits at root, it gains a parent and therefore **disappears from the root list**, appearing under that parent instead — despite the "*also* show under" wording implying it would stay at root as well. A second "Also show under..." then correctly adds an *additional* parent (the task is already non-root). To keep a copy visible at the top level you would need a genuine root pseudo-parent, which does not exist. This is pre-existing DAG behavior, unrelated to any specific fix — noted here to avoid manual-test confusion.
36
37
-**Task list** — hierarchical list. Shows children of the current parent. Root level shows top-level tasks + Inbox.
37
-
-**Inbox section** — collapsible section at top showing unorganized tasks.
38
+
-**Inbox section** — collapsible section at top showing unorganized (inbox) tasks. Tapping the section header toggles expand/collapse; a **"File all"** action files every inbox task in one pass. **Interactions on an inbox task row:** a **tap (single press)** opens the **"File under…"** (triage) dialog to file it under a parent (or keep it at top level, which dismisses it from the inbox); a **long-press** drills **into** the task (navigateInto). This is the inverse of the main list rows, where a tap navigates in — inbox tasks prioritize filing, so tap = file, long-press = open.
38
39
-**Leaf detail view** — appears when navigating into a leaf task (a task with no children). Shows task name, "Done today" button, "Done for good!" button, "Start"/"Started" toggle, priority selector, schedule/deadline info, dependencies, parent breadcrumbs. This is NOT the same as the Today's 5 bottom sheet.
39
40
-**"Do after..." icon (add_task)** — shown when the task has **no** dependency. **Tap** opens the "Do X after..." picker dialog to add a dependency.
40
41
-**Dependency icon (hourglass)** — replaces the "Do after..." icon when the task has a dependency. **Tap** navigates to the blocker task. **Long-press** opens the "Do X after..." picker dialog to change or remove the dependency. Color behavior: **primary color** when actively blocked, **greyed out** when the blocker is no longer blocking (e.g. marked "Done today"). When the blocker is completed ("Done for good") or skipped, the dependency row is deleted from the DB, so the hourglass **disappears entirely**.
0 commit comments