- Add 04-02-SUMMARY.md with full decisions and deviation documentation - Update STATE.md: Plans 01-02 done, add decisions, metrics, notes - Update ROADMAP.md phase 4 progress (2/4 plans complete)
6.7 KiB
| phase | plan | subsystem | tags | dependency_graph | tech_stack | key_files | decisions | metrics | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 04-tasks-kanban | 02 | backend/tasks |
|
|
|
|
|
|
Phase 4 Plan 02: Kanban Board Vertical Slice (Wave 1) Summary
Vertical slice 1 of the kanban workflow: renders the kanban board on tablo detail page with 4 columns, implements task creation via inline column form with HTMX, and task deletion with inline confirmation. Users can now open a tablo, see 4 columns (To do, In progress, In review, Done), create tasks, and delete them.
Tasks Completed
| Task | Name | Commit | Files |
|---|---|---|---|
| 1 | handlers_tasks.go + router + main.go | 181ae79 |
backend/internal/web/handlers_tasks.go, router.go, main.go, 5 test files |
| 2 | tasks.templ + tablos.templ + layout.templ | 889164b |
backend/templates/tasks.templ, tablos.templ, layout.templ, tasks_forms.go, handlers_tablos.go |
| 3 | Activate task integration tests | 92ebb5f |
backend/internal/web/handlers_tasks_test.go |
Verification Results
go build ./...exits 0go test ./...exits 0 (all tests pass or skip correctly)go test ./internal/web/ -run TestTask -v: 9 SKIP total — 5 skip due to no TEST_DATABASE_URL (activated, awaiting DB), 4 skip with "handlers_tasks not yet implemented" (Plan 03)grep -c 'KanbanBoard' templates/tasks.templreturns 2grep -c 'TaskCreateHandler' internal/web/router.goreturns 1grep -c 'sortable.min.js' templates/layout.templreturns 1
Decisions Made
-
TaskColumns/TaskColumnLabels moved to templates package —
handlers_tasks.goimportstemplates, andtasks.templneeds the column definitions. Putting them inwebpackage would create a cycle (templates→web→ ... →templates). Moving totemplates/tasks_forms.gobreaks the cycle cleanly. -
TabloDetailPage signature updated — Added
tasks []sqlc.Taskparameter. All callers updated:TabloDetailHandlerfetches tasks viaListTasksByTablo;TabloUpdateHandlernon-HTMX error path also fetches tasks for correct rendering. -
Task column header strings corrected — The Plan 01 test scaffold used
"Todo","In Progress","In Review"which didn't match the plan spec"To do","In progress","In review". Updated test to use correct labels fromTaskColumnLabels. -
Integration tests skip on missing TEST_DATABASE_URL — Tests are activated (no t.Skip), but the test helper
setupTestDBskips when no database is configured. This is the correct behavior per the existing test pattern.
Deviations from Plan
Auto-fixed Issues
1. [Rule 2 - Import cycle prevention] TaskColumns/TaskColumnLabels moved from web to templates package
- Found during: Task 2 (templ generation, go build cycle check)
- Issue:
tasks.templneedsweb.TaskColumnsandweb.TaskColumnLabels. Buttemplatespackage importsweb/ui(notweb), andwebimportstemplates— addingwebas a direct import totemplateswould createweb → templates → webcycle. - Fix: Moved
TaskColumnsandTaskColumnLabelstobackend/templates/tasks_forms.go. Handlers referencetemplates.TaskColumnsvia the already-existingtemplatesimport. No structural change — just a different home for the constants. - Files modified: backend/templates/tasks_forms.go, backend/internal/web/handlers_tasks.go
- Commit:
181ae79
2. [Rule 1 - Bug] Column header test strings corrected
- Found during: Task 3 (activating tests)
- Issue: Plan 01 scaffold used
"Todo","In Progress","In Review"but TaskColumnLabels defines"To do","In progress","In review". - Fix: Updated
TestTasksKanbanRendersto use the correct label strings. - Files modified: backend/internal/web/handlers_tasks_test.go
- Commit:
92ebb5f
3. [Rule 3 - Router update] All NewRouter call sites updated
- Found during: Task 1 (adding TasksDeps param to NewRouter)
- Issue: 5 test helper functions across 4 test files called
NewRouterwithoutTasksDeps. - Fix: Updated all callers:
handlers_test.go,handlers_tablos_test.go,handlers_auth_test.go,csrf_test.go. - Files modified: 4 test files
- Commit:
181ae79
Known Stubs
TaskEditHandlerreturns 501 — Plan 03 implements task editingTaskUpdateHandlerreturns 501 — Plan 03 implements task updateTaskReorderHandlerreturns 501 — Plan 03 implements drag-and-drop reorder
These stubs are intentional per the plan spec; routes are registered so route resolution tests work.
Threat Flags
None — all threat mitigations from the plan's threat register are implemented:
- T-04-03: loadOwnedTabloForTask uses
GetTaskByID(WHERE id=$1 AND tablo_id=$2)with ownership-verified tablo_id - T-04-04: title validated non-empty, max 255 chars
- T-04-05: status validated against validTaskStatuses map before DB insert
- T-04-07: TabloDetailPage only renders after loadOwnedTablo passes ownership check