refactor: centralize task filter parsing #377

Merged
barrettruth merged 1 commit from issue-361-task-filter-parser into main 2026-05-11 21:23:52 +00:00
Owner

Problem

Dashboard data loading, /api/tasks, and iCal export each parsed task filter query params by hand, which left status/date/sort/default behavior split across route-local code.

Solution

  • Add parseTaskFilters and taskFilterParamsFromSearchParams in src/core/task-filters.ts.
  • Route dashboard queue/kanban/calendar defaults, /api/tasks, and iCal export through the shared parser.
  • Preserve loose status/date handling while normalizing supported sort fields to existing list defaults.

Verification

  • nix develop --command pnpm vitest run tests/core/task-filters.test.ts tests/server/dashboard-data.test.ts tests/api/tasks-route-validation.test.ts tests/api/export-ical-route.test.ts
  • nix develop --command just lint
  • nix develop --command just test
  • nix develop --command just build

Closes #361

## Problem Dashboard data loading, `/api/tasks`, and iCal export each parsed task filter query params by hand, which left status/date/sort/default behavior split across route-local code. ## Solution - Add `parseTaskFilters` and `taskFilterParamsFromSearchParams` in `src/core/task-filters.ts`. - Route dashboard queue/kanban/calendar defaults, `/api/tasks`, and iCal export through the shared parser. - Preserve loose status/date handling while normalizing supported sort fields to existing list defaults. ## Verification - `nix develop --command pnpm vitest run tests/core/task-filters.test.ts tests/server/dashboard-data.test.ts tests/api/tasks-route-validation.test.ts tests/api/export-ical-route.test.ts` - `nix develop --command just lint` - `nix develop --command just test` - `nix develop --command just build` Closes #361
refactor: centralize task filter parsing
All checks were successful
quality / Test (pull_request) Successful in 16s
quality / Lint (pull_request) Successful in 20s
quality / Build (pull_request) Successful in 42s
52921d7e5f
barrettruth deleted branch issue-361-task-filter-parser 2026-05-11 21:23:53 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/delta!377
No description provided.