Phases 28-31 archived to milestones/v2.2-phases/ Requirements and roadmap snapshots archived to milestones/ Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.8 KiB
1.8 KiB
phase, plan, subsystem, tags, key-files, metrics
| phase | plan | subsystem | tags | key-files | metrics | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 29 | 01 | backend |
|
|
|
Plan 29-01 Summary: Schema + Dominant Color Extraction
What was built
- Installed Sharp image processing library for server-side color extraction
- Added
dominant_color,crop_zoom,crop_x,crop_ycolumns to items, global_items, and thread_candidates tables - Created
extractDominantColor()function that resizes image to 1x1 pixel for weighted average color - Integrated color extraction into both image upload endpoints (direct and from-url)
- Updated Zod schemas for items, candidates, and global items to accept new fields
- Generated Drizzle migration (db:push deferred — requires running database)
Commits
| Task | Commit | Description |
|---|---|---|
| 1 | cee1500 |
Install Sharp for image processing |
| 2 | 36363a8 |
Add dominantColor and crop fields to schema |
| 3 | b637b10 |
Generate migration for image presentation fields |
| 4 | e305fa7 |
Add dominant color extraction via Sharp |
| 5 | 2696b78 |
Extract dominant color in image upload endpoints |
| 6 | 3480473 |
Add image presentation fields to Zod schemas |
| 7 | — | No changes needed (storage service already spreads fields) |
Deviations
- Task 3 (db:push): Database not accessible in dev environment — migration generated but push deferred to deployment. This is non-blocking for frontend work.
Self-Check: PASSED
- Sharp installed: YES
- dominant_color in 3 tables: YES (grep confirms 3 occurrences)
- Zod schemas updated: YES (3 schemas)
- Upload returns dominantColor: YES
- Lint passes: YES