refactor: unify task input validation and normalization #320

Closed
opened 2026-05-11 19:19:52 +00:00 by barrettruth · 0 comments
Owner

Parent: #305

Problem

Task creation/update input is normalized in multiple places: browser panel save helpers, validation utilities, core task functions, route handlers, and server actions. Divergent parsing makes recurrence, dates, URLs, and status changes easy to regress.

Solution

Create one task input parser/normalizer contract:

  • normalize create/update payloads for API routes, server actions, and task panel saves
  • define date, all-day, recurrence, meeting URL, location, notes, and status behavior in one place
  • keep DB write helpers focused on persistence, not request parsing
  • add tests around edge cases that previously lived only in UI behavior

Acceptance criteria

  • API writes and browser saves enforce the same validation rules.
  • Task input normalization is covered by focused tests.
  • Existing task creation/editing behavior is preserved unless the PR explicitly fixes a documented bug.
  • Error messages remain operator/user readable.
Parent: #305 ## Problem Task creation/update input is normalized in multiple places: browser panel save helpers, validation utilities, core task functions, route handlers, and server actions. Divergent parsing makes recurrence, dates, URLs, and status changes easy to regress. ## Solution Create one task input parser/normalizer contract: - normalize create/update payloads for API routes, server actions, and task panel saves - define date, all-day, recurrence, meeting URL, location, notes, and status behavior in one place - keep DB write helpers focused on persistence, not request parsing - add tests around edge cases that previously lived only in UI behavior ## Acceptance criteria - API writes and browser saves enforce the same validation rules. - Task input normalization is covered by focused tests. - Existing task creation/editing behavior is preserved unless the PR explicitly fixes a documented bug. - Error messages remain operator/user readable.
barrettruth added this to the v0.1.0 milestone 2026-05-11 19:19:52 +00:00
Sign in to join this conversation.
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#320
No description provided.