docs(09-01): complete etape slice plan

This commit is contained in:
Arthur Belleville 2026-05-15 22:41:23 +02:00
parent 565bb88df5
commit c1c20c4158
No known key found for this signature in database
2 changed files with 87 additions and 7 deletions

View file

@ -3,8 +3,8 @@ gsd_state_version: 1.0
milestone: v2.0 milestone: v2.0
milestone_name: Collaboration, planning, and social sign-in milestone_name: Collaboration, planning, and social sign-in
status: executing status: executing
last_updated: "2026-05-15T20:29:51.890Z" last_updated: "2026-05-15T20:31:39.315Z"
last_activity: 2026-05-15 -- Phase 09 planning complete last_activity: 2026-05-15 -- Phase 09 execution started
progress: progress:
total_phases: 5 total_phases: 5
completed_phases: 1 completed_phases: 1
@ -24,14 +24,14 @@ progress:
See: `.planning/PROJECT.md` (updated 2026-05-15) See: `.planning/PROJECT.md` (updated 2026-05-15)
**Core value:** A user can sign in and run the Tablos workflow — organize work, attach files, discuss, and plan scheduled events — without a JS framework or managed chat provider. **Core value:** A user can sign in and run the Tablos workflow — organize work, attach files, discuss, and plan scheduled events — without a JS framework or managed chat provider.
**Current focus:** Phase 9 — Etapes **Current focus:** Phase 09 — etapes
## Current Position ## Current Position
Phase: 9 — Etapes Phase: 09 (etapes) — EXECUTING
Plan: Plan: 1 of 4
Status: Ready to execute Status: Executing Phase 09
Last activity: 2026-05-15 -- Phase 09 planning complete Last activity: 2026-05-15 -- Phase 09 execution started
Resume file: .planning/phases/09-etapes/09-01-PLAN.md Resume file: .planning/phases/09-etapes/09-01-PLAN.md
## Phase Status ## Phase Status

View file

@ -0,0 +1,80 @@
---
phase: 09-etapes
plan: 01
subsystem: tasks
tags: [go, htmx, templ, postgres, sqlc, etapes]
requires:
- phase: 04-tasks
provides: existing tablo task kanban and task create/update/reorder handlers
provides:
- tablo-owned etapes schema and sqlc query surface
- first Tasks tab etape strip with All, Unassigned, and etape filters
- task creation with same-tablo etape assignment validation
affects: [09-etapes, tasks, tablos]
tech-stack:
added: []
patterns: [tablo-owned child rows, htmx fragment refresh, nullable assignment foreign key]
key-files:
created:
- backend/migrations/0007_etapes.sql
- backend/internal/db/queries/etapes.sql
- backend/internal/web/handlers_etapes.go
- backend/templates/etapes.templ
- backend/templates/etapes_forms.go
modified:
- backend/internal/db/queries/tasks.sql
- backend/internal/web/handlers_tasks.go
- backend/internal/web/handlers_files.go
- backend/templates/tasks.templ
- backend/templates/tablos.templ
key-decisions:
- "Keep etape filtering as a tab-scoped query parameter instead of adding a separate page."
- "Preserve task position as status-scoped; etape assignment does not influence task ordering."
- "Validate submitted etape ids through GetEtapeByID with the current tablo id before task insert."
patterns-established:
- "Etape tab refreshes use a full #tasks-tab fragment when chip counts and kanban contents both change."
- "Task mutations preserve existing EtapeID when updating title, description, status, or position."
requirements-completed: []
completed: 2026-05-15
---
# Plan 09-01 Summary
**Tablo-owned etapes with a working Tasks tab chip filter and task create assignment path**
## Accomplishments
- Added `0007_etapes.sql` with no nested parent field and `tasks.etape_id ON DELETE SET NULL`.
- Added etape sqlc queries and extended task queries to read, insert, and preserve `etape_id`.
- Added protected etape create routes and a compact Tasks tab etape strip with `All`, `Unassigned`, and per-etape chips.
- Added etape filtering while preserving the existing four status columns.
- Extended task creation so submitted etape ids are validated against the current tablo before insert.
## Task Commits
1. **Task 1: Add RED coverage for first etape slice** - `a8a3e5f`
2. **Task 2: Implement create-filter-assigned-task slice** - `565bb88`
## Verification
- `cd backend && go test ./internal/web -run 'TestEtapeCreateRendersChipAndCount|TestTaskCreateAssignsEtape|TestEtapeFilterRendersExistingKanbanColumns' -count=1`
- `cd backend && go test ./internal/web -count=1`
- `cd backend && go test ./... -count=1`
## Deviations from Plan
None. The slice stayed within the planned schema, handlers, and template surface.
## Issues Encountered
Sqlc returned row-specific task types when `etape_id` was selected before timestamp columns. The task queries now select and return columns in the generated `Task` model order, keeping existing handler/template code on `sqlc.Task`.
## User Setup Required
None.
## Next Phase Readiness
Plan 09-02 can build directly on the etape query and fragment surface to add edit, delete, and reorder. Deleting etapes should rely on the migration-level `ON DELETE SET NULL` behavior already in place.
## Self-Check: PASSED