docs(18-01): complete plan 01 summary - AppLayout signature extension
This commit is contained in:
parent
59f143aecb
commit
8cd460e8f0
1 changed files with 82 additions and 0 deletions
82
.planning/phases/18-app-shell-navigation/18-01-SUMMARY.md
Normal file
82
.planning/phases/18-app-shell-navigation/18-01-SUMMARY.md
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
---
|
||||
phase: 18-app-shell-navigation
|
||||
plan: "01"
|
||||
subsystem: templates/handlers
|
||||
tags: [go, templ, breadcrumb, app-shell, nav]
|
||||
dependency_graph:
|
||||
requires: []
|
||||
provides: [BreadcrumbItem struct, extended AppLayout signature]
|
||||
affects: [backend/templates, backend/internal/web]
|
||||
tech_stack:
|
||||
added: []
|
||||
patterns: [templ component slot forwarding, breadcrumb struct]
|
||||
key_files:
|
||||
created: []
|
||||
modified:
|
||||
- backend/templates/app_layout_helpers.go
|
||||
- backend/templates/app_layout.templ
|
||||
- backend/templates/tablos.templ
|
||||
- backend/templates/planning.templ
|
||||
- backend/templates/account_providers.templ
|
||||
- backend/internal/web/handlers_tablos.go
|
||||
- backend/internal/web/handlers_planning.go
|
||||
- backend/internal/web/handlers_account.go
|
||||
- backend/internal/web/handlers_discussion.go
|
||||
- backend/internal/web/handlers_files.go
|
||||
- backend/internal/web/handlers_events.go
|
||||
decisions:
|
||||
- BreadcrumbItem as a struct with Label+Href fields (clean call sites, extensible)
|
||||
- headerActions slot with nil-guard in AppLayout body (prevents nil templ.Component panic per research Pitfall 6)
|
||||
- templ package import for templ.Component not needed explicitly in .templ files (compiler auto-adds it)
|
||||
metrics:
|
||||
duration: ~15min
|
||||
completed: "2026-05-17"
|
||||
tasks: 3
|
||||
files: 11
|
||||
---
|
||||
|
||||
# Phase 18 Plan 01: AppLayout Signature Extension Summary
|
||||
|
||||
**One-liner:** Extended AppLayout from 5 to 8 parameters (pageTitle, breadcrumb []BreadcrumbItem, headerActions templ.Component) and updated all 10+ call sites across 6 handler files so the codebase compiles clean and all tests pass.
|
||||
|
||||
## Tasks Completed
|
||||
|
||||
| # | Task | Commit | Files |
|
||||
|---|------|--------|-------|
|
||||
| 1 | Define BreadcrumbItem and extend AppLayout signature | 3e2c869 | app_layout_helpers.go, app_layout.templ |
|
||||
| 2 | Update all templ wrapper signatures | eff62b0 | tablos.templ, planning.templ, account_providers.templ |
|
||||
| 3 | Update all handler call sites with per-page breadcrumbs | 59f143a | handlers_tablos.go, handlers_planning.go, handlers_account.go, handlers_discussion.go, handlers_files.go, handlers_events.go |
|
||||
|
||||
## Decisions Made
|
||||
|
||||
- **BreadcrumbItem struct** (not string slice) — struct with Label+Href fields makes call sites readable and allows per-item linking in Plans 02/03
|
||||
- **nil guard on headerActions** — `if headerActions != nil { @headerActions }` prevents templ.Component nil render panic (research Pitfall 6); Plans 02/03 will fill this slot
|
||||
- **No explicit templ import in .templ file** — templ compiler auto-injects the import; adding it manually caused `templ redeclared` compile error
|
||||
- **TabloNotFoundPage** — updated to pass `"Not found", nil, nil` (hardcoded breadcrumb nil — not a navigated page)
|
||||
|
||||
## Verification
|
||||
|
||||
- `templ generate ./...` — zero errors
|
||||
- `go build ./...` — zero compile errors
|
||||
- `go test ./...` — all tests pass (backend/internal/web: 0.833s, backend/templates: 0.418s)
|
||||
- `grep "BreadcrumbItem" backend/templates/app_layout_helpers.go` — struct definition confirmed
|
||||
- `grep -c "pageTitle" backend/templates/app_layout.templ` — returns 1
|
||||
|
||||
## Deviations from Plan
|
||||
|
||||
None — plan executed exactly as written.
|
||||
|
||||
## Known Stubs
|
||||
|
||||
- `breadcrumb` and `headerActions` params are threaded through but rendered minimally (breadcrumb as HTML comment, headerActions with nil guard). Plans 02 and 03 render these properly. This is intentional per the plan objective.
|
||||
|
||||
## Threat Flags
|
||||
|
||||
None — new parameters use templ auto-escaping for all string interpolations (tablo.Title in breadcrumb); no raw HTML insertion.
|
||||
|
||||
## Self-Check: PASSED
|
||||
|
||||
- `backend/templates/app_layout_helpers.go` — exists, contains BreadcrumbItem struct
|
||||
- `backend/templates/app_layout.templ` — exists, AppLayout has 8 parameters
|
||||
- `backend/templates/tablos.templ` — exists, TablosDashboard and TabloDetailPage updated
|
||||
- Commits 3e2c869, eff62b0, 59f143a — all present in git log
|
||||
Loading…
Reference in a new issue