docs(18-05): complete user profiles and public sharing client plan
- Create SUMMARY.md with execution results - Update STATE.md with progress and decisions - Mark PROF-01 through PROF-05 requirements complete
This commit is contained in:
@@ -49,11 +49,11 @@ Requirements for this milestone. Each maps to roadmap phases.
|
|||||||
|
|
||||||
### User Profiles & Sharing
|
### User Profiles & Sharing
|
||||||
|
|
||||||
- [ ] **PROF-01**: User has a profile with display name, avatar, and bio
|
- [x] **PROF-01**: User has a profile with display name, avatar, and bio
|
||||||
- [ ] **PROF-02**: User can view their own public profile page
|
- [x] **PROF-02**: User can view their own public profile page
|
||||||
- [ ] **PROF-03**: User can set a setup as public or private
|
- [x] **PROF-03**: User can set a setup as public or private
|
||||||
- [ ] **PROF-04**: Public setups are viewable by anyone without authentication
|
- [x] **PROF-04**: Public setups are viewable by anyone without authentication
|
||||||
- [ ] **PROF-05**: Public profile page lists the user's public setups
|
- [x] **PROF-05**: Public profile page lists the user's public setups
|
||||||
|
|
||||||
## Future Requirements
|
## Future Requirements
|
||||||
|
|
||||||
@@ -141,11 +141,11 @@ Which phases cover which requirements. Updated during roadmap creation.
|
|||||||
| GLOB-03 | Phase 18 | Pending |
|
| GLOB-03 | Phase 18 | Pending |
|
||||||
| GLOB-04 | Phase 18 | Pending |
|
| GLOB-04 | Phase 18 | Pending |
|
||||||
| GLOB-05 | Phase 18 | Pending |
|
| GLOB-05 | Phase 18 | Pending |
|
||||||
| PROF-01 | Phase 18 | Pending |
|
| PROF-01 | Phase 18 | Complete |
|
||||||
| PROF-02 | Phase 18 | Pending |
|
| PROF-02 | Phase 18 | Complete |
|
||||||
| PROF-03 | Phase 18 | Pending |
|
| PROF-03 | Phase 18 | Complete |
|
||||||
| PROF-04 | Phase 18 | Pending |
|
| PROF-04 | Phase 18 | Complete |
|
||||||
| PROF-05 | Phase 18 | Pending |
|
| PROF-05 | Phase 18 | Complete |
|
||||||
|
|
||||||
**Coverage:**
|
**Coverage:**
|
||||||
- v2.0 requirements: 30 total
|
- v2.0 requirements: 30 total
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
---
|
---
|
||||||
gsd_state_version: 1.0
|
gsd_state_version: 1.0
|
||||||
milestone: v2.0
|
milestone: v1.3
|
||||||
milestone_name: Platform Foundation
|
milestone_name: Research & Decision Tools
|
||||||
status: planning
|
status: planning
|
||||||
stopped_at: null
|
stopped_at: Completed 18-05-PLAN.md
|
||||||
last_updated: "2026-04-03"
|
last_updated: "2026-04-05T11:20:56.922Z"
|
||||||
last_activity: 2026-04-03 — v2.0 roadmap created (Phases 14-18)
|
last_activity: 2026-04-03 — v2.0 roadmap created (Phases 14-18)
|
||||||
progress:
|
progress:
|
||||||
total_phases: 5
|
total_phases: 8
|
||||||
completed_phases: 0
|
completed_phases: 6
|
||||||
total_plans: 0
|
total_plans: 12
|
||||||
completed_plans: 0
|
completed_plans: 11
|
||||||
percent: 0
|
percent: 0
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -35,6 +35,7 @@ Progress: [----------] 0% (v2.0 milestone)
|
|||||||
## Performance Metrics
|
## Performance Metrics
|
||||||
|
|
||||||
**Velocity:**
|
**Velocity:**
|
||||||
|
|
||||||
- Total plans completed: 0 (v2.0 milestone)
|
- Total plans completed: 0 (v2.0 milestone)
|
||||||
- Average duration: --
|
- Average duration: --
|
||||||
- Total execution time: --
|
- Total execution time: --
|
||||||
@@ -46,12 +47,14 @@ Progress: [----------] 0% (v2.0 milestone)
|
|||||||
### Decisions
|
### Decisions
|
||||||
|
|
||||||
Key decisions made during v2.0 planning:
|
Key decisions made during v2.0 planning:
|
||||||
|
|
||||||
- Platform pivot: single-user to multi-user with discovery-first approach
|
- Platform pivot: single-user to multi-user with discovery-first approach
|
||||||
- External auth provider (self-hosted, open-source) — Logto vs Authentik OPEN decision
|
- External auth provider (self-hosted, open-source) — Logto vs Authentik OPEN decision
|
||||||
- SQLite to Postgres migration — required by auth provider and multi-user concurrency
|
- SQLite to Postgres migration — required by auth provider and multi-user concurrency
|
||||||
- Structured UGC only — ratings and predefined fields, no freeform text until moderation
|
- Structured UGC only — ratings and predefined fields, no freeform text until moderation
|
||||||
- Separate globalItems table — not a flag on user items table
|
- Separate globalItems table — not a flag on user items table
|
||||||
- Single-user SQLite mode diverges at v2.0 boundary
|
- Single-user SQLite mode diverges at v2.0 boundary
|
||||||
|
- [Phase 18]: Profile data loaded via usePublicProfile(userId) not /auth/me extension
|
||||||
|
|
||||||
### Pending Todos
|
### Pending Todos
|
||||||
|
|
||||||
@@ -64,6 +67,6 @@ None active.
|
|||||||
|
|
||||||
## Session Continuity
|
## Session Continuity
|
||||||
|
|
||||||
Last session: 2026-04-03
|
Last session: 2026-04-05T11:20:56.920Z
|
||||||
Stopped at: v2.0 roadmap created with 5 phases (14-18) covering 30 requirements
|
Stopped at: Completed 18-05-PLAN.md
|
||||||
Resume file: None
|
Resume file: None
|
||||||
|
|||||||
@@ -0,0 +1,102 @@
|
|||||||
|
---
|
||||||
|
phase: 18-global-items-public-profiles
|
||||||
|
plan: 05
|
||||||
|
subsystem: ui
|
||||||
|
tags: [react, tanstack-router, tanstack-query, profiles, public-setups, tailwind]
|
||||||
|
|
||||||
|
requires:
|
||||||
|
- phase: 18-global-items-public-profiles
|
||||||
|
plan: 03
|
||||||
|
provides: "Profile API endpoints, public setup endpoint, isPublic field"
|
||||||
|
provides:
|
||||||
|
- "usePublicProfile and useUpdateProfile hooks"
|
||||||
|
- "ProfileSection component for settings page"
|
||||||
|
- "Public profile page at /users/$userId"
|
||||||
|
- "PublicSetupCard component"
|
||||||
|
- "Setup visibility toggle (isPublic) on setup detail page"
|
||||||
|
- "Public badge on setup list cards"
|
||||||
|
affects: []
|
||||||
|
|
||||||
|
tech-stack:
|
||||||
|
added: []
|
||||||
|
patterns: ["Profile data fetched via usePublicProfile(userId) for form pre-population"]
|
||||||
|
|
||||||
|
key-files:
|
||||||
|
created:
|
||||||
|
- "src/client/hooks/useProfile.ts"
|
||||||
|
- "src/client/components/ProfileSection.tsx"
|
||||||
|
- "src/client/routes/users/$userId.tsx"
|
||||||
|
- "src/client/components/PublicSetupCard.tsx"
|
||||||
|
modified:
|
||||||
|
- "src/client/routes/settings.tsx"
|
||||||
|
- "src/client/routes/setups/$setupId.tsx"
|
||||||
|
- "src/client/hooks/useSetups.ts"
|
||||||
|
- "src/client/components/SetupCard.tsx"
|
||||||
|
- "src/client/components/SetupsView.tsx"
|
||||||
|
|
||||||
|
key-decisions:
|
||||||
|
- "Profile data loaded via usePublicProfile(userId) rather than extending /auth/me response"
|
||||||
|
- "isPublic toggle placed in setup detail action bar as a button with globe icon"
|
||||||
|
- "Public badge shown on SetupCard in list view for visual indicator"
|
||||||
|
|
||||||
|
patterns-established:
|
||||||
|
- "Public profile route pattern: /users/$userId with TanStack Router file-based routing"
|
||||||
|
- "Profile edit via dedicated ProfileSection component in settings page"
|
||||||
|
|
||||||
|
requirements-completed: [PROF-01, PROF-02, PROF-03, PROF-04, PROF-05]
|
||||||
|
|
||||||
|
duration: 5min
|
||||||
|
completed: 2026-04-05
|
||||||
|
---
|
||||||
|
|
||||||
|
# Phase 18 Plan 05: User Profiles & Public Sharing Client Summary
|
||||||
|
|
||||||
|
**Profile edit UI in settings with avatar upload, public profile page with setup listing, and setup visibility toggle with globe icon**
|
||||||
|
|
||||||
|
## Performance
|
||||||
|
|
||||||
|
- **Duration:** 5 min
|
||||||
|
- **Started:** 2026-04-05T11:15:08Z
|
||||||
|
- **Completed:** 2026-04-05T11:19:47Z
|
||||||
|
- **Tasks:** 3 (2 auto + 1 checkpoint auto-approved)
|
||||||
|
- **Files modified:** 9
|
||||||
|
|
||||||
|
## What Was Built
|
||||||
|
|
||||||
|
### Task 1: Profile hooks and profile edit UI
|
||||||
|
- Created `usePublicProfile` hook for fetching public profile data and `useUpdateProfile` mutation hook
|
||||||
|
- Created `ProfileSection` component with avatar upload (reuses existing /api/images endpoint), display name input (max 100 chars), bio textarea with character counter (max 500 chars), and save button
|
||||||
|
- Added ProfileSection to settings page as first section (visible when authenticated)
|
||||||
|
|
||||||
|
### Task 2: Public profile page and setup visibility toggle
|
||||||
|
- Created public profile page at `/users/$userId` with avatar, display name (falls back to "User #id"), bio, and grid of public setups
|
||||||
|
- Created `PublicSetupCard` component showing setup name and formatted creation date
|
||||||
|
- Added isPublic toggle button with globe icon in setup detail action bar
|
||||||
|
- Added "Public" badge to SetupCard in list view
|
||||||
|
- Updated `useSetups` interfaces and `useUpdateSetup` mutation to support `isPublic` field
|
||||||
|
|
||||||
|
### Task 3: Verification (auto-approved)
|
||||||
|
- Build succeeds, lint passes
|
||||||
|
|
||||||
|
## Commits
|
||||||
|
|
||||||
|
| Task | Commit | Message |
|
||||||
|
|------|--------|---------|
|
||||||
|
| 1 | f120d17 | feat(18-05): add profile hooks and profile edit UI in settings |
|
||||||
|
| 2 | a995668 | feat(18-05): add public profile page and setup visibility toggle |
|
||||||
|
|
||||||
|
## Deviations from Plan
|
||||||
|
|
||||||
|
### Auto-fixed Issues
|
||||||
|
|
||||||
|
**1. [Rule 2 - Missing] Profile data loading strategy**
|
||||||
|
- **Found during:** Task 1
|
||||||
|
- **Issue:** Plan suggested reading profile from `auth?.user?.displayName` but /auth/me only returns `{ id }`, not profile fields
|
||||||
|
- **Fix:** Used `usePublicProfile(userId)` to fetch profile data separately, with useEffect for form initialization
|
||||||
|
- **Files modified:** src/client/components/ProfileSection.tsx
|
||||||
|
|
||||||
|
## Known Stubs
|
||||||
|
|
||||||
|
None -- all components are wired to real API endpoints.
|
||||||
|
|
||||||
|
## Self-Check: PASSED
|
||||||
Reference in New Issue
Block a user