From 282c0eea72f980c9ae4c22919e743f90b7105538 Mon Sep 17 00:00:00 2001 From: Adam J Date: Mon, 16 Nov 2026 08:31:22 -0500 Subject: [PATCH 1/2] fix: task board filter and sort UX, one-click start on cards - Category filter shows category names instead of raw ids - Remove the no-op "Priority" sort; saved priority choice loads as oldest-first - Reset saved filters that no longer match any task; show a filtered-out notice, "Showing X of Y" count and "No matching tasks" column state - Add Start/Resume button to planned task cards (start day and pull, pull into running day, or resume) - Regression tests for board, card, and view hook --- AGENTS.md | 7 +- CHANGELOG.md | 8 +++ README.md | 2 +- src/components/KanbanBoard.test.tsx | 94 +++++++++++++++++++++++++ src/components/KanbanBoard.tsx | 87 ++++++++++++++++++----- src/components/KanbanBoardControls.tsx | 46 +++++++----- src/components/KanbanColumn.tsx | 4 +- src/components/PlannedTaskCard.test.tsx | 87 +++++++++++++++++++++++ src/components/PlannedTaskCard.tsx | 25 +++++++ src/hooks/useTaskBoardView.test.ts | 45 ++++++++++++ src/hooks/useTaskBoardView.ts | 72 +++++++++++++------ 11 files changed, 418 insertions(+), 59 deletions(-) create mode 100644 src/components/KanbanBoard.test.tsx create mode 100644 src/components/PlannedTaskCard.test.tsx create mode 100644 src/hooks/useTaskBoardView.test.ts diff --git a/AGENTS.md b/AGENTS.md index 1d5111f..49fa32d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -31,7 +31,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 (~504 JS/TS tests across 44 files, plus 20 Rust unit tests across `src-tauri/src/backup.rs`/`menu.rs`/`quit_flush.rs` run via `cargo test`) +### Test File Inventory (~516 JS/TS tests across 47 files, plus 20 Rust unit tests across `src-tauri/src/backup.rs`/`menu.rs`/`quit_flush.rs` run via `cargo test`) | File | Coverage | |---|---| @@ -59,6 +59,9 @@ Timetraked is a React 18 + TypeScript time tracking PWA for freelancers and cons | `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/PlannedTaskCard.test.tsx` | Card one-click Start/Resume button: start-day-and-pull, pull, resume, hidden for done/stale/unposted days | +| `src/components/KanbanBoard.test.tsx` | Category filter labels by name, stale saved filter reset (not while loading), filtered-out empty state and visible count | +| `src/hooks/useTaskBoardView.test.ts` | Default sort, legacy `priority` sort migration, batched filter updates | | `src/components/ArchiveEditDialog.test.tsx` | Archive edit dialog render, task editing flow, and end-before-start validation (day form and Add Task) | | `src/components/ArchivedTaskRow.test.tsx` | Inline expandable archived task row editing, including end-before-start validation | | `src/components/dateParsing.test.ts` | Date parsing utilities | @@ -189,7 +192,7 @@ export const MyComponent = () => { | `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 `