docs(27-02): complete setups-elevation plan

This commit is contained in:
2026-04-10 23:44:36 +02:00
parent dccb1f8d3f
commit be3759b53a
3 changed files with 83 additions and 14 deletions

View File

@@ -0,0 +1,68 @@
---
phase: 27-top-nav-restructure-and-search-bar-rethink
plan: "02"
subsystem: client-routing
tags: [routing, navigation, setups, collection, tanstack-router]
dependency_graph:
requires: []
provides: [setups-top-level-route, collection-two-tab-ui]
affects: [src/client/routes/setups/index.tsx, src/client/routes/collection/index.tsx, routeTree.gen.ts]
tech_stack:
added: []
patterns: [createFileRoute, tanstack-router-file-based-routing, zod-search-validation]
key_files:
created:
- src/client/routes/setups/index.tsx
modified:
- src/client/routes/collection/index.tsx
decisions:
- "Setups top-level route wraps SetupsView in standard max-w-7xl container — matches Collection page layout pattern"
- "z.enum catch('gear') handles legacy /collection?tab=setups URLs gracefully — no redirect needed"
metrics:
duration: "~2 minutes"
completed: "2026-04-10T21:43:53Z"
tasks_completed: 2
tasks_total: 2
files_changed: 2
---
# Phase 27 Plan 02: Setups Elevation and Collection Tab Simplification Summary
**One-liner:** Setups promoted to standalone `/setups` route; Collection page reduced to Gear and Planning tabs with Zod `.catch("gear")` graceful fallback for legacy URLs.
## Tasks Completed
| Task | Name | Commit | Files |
|------|------|--------|-------|
| 1 | Create setups index route | 329bfce | src/client/routes/setups/index.tsx (created) |
| 2 | Remove Setups tab from Collection page | 7fd9845 | src/client/routes/collection/index.tsx (modified) |
## What Was Built
**Task 1 — /setups top-level route**
Created `src/client/routes/setups/index.tsx` using TanStack Router's `createFileRoute("/setups/")`. The route wraps `SetupsView` in the standard `max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6` container, matching the Collection page layout. The TanStack Router dev server auto-regenerates `routeTree.gen.ts` — file was not edited manually.
**Task 2 — Collection page simplified to 2 tabs**
Removed the Setups tab from `collection/index.tsx`:
- `TAB_ORDER` changed from `["gear", "planning", "setups"]` to `["gear", "planning"]`
- `TAB_LABELS` reduced to Gear and Planning entries
- `searchSchema` z.enum updated to `["gear", "planning"]` with `.catch("gear")` — old `?tab=setups` URLs fall back to Gear tab automatically
- `SetupsView` import removed
- Conditional render simplified to a binary: `tab === "gear"` ? `<CollectionView />` : `<PlanningView />`
- AnimatePresence, slide variants, and motion.div animation left exactly as-is
## Deviations from Plan
None — plan executed exactly as written.
## Known Stubs
None.
## Self-Check: PASSED
- `src/client/routes/setups/index.tsx` exists and contains `createFileRoute("/setups/")` and `SetupsView`
- `src/client/routes/collection/index.tsx` contains no "setups" string
- Commits 329bfce and 7fd9845 confirmed in git log