diff --git a/.planning/REQUIREMENTS.md b/.planning/REQUIREMENTS.md index 105ef75..0c8635b 100644 --- a/.planning/REQUIREMENTS.md +++ b/.planning/REQUIREMENTS.md @@ -17,11 +17,11 @@ Requirements for Public Discovery milestone. Each maps to roadmap phases. ### Discovery -- [ ] **DISC-01**: Landing page displays an always-visible catalog search bar at the top +- [x] **DISC-01**: Landing page displays an always-visible catalog search bar at the top - [x] **DISC-02**: Landing page shows a feed of popular setups below the search - [x] **DISC-03**: Landing page shows recently added catalog items - [x] **DISC-04**: Landing page shows trending categories -- [ ] **DISC-05**: Authenticated users see a "Go to Collection" entry point from the landing page +- [x] **DISC-05**: Authenticated users see a "Go to Collection" entry point from the landing page ### Catalog Enrichment @@ -130,11 +130,11 @@ Which phases cover which requirements. Updated during roadmap creation. | SEED-01 | Phase 25 | Complete | | SEED-02 | Phase 25 | Complete | | SEED-03 | Phase 25 | Complete | -| DISC-01 | Phase 26 | Pending | +| DISC-01 | Phase 26 | Complete | | DISC-02 | Phase 26 | Complete | | DISC-03 | Phase 26 | Complete | | DISC-04 | Phase 26 | Complete | -| DISC-05 | Phase 26 | Pending | +| DISC-05 | Phase 26 | Complete | | INFR-02 | Phase 26 | Complete | **Coverage:** diff --git a/.planning/ROADMAP.md b/.planning/ROADMAP.md index 5da5d72..80d6d60 100644 --- a/.planning/ROADMAP.md +++ b/.planning/ROADMAP.md @@ -70,7 +70,7 @@ - [x] **Phase 24: Public Access & Infrastructure** - Remove the login wall from read-only routes and add rate limiting to public endpoints (completed 2026-04-10) - [x] **Phase 25: Catalog Enrichment & Agent Tools** - Add attribution fields to global items, bulk import API, and MCP tools for agent-powered seeding (completed 2026-04-10) -- [ ] **Phase 26: Discovery Landing Page** - Replace the dashboard with a public-first landing page featuring catalog search and community feed +- [x] **Phase 26: Discovery Landing Page** - Replace the dashboard with a public-first landing page featuring catalog search and community feed (completed 2026-04-10) ## Phase Details @@ -123,7 +123,7 @@ Plans: Plans: - [x] 26-01-PLAN.md — Discovery service layer with cursor pagination (TDD) - [x] 26-02-PLAN.md — Discovery routes, server registration, and client hooks -- [ ] 26-03-PLAN.md — Landing page UI and PublicSetupCard enhancement +- [x] 26-03-PLAN.md — Landing page UI and PublicSetupCard enhancement **UI hint**: yes ## Progress @@ -155,7 +155,7 @@ Plans: | 23. Manual Entry Fallback | v2.0 | 1/1 | Complete | 2026-04-06 | | 24. Public Access & Infrastructure | v2.1 | 2/2 | Complete | 2026-04-10 | | 25. Catalog Enrichment & Agent Tools | v2.1 | 1/2 | Complete | 2026-04-10 | -| 26. Discovery Landing Page | v2.1 | 2/3 | In Progress| | +| 26. Discovery Landing Page | v2.1 | 3/3 | Complete | 2026-04-10 | ## Backlog @@ -166,7 +166,7 @@ Plans: Plans: - [x] 26-01-PLAN.md — Discovery service layer with cursor pagination (TDD) -- [ ] 26-02-PLAN.md — Discovery routes, server registration, and client hooks +- [x] 26-02-PLAN.md — Discovery routes, server registration, and client hooks - [ ] 26-03-PLAN.md — Landing page UI and PublicSetupCard enhancement Plans: @@ -178,7 +178,7 @@ Plans: **Plans**: 3 plans Plans: -- [ ] 26-01-PLAN.md — Discovery service layer with cursor pagination (TDD) +- [x] 26-01-PLAN.md — Discovery service layer with cursor pagination (TDD) - [ ] 26-02-PLAN.md — Discovery routes, server registration, and client hooks - [ ] 26-03-PLAN.md — Landing page UI and PublicSetupCard enhancement diff --git a/.planning/STATE.md b/.planning/STATE.md index e6c51a5..b8573da 100644 --- a/.planning/STATE.md +++ b/.planning/STATE.md @@ -2,15 +2,15 @@ gsd_state_version: 1.0 milestone: v2.1 milestone_name: Public Discovery -status: executing -stopped_at: Completed 26-02-PLAN.md -last_updated: "2026-04-10T12:59:46.313Z" +status: verifying +stopped_at: Completed 26-03-PLAN.md +last_updated: "2026-04-10T13:02:50.041Z" last_activity: 2026-04-10 progress: total_phases: 6 - completed_phases: 2 + completed_phases: 3 total_plans: 7 - completed_plans: 6 + completed_plans: 7 percent: 0 --- @@ -27,7 +27,7 @@ See: .planning/PROJECT.md (updated 2026-04-09) Phase: 26 (discovery-landing-page) — EXECUTING Plan: 3 of 3 -Status: Ready to execute +Status: Phase complete — ready for verification Last activity: 2026-04-10 Progress: [░░░░░░░░░░] 0% @@ -71,6 +71,8 @@ v2.1 decisions: - [Phase 26-discovery-landing-page]: Composite cursor for setups uses itemCount_id format filtered post-query in JS for simplicity with grouped SQL - [Phase 26-discovery-landing-page]: No cursor pagination for getTrendingCategories — bounded small list, simple limit is sufficient - [Phase 26]: discoveryRoutes registered with browseTier rate limiting (120 req/min) for all GET discovery endpoints +- [Phase 26-discovery-landing-page]: PublicSetupCard itemCount/creatorName fields are optional for backward compatibility with users/$userId usage +- [Phase 26-discovery-landing-page]: Discovery sections hide entirely (return null) when not loading and data is empty — avoids empty grid layouts ### Pending Todos @@ -82,6 +84,6 @@ None. ## Session Continuity -Last session: 2026-04-10T12:59:46.310Z -Stopped at: Completed 26-02-PLAN.md +Last session: 2026-04-10T13:02:50.039Z +Stopped at: Completed 26-03-PLAN.md Resume file: None diff --git a/.planning/phases/26-discovery-landing-page/26-03-SUMMARY.md b/.planning/phases/26-discovery-landing-page/26-03-SUMMARY.md new file mode 100644 index 0000000..82cfe73 --- /dev/null +++ b/.planning/phases/26-discovery-landing-page/26-03-SUMMARY.md @@ -0,0 +1,111 @@ +--- +phase: 26-discovery-landing-page +plan: "03" +subsystem: ui +tags: [react, tanstack-router, tanstack-query, tailwind, lucide-react] + +# Dependency graph +requires: + - phase: 26-01 + provides: discovery API endpoints (GET /api/discovery/setups, items, categories) + - phase: 26-02 + provides: useDiscoverySetups, useDiscoveryItems, useDiscoveryCategories hooks +provides: + - Landing page at / with hero, popular setups, recent items, trending categories + - Enhanced PublicSetupCard with itemCount and creatorName display +affects: + - users/$userId (inherits PublicSetupCard enhancement) + - CatalogSearchOverlay (triggered from hero search bar) + +# Tech tracking +tech-stack: + added: [] + patterns: + - Empty-state hiding: sections return null when not loading and data is empty + - SectionSkeleton helper for consistent animate-pulse loading states + - Auth-conditional CTA: !!auth?.user pattern for authenticated UI branching + +key-files: + created: [] + modified: + - src/client/routes/index.tsx + - src/client/components/PublicSetupCard.tsx + +key-decisions: + - "PublicSetupCard itemCount/creatorName fields are optional for backward compatibility with users/$userId usage" + - "HeroSection search bar triggers openCatalogSearch('collection') from uiStore — not a real input, just a click target" + - "Sections hide entirely (return null) when not loading and data is empty — avoids empty grid layouts" + +patterns-established: + - "Optional prop enhancement: add new props as optional to avoid breaking existing usages" + - "Discovery page sections are self-contained components that own their data-fetching logic" + +requirements-completed: [DISC-01, DISC-02, DISC-03, DISC-04, DISC-05] + +# Metrics +duration: 2min +completed: 2026-04-10 +--- + +# Phase 26 Plan 03: Discovery Landing Page Summary + +**Discovery landing page replacing personal dashboard — hero search trigger, popular setups feed, recent catalog items, trending categories, with auth-conditional CTA and PublicSetupCard enhanced with item counts and creator names** + +## Performance + +- **Duration:** 2 min +- **Started:** 2026-04-10T13:00:39Z +- **Completed:** 2026-04-10T13:02:15Z +- **Tasks:** 2 executed (+ 1 human-verify checkpoint auto-approved) +- **Files modified:** 2 + +## Accomplishments +- Rewrote `src/client/routes/index.tsx` from personal dashboard (DashboardPage) to public discovery landing page (LandingPage) +- Added hero section with "Discover Gear" heading, catalog search bar trigger (opens CatalogSearchOverlay), and conditional "Go to Collection" link for authenticated users +- Built three content feed sections: Popular Setups (PublicSetupCard grid), Recently Added (GlobalItemCard grid), Trending Categories (pill chips) +- Enhanced `PublicSetupCard` with optional `itemCount` and `creatorName` fields — backward compatible with existing users/$userId usage +- Loading skeletons (animate-pulse) for all sections; sections hide when empty + +## Task Commits + +Each task was committed atomically: + +1. **Task 1: Enhance PublicSetupCard with itemCount and creatorName** - `0bf1c68` (feat) +2. **Task 2: Rewrite index.tsx as discovery landing page** - `8aaf435` (feat) +3. **Task 3: Visual verification checkpoint** - auto-approved (auto-chain active) + +## Files Created/Modified +- `src/client/routes/index.tsx` - Completely rewritten as LandingPage with HeroSection, PopularSetupsSection, RecentItemsSection, TrendingCategoriesSection, SectionSkeleton +- `src/client/components/PublicSetupCard.tsx` - Enhanced with optional itemCount (blue badge) and creatorName (attribution line), cursor-pointer added + +## Decisions Made +- PublicSetupCard enhancement used optional props to maintain backward compat — existing `users/$userId.tsx` usage requires no changes +- Search bar is a styled div with onClick/onKeyDown, not a real input — clicking opens CatalogSearchOverlay directly +- Auth check uses `!!auth?.user` (not `auth?.authenticated`) per plan anti-pattern guidance + +## Deviations from Plan + +None - plan executed exactly as written. + +## Issues Encountered + +None. + +## User Setup Required + +None - no external service configuration required. + +## Known Stubs + +None — all three discovery sections fetch real data from the API endpoints built in plans 26-01 and 26-02. Empty state is handled by hiding sections. + +## Next Phase Readiness +- Discovery landing page complete — phase 26 fully delivered +- All DISC-01 through DISC-05 requirements satisfied +- PublicSetupCard enhancement available for any future usage needing item counts + +## Self-Check: PASSED + +--- +*Phase: 26-discovery-landing-page* +*Completed: 2026-04-10*