docs(06-02): complete category icon UI components plan

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-15 17:59:16 +01:00
parent 9fcb07c96b
commit ce4654b507
3 changed files with 138 additions and 13 deletions

View File

@@ -25,7 +25,7 @@ Requirements for v1.1 Fixes & Polish. Each maps to roadmap phases.
### Categories
- [ ] **CAT-01**: User can select a Lucide icon when creating/editing a category (icon picker)
- [x] **CAT-01**: User can select a Lucide icon when creating/editing a category (icon picker)
- [ ] **CAT-02**: Category icons display as Lucide icons throughout the app (cards, headers, lists)
- [x] **CAT-03**: Existing emoji categories are migrated to equivalent Lucide icons
@@ -81,7 +81,7 @@ Which phases cover which requirements. Updated during roadmap creation.
| IMG-04 | Phase 5 | Complete |
| PLAN-01 | Phase 4 | Complete |
| PLAN-02 | Phase 4 | Complete |
| CAT-01 | Phase 6 | Pending |
| CAT-01 | Phase 6 | Complete |
| CAT-02 | Phase 6 | Pending |
| CAT-03 | Phase 6 | Complete |

View File

@@ -3,15 +3,15 @@ gsd_state_version: 1.0
milestone: v1.1
milestone_name: Fixes & Polish
status: executing
stopped_at: Completed 06-01 category icon data layer
last_updated: "2026-03-15T16:50:15.000Z"
last_activity: 2026-03-15 -- Completed 06-01 category icon data layer
stopped_at: Completed 06-02 category icon UI components
last_updated: "2026-03-15T16:59:03.899Z"
last_activity: 2026-03-15 -- Completed 06-02 category icon UI components
progress:
total_phases: 3
completed_phases: 2
total_plans: 7
completed_plans: 5
percent: 71
completed_plans: 6
percent: 86
---
# Project State
@@ -26,11 +26,11 @@ See: .planning/PROJECT.md (updated 2026-03-15)
## Current Position
Phase: 6 of 6 (Category Icons)
Plan: 1 of 3 in current phase
Plan: 2 of 3 in current phase
Status: In Progress
Last activity: 2026-03-15 -- Completed 06-01 category icon data layer
Last activity: 2026-03-15 -- Completed 06-02 category icon UI components
Progress: [█████████] 100% (v1.1 phases)
Progress: [█████████] 86% (v1.1 phases)
## Accumulated Context
@@ -48,6 +48,7 @@ Progress: [██████████] 100% (v1.1 phases)
- [Phase 06]: ALTER TABLE RENAME COLUMN for SQLite migration instead of table recreation
- [Phase 06]: Applied migration via Bun SQLite API since drizzle-kit requires interactive input
- [Phase 06]: 119 curated Lucide icons across 8 groups for gear coverage
- [Phase 06]: Native HTML select cannot render React components -- category selects show name only
### Pending Todos
@@ -61,6 +62,6 @@ None.
## Session Continuity
Last session: 2026-03-15T16:50:15.000Z
Stopped at: Completed 06-01 category icon data layer
Resume file: .planning/phases/06-category-icons/06-01-SUMMARY.md
Last session: 2026-03-15T16:59:03.897Z
Stopped at: Completed 06-02 category icon UI components
Resume file: None

View File

@@ -0,0 +1,124 @@
---
phase: 06-category-icons
plan: 02
subsystem: ui
tags: [lucide-react, icon-picker, react, components]
requires:
- phase: 06-category-icons/01
provides: iconData.ts with LucideIcon component and iconGroups, icon column in schema
provides:
- IconPicker component with search, group tabs, and icon grid
- All category create/edit flows using Lucide icons instead of emoji
- Category display in pickers and headers showing Lucide icons
affects: [06-03]
tech-stack:
added: []
patterns: [portal-based icon picker mirroring EmojiPicker architecture]
key-files:
created:
- src/client/components/IconPicker.tsx
modified:
- src/client/components/CategoryPicker.tsx
- src/client/components/CategoryHeader.tsx
- src/client/components/OnboardingWizard.tsx
- src/client/components/CreateThreadModal.tsx
- src/client/hooks/useCategories.ts
- src/client/routes/collection/index.tsx
- src/client/routes/setups/$setupId.tsx
- src/client/routes/threads/$threadId.tsx
key-decisions:
- "Native HTML select cannot render React components -- category selects show name only without icon"
- "IconPicker uses 6-column grid (vs EmojiPicker 8-column) for better icon visibility at 20px"
patterns-established:
- "IconPicker component: portal-based popover with search + group tabs for Lucide icon selection"
requirements-completed: [CAT-01]
duration: 5min
completed: 2026-03-15
---
# Phase 6 Plan 2: Category Icon UI Components Summary
**IconPicker component with search/group tabs and all category create/edit/display flows migrated from emoji to Lucide icons**
## Performance
- **Duration:** 5 min
- **Started:** 2026-03-15T16:53:11Z
- **Completed:** 2026-03-15T16:58:04Z
- **Tasks:** 2
- **Files modified:** 9
## Accomplishments
- Created IconPicker component with portal popover, search filtering, 8 group tabs, and 6-column icon grid
- Replaced EmojiPicker with IconPicker in CategoryPicker, CategoryHeader, and OnboardingWizard
- Updated CategoryPicker to show LucideIcon prefix in input and dropdown list items
- Build succeeds with no TypeScript errors
## Task Commits
Each task was committed atomically:
1. **Task 1: Create IconPicker component** - `59d1c89` (feat)
2. **Task 2: Update CategoryPicker, CategoryHeader, OnboardingWizard, and CreateThreadModal** - `570bcea` (feat)
## Files Created/Modified
- `src/client/components/IconPicker.tsx` - New portal-based Lucide icon picker with search and group tabs
- `src/client/components/CategoryPicker.tsx` - Uses IconPicker for inline create, LucideIcon for display
- `src/client/components/CategoryHeader.tsx` - LucideIcon in view mode, IconPicker in edit mode
- `src/client/components/OnboardingWizard.tsx` - IconPicker for category creation step
- `src/client/components/CreateThreadModal.tsx` - Removed emoji from category select options
- `src/client/hooks/useCategories.ts` - Fixed emoji -> icon in useUpdateCategory type
- `src/client/routes/collection/index.tsx` - Fixed categoryEmoji -> categoryIcon references
- `src/client/routes/setups/$setupId.tsx` - Fixed categoryEmoji -> categoryIcon references
- `src/client/routes/threads/$threadId.tsx` - Fixed categoryEmoji -> categoryIcon reference
## Decisions Made
- Native HTML `<select>` elements cannot render React components, so category select dropdowns show name only (no icon prefix)
- IconPicker uses 6-column grid instead of EmojiPicker's 8-column for better visibility of icons at 20px
## Deviations from Plan
### Auto-fixed Issues
**1. [Rule 3 - Blocking] Fixed categoryEmoji -> categoryIcon in collection and setup routes**
- **Found during:** Task 2
- **Issue:** Routes passed `emoji={categoryEmoji}` to CategoryHeader and used `item.categoryEmoji` which no longer exists after Plan 01 renamed the field
- **Fix:** Updated all `categoryEmoji` references to `categoryIcon` and `emoji=` prop to `icon=` in collection/index.tsx, setups/$setupId.tsx, and threads/$threadId.tsx
- **Files modified:** src/client/routes/collection/index.tsx, src/client/routes/setups/$setupId.tsx, src/client/routes/threads/$threadId.tsx
- **Verification:** Build succeeds
- **Committed in:** 570bcea (Task 2 commit)
**2. [Rule 3 - Blocking] Fixed useUpdateCategory hook type from emoji to icon**
- **Found during:** Task 2
- **Issue:** useUpdateCategory mutationFn type still had `emoji?: string` instead of `icon?: string`
- **Fix:** Changed type to `icon?: string`
- **Files modified:** src/client/hooks/useCategories.ts
- **Verification:** Build succeeds
- **Committed in:** 570bcea (Task 2 commit)
---
**Total deviations:** 2 auto-fixed (2 blocking)
**Impact on plan:** Both fixes were necessary for build to pass after Plan 01 renamed emoji to icon. No scope creep.
## Issues Encountered
None
## User Setup Required
None - no external service configuration required.
## Next Phase Readiness
- IconPicker and all category create/edit components complete
- EmojiPicker.tsx and emojiData.ts can be removed in Plan 03 (cleanup)
- Some display components (ItemCard, ThreadCard, etc.) were already updated in Plan 01
---
*Phase: 06-category-icons*
*Completed: 2026-03-15*