- 26-03-SUMMARY.md: landing page rewrite and PublicSetupCard enhancement - STATE.md: advanced to phase complete, recorded decisions - ROADMAP.md: phase 26 marked complete (3/3 plans) - REQUIREMENTS.md: DISC-01 through DISC-05 marked complete
112 lines
4.5 KiB
Markdown
112 lines
4.5 KiB
Markdown
---
|
|
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*
|