From b3b60d1fd430956d1bb77cf896d380f0e03bb7ba Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 17 Oct 2026 01:43:10 +0000 Subject: [PATCH 1/2] feat: start day from the task board and pick planned tasks on an empty day Add startDayAndPullPlannedTask, a Start Day button on the Tasks page, and a planned task picker for started days with no tasks. Share pull/add logic via startPlannedTaskInDay and pass day state explicitly to beginTask so a day and its first task persist correctly in one tick. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01FpA8FnKDt9kkxMjnfUU7uU --- AGENTS.md | 4 +- CHANGELOG.md | 4 + README-EXT.md | 1 + README.md | 2 +- src/components/PlannedTaskCard.tsx | 27 ++++- src/components/PlannedTaskPicker.test.tsx | 81 +++++++++++++ src/components/PlannedTaskPicker.tsx | 90 +++++++++++++++ src/contexts/TimeTracking.test.tsx | 131 ++++++++++++++++++++++ src/contexts/TimeTrackingContext.tsx | 106 +++++++++++------ src/pages/Index.tsx | 5 +- src/pages/TaskList.tsx | 30 +++-- 11 files changed, 434 insertions(+), 47 deletions(-) create mode 100644 src/components/PlannedTaskPicker.test.tsx create mode 100644 src/components/PlannedTaskPicker.tsx diff --git a/AGENTS.md b/AGENTS.md index 118e581..59aa127 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -22,7 +22,7 @@ Timetraked is a React 18 + TypeScript time tracking PWA for freelancers and cons - When fixing a bug, add a regression test as part of the same change. - Verify version alignment between related dev tools (e.g., vitest + @vitest/coverage) when test errors appear. -### Test File Inventory (~376 JS/TS tests across 36 files, plus 17 Rust unit tests across `src-tauri/src/backup.rs`/`menu.rs`/`quit_flush.rs` run via `cargo test`) +### Test File Inventory (~390 JS/TS tests across 37 files, plus 17 Rust unit tests across `src-tauri/src/backup.rs`/`menu.rs`/`quit_flush.rs` run via `cargo test`) | File | Coverage | |---|---| @@ -49,6 +49,7 @@ Timetraked is a React 18 + TypeScript time tracking PWA for freelancers and cons | `src/components/SummaryOutput.test.tsx` | Summary output rendering | | `src/components/NewTaskForm.test.tsx` | Form render, submit, validation, cancel, FAB toggle | | `src/components/TaskItem.test.tsx` | Badge render, delete confirm, edit dialog | +| `src/components/PlannedTaskPicker.test.tsx` | Dashboard empty-day picker: ordering, filtering, start vs resume, list cap | | `src/components/ArchiveEditDialog.test.tsx` | Archive edit dialog render and task editing flow | | `src/components/ArchivedTaskRow.test.tsx` | Inline expandable archived task row editing | | `src/components/dateParsing.test.ts` | Date parsing utilities | @@ -170,6 +171,7 @@ export const MyComponent = () => { | `src/components/BackdatedEntryDialog.tsx` | Multi-step dialog for logging past workdays; uses `addBackdatedDay` from context | | `src/hooks/useLongPress.ts` | 500 ms hold detector for context menu trigger on touch | | `src/components/ui/responsive-select.tsx` | `ResponsiveSelect` — branches on `useIsMobile()` to render a native `