refactor: split task panel controller from rendering #323

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

Parent: #305

Problem

src/components/task-panel.tsx is a large controller/view component. It owns form state, autosave, field rendering, status controls, recurrence behavior, keyboard hooks, and API coordination. This makes small behavior changes risky.

Solution

Split the task panel by responsibility:

  • extract form state and derived values into a hook
  • extract autosave/submit/discard behavior into a hook or small module
  • extract repeated field/chrome pieces into focused components
  • keep the existing compact visual design and keyboard behavior
  • preserve autosave queue semantics, due-date behavior, and recurrence edit behavior

Acceptance criteria

  • task-panel.tsx becomes composition-heavy instead of one giant controller.
  • Autosave/discard/save behavior is unchanged and covered by existing or new tests.
  • Field components do not introduce layout shifts or mobile overflow.
  • The PR is a refactor unless it links a specific bug fix.
Parent: #305 ## Problem `src/components/task-panel.tsx` is a large controller/view component. It owns form state, autosave, field rendering, status controls, recurrence behavior, keyboard hooks, and API coordination. This makes small behavior changes risky. ## Solution Split the task panel by responsibility: - extract form state and derived values into a hook - extract autosave/submit/discard behavior into a hook or small module - extract repeated field/chrome pieces into focused components - keep the existing compact visual design and keyboard behavior - preserve autosave queue semantics, due-date behavior, and recurrence edit behavior ## Acceptance criteria - `task-panel.tsx` becomes composition-heavy instead of one giant controller. - Autosave/discard/save behavior is unchanged and covered by existing or new tests. - Field components do not introduce layout shifts or mobile overflow. - The PR is a refactor unless it links a specific bug fix.
barrettruth added this to the v0.1.0 milestone 2026-05-11 19:20:26 +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#323
No description provided.