docs(10-03): complete event navigation plan

This commit is contained in:
Arthur Belleville 2026-05-16 00:35:41 +02:00
parent ebd31b5645
commit a94550e72b
No known key found for this signature in database
3 changed files with 109 additions and 6 deletions

View file

@ -14,7 +14,7 @@
|---|-------|------|--------------| |---|-------|------|--------------|
| 8 | Social Sign-in | Google sign-in creates/links local users and issues existing Xtablo sessions; Apple sign-in is disabled | AUTH-08..13 | | 8 | Social Sign-in | Google sign-in creates/links local users and issues existing Xtablo sessions; Apple sign-in is disabled | AUTH-08..13 |
| 9 | Etapes | Tasks can be grouped under one-level etapes without breaking the kanban model | ETAPE-01..06 | | 9 | Etapes | Tasks can be grouped under one-level etapes without breaking the kanban model | ETAPE-01..06 |
| 10 | 2/4 | In Progress| | | 10 | 3/4 | In Progress| |
| 11 | Individual Planning | Users can view their own event agenda across tablos | PLAN-01..04 | | 11 | Individual Planning | Users can view their own event agenda across tablos | PLAN-01..04 |
| 12 | Native Tablo Chat | Each tablo has persisted discussion with real-time delivery and no managed chat provider | CHAT-01..06 | | 12 | Native Tablo Chat | Each tablo has persisted discussion with real-time delivery and no managed chat provider | CHAT-01..06 |

View file

@ -3,14 +3,14 @@ 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-15T22:33:27.007Z" last_updated: "2026-05-15T22:35:34.974Z"
last_activity: 2026-05-15 last_activity: 2026-05-15
progress: progress:
total_phases: 5 total_phases: 5
completed_phases: 2 completed_phases: 2
total_plans: 13 total_plans: 13
completed_plans: 11 completed_plans: 12
percent: 85 percent: 92
--- ---
# STATE # STATE
@ -29,10 +29,10 @@ See: `.planning/PROJECT.md` (updated 2026-05-15)
## Current Position ## Current Position
Phase: 10 (events) — EXECUTING Phase: 10 (events) — EXECUTING
Plan: 3 of 4 Plan: 4 of 4
Status: Ready to execute Status: Ready to execute
Last activity: 2026-05-15 Last activity: 2026-05-15
Resume file: .planning/phases/10-events/10-03-PLAN.md Resume file: .planning/phases/10-events/10-04-PLAN.md
## Phase Status ## Phase Status

View file

@ -0,0 +1,103 @@
---
phase: 10-events
plan: 03
subsystem: events
tags: [events, postgres, sqlc, htmx, templ, planning]
requires:
- phase: 10-events
provides: Plan 02 event CRUD routes and fragments
provides:
- Human-readable previous/next month navigation labels
- Day-click event creation prefill
- Calendar overflow display locked at three titles plus +N more
- User-scoped event range query returning tablo title and color
affects: [events, planning, calendar]
tech-stack:
added: []
patterns:
- "Date query values are GET defaults only; POST form fields remain authoritative."
- "User planning aggregation joins through tablos and filters by tablos.user_id."
key-files:
created: []
modified:
- backend/internal/db/queries/events.sql
- backend/internal/web/handlers_events_test.go
- backend/internal/web/handlers_events.go
- backend/templates/events.templ
- backend/templates/events_forms.go
key-decisions:
- "Expose ListUserEventsRange now so the individual planning phase can consume the query surface directly."
- "Keep Events tab navigation server-rendered through /tablos/{id}/events?month=YYYY-MM."
patterns-established:
- "Month labels are computed in the calendar view model, not in the template."
- "Planning aggregation rows include event fields plus tablo display metadata."
requirements-completed: [EVENT-01, EVENT-03, EVENT-05]
duration: ~15min
completed: 2026-05-15
---
# Phase 10: Events Plan 03 Summary
**Events month navigation, day prefill, overflow display, and user-scoped planning query**
## Performance
- **Duration:** ~15 min
- **Started:** 2026-05-15T22:47:00Z
- **Completed:** 2026-05-15T23:02:00Z
- **Tasks:** 2
- **Files modified:** 5
## Accomplishments
- Added tests for month navigation labels, day prefill, submitted-date precedence, overflow display, and user-scoped aggregation.
- Added `ListUserEventsRange` joining events to tablos and filtering by `tablos.user_id`.
- Added human-readable previous/next month labels to the Events calendar view model.
- Confirmed day-cell create prefill, POST field precedence, and `+N more` overflow behavior.
## Task Commits
Each task was committed atomically:
1. **Task 1: Add RED coverage for navigation, prefill, overflow, and aggregation** - `0692dd2` (test)
2. **Task 2: Implement navigation, day prefill, overflow display, and planning query** - `ebd31b5` (feat)
## Files Created/Modified
- `backend/internal/db/queries/events.sql` - Adds the user-scoped date-range aggregation query.
- `backend/internal/web/handlers_events_test.go` - Adds navigation, prefill, overflow, and aggregation tests.
- `backend/internal/web/handlers_events.go` - Adds previous/next month label data to the calendar model.
- `backend/templates/events.templ` - Uses human-readable month labels in accessible navigation.
- `backend/templates/events_forms.go` - Extends `EventsCalendar` with previous/next month labels.
## Decisions Made
- Query `date` is only a GET default for opening the create form; create and update persistence reads submitted form fields.
- The planning query returns owned events across all tablos with `tablo_title` and nullable `tablo_color`.
## Deviations from Plan
None - plan executed as written.
## Issues Encountered
None.
## User Setup Required
None - no external service configuration required.
## Next Phase Readiness
The Events tab behavior and the planning query handoff are ready. Plan 10-04 can focus on regression coverage and final verification for Phase 10.
---
*Phase: 10-events*
*Completed: 2026-05-15*