2.6 KiB
2.6 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec | |
|---|---|---|---|---|---|---|---|
| 03-frontend-data-plumbing | Frontend interrupted-field plumbing | done | 3 |
|
plan.md | ../../specs/tasks/requirements/interrupted-task-indicator.md |
Task 03: Frontend interrupted-field plumbing
Acceptance
Task.interrupted?: booleanexists inapps/web/lib/types/http.ts.toKanbanTaskmapsinterruptedfrom API payloads; the kanban task row type carries it.mergeTaskUpdatein the WStask.updatedhandler preserves an existinginterruptedvalue when the payload omits the field (a lightweight update must not wipe a set marker).TaskSwitcherItemcarriesinterrupted;buildSidebarItemand the mobile task-switcher sheet hooks map it from the kanban task.TaskRowpassesinterruptedintoTaskItem(the icon itself is Task 04).
Verification
cd apps/web && pnpm run typecheck
cd apps && pnpm --filter @kandev/web test -- lib/kanban/map-task.test.ts lib/ws/handlers/tasks.test.ts components/task/task-session-sidebar-item.test.ts 2>/dev/null || pnpm --filter @kandev/web test -- lib/kanban lib/ws/handlers
(Adjust the file list to the actual test locations; run the focused tests for the files you touched.)
Files likely touched
apps/web/lib/types/http.tsapps/web/lib/kanban/map-task.tsapps/web/lib/state/slices/kanban/types.tsapps/web/lib/ws/handlers/tasks.tsapps/web/components/task/task-switcher.tsxapps/web/components/task/task-session-sidebar-item.tsapps/web/components/task/mobile/session-task-switcher-sheet-hooks.ts- Matching
*.test.ts/*.test.tsxfor each mapping and merge change.
Dependencies
Task 02 (the DTO field must exist so payloads carry it).
Inputs
- Spec:
API surface,Failure modes(client merge wipe), scenario 7. - Plan:
Frontend > Data plumbing. - Existing pattern: the
foreground_activitypreserve guard inmergeTaskUpdateand theforegroundActivitymapping intoKanbanTask.
Risks
- Forgetting one of the two sidebar item builders (desktop
buildSidebarItemvs the mobile sheet hook) leaves a surface without the field — both must map it. - A partial
task.updatedmerge that overwritesinterruptedwithundefinedwipes the marker client-side — the preserve guard must mirror theforeground_activitysemantics exactly (payload-omits-field → keep existing; payloadnull/false→ clear). - Do not translate or rename the field; it is a typed boolean used in logic.
Output contract
Report every file changed, the merge-preserve test case, typecheck and focused
test results, then mark this task done and update plan.md.