Commit Graph

903 Commits

Author SHA1 Message Date
3df9eece83 feat(33-04): add community price service, API routes, and setup currency metadata
- Create community-price.service.ts with ownership validation, upsert, median aggregation
- Create community-prices route (GET stats public, POST requires auth + ownership)
- Register community-prices route with public GET access
- Add priceCurrency to both getSetupWithItems and getSetupWithItemsById
- Aggregation uses PERCENTILE_CONT(0.5) with 3-report minimum threshold

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:06:48 +02:00
7d6c548811 docs: add phase 32 decisions to STATE.md
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:05:54 +02:00
52dce7b72b feat(33-03): add market prices API, exchange rates endpoint, currency context
- Create market-price.service.ts with getMarketPrices, upsertMarketPrice
- Create exchange-rates route (GET /api/exchange-rates, public)
- Create market-prices route (GET/POST /api/market-prices/global-items/:id/prices)
- Register new routes in server index with public GET access
- Add priceCurrency to item service getAllItems/getItemById/createItem
- Add foundPriceCents/Currency/Date to thread candidate select and create/update

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:05:24 +02:00
7eb5335a88 docs: add phase 32 plan summaries
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:05:24 +02:00
0b46eff243 feat: add shared setup viewer with token detection and read-only mode
Detect ?share=token query param on setup detail page, fetch via
/api/shared/:token, and display read-only view with "Shared setup"
banner. Hide all owner controls (add items, share, delete, classification)
in shared view. Show "Link not available" error for invalid tokens.

Plan: 32-04 (Setup Sharing System - Shared Setup Viewer)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:04:41 +02:00
a531581623 docs(34): add research and validation strategy 2026-04-13 18:03:57 +02:00
f8ab69684a docs(33): add summaries for plans 01 and 02 (wave 1 complete)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:02:57 +02:00
7003e998f9 feat: add share modal with visibility picker and link management
Create ShareModal component with three-tier visibility picker
(private/link/public), share link creation with configurable expiration,
clipboard copy, and link revocation. Wire into setup detail page
replacing the static visibility badge with an interactive share button.

Plan: 32-03 (Setup Sharing System - Share Modal UI)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:02:41 +02:00
e10f0eda3d feat(33-02): generate migration for market_prices, community_prices tables
- CREATE TABLE market_prices with unique(global_item_id, market, currency)
- CREATE TABLE community_prices with unique(global_item_id, user_id, source_type)
- ALTER TABLE items ADD COLUMN price_currency
- ALTER TABLE thread_candidates ADD COLUMN found_price_cents, found_price_currency, found_price_date
- Note: db:push requires running PostgreSQL — apply on deployment

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:02:40 +02:00
50bc11c7ed feat(33-01): add currency conversion service with exchange rate caching
- Create currency.service.ts with frankfurter.app ECB rate fetching
- 24h in-memory cache with stale-serve fallback on fetch failure
- convertPrice() handles EUR-base cross-currency conversion
- CURRENCY_MARKET_MAP maps currencies to market regions
- 12 unit tests covering conversion, rounding, unknowns, and mapping

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:02:06 +02:00
298fa6d586 feat(33-01): add market_prices, community_prices tables and currency columns
- Add marketPrices table with unique(globalItemId, market, currency) constraint
- Add communityPrices table with unique(globalItemId, userId, sourceType) constraint
- Add priceCurrency column to items table (default EUR)
- Add foundPriceCents, foundPriceCurrency, foundPriceDate to threadCandidates
- Add Zod schemas for market price upsert and community price submission
- Export new types from shared/types.ts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:02:00 +02:00
1d15d4b336 docs(state): record phase 34 context session 2026-04-13 18:00:10 +02:00
1992778ce6 docs(34): capture phase context 2026-04-13 18:00:10 +02:00
da159d10b8 feat: add share link service, API routes, and short URL redirect
Create share.service.ts with token generation (128-bit base64url),
CRUD operations, validation, and visibility transition side effects.
Add share endpoints under /api/setups/:id/shares, shared access at
/api/shared/:token, and /s/:token short URL redirect.

Plan: 32-02 (Setup Sharing System - Share Link Backend)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 17:59:39 +02:00
7a696f39a5 docs(33): create phase plans for currency system
6 plans across 3 waves covering market-aware pricing, exchange rates,
community price data, and currency-normalized display.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 17:58:37 +02:00
edc9793c2d feat: migrate setup visibility from boolean to three-tier system
Replace isPublic boolean with visibility enum (private/link/public) across
the full stack. Add shares table to schema for future share link support.
Update all services, routes, schemas, hooks, components, and tests.

Plan: 32-01 (Setup Sharing System - Schema Migration)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 17:55:46 +02:00
727abf1528 docs(33): add research, validation strategy, and UI design contract
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 17:52:18 +02:00
d928634e57 docs(state): record phase 33 context session 2026-04-13 17:45:50 +02:00
634ac298d1 docs(33): capture phase context 2026-04-13 17:45:45 +02:00
338a78122d docs(32): fix wave assignment — Plan 04 bumped to wave 4
Plans 03 and 04 both modify setups/$setupId.tsx. Per wave assignment
rules, file overlap requires sequential execution. Plan 04 now depends
on Plan 03 and runs in Wave 4.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 17:06:39 +02:00
81a654085d docs(32): create phase plans for setup sharing system
4 plans in 3 waves:
- Wave 1: Schema migration (isPublic→visibility) + shares table
- Wave 2: Share link service + API routes
- Wave 3: Share modal UI + shared setup viewer

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 17:05:36 +02:00
9965e356de docs(32): add research and validation strategy for setup sharing system
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 16:59:54 +02:00
cb0c1e8c9a docs(32): UI design contract 2026-04-13 16:59:25 +02:00
49c59fded9 docs(state): record phase 32 context session 2026-04-13 16:51:32 +02:00
6833b90795 docs(32): capture phase context 2026-04-13 16:51:23 +02:00
2853477a75 chore: archive v2.2 User Experience Polish milestone
All checks were successful
CI / ci (push) Successful in 1m15s
CI / e2e (push) Has been skipped
CI / deploy (push) Has been skipped
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>
v2.2
2026-04-13 16:00:35 +02:00
92b84d2cd6 docs: capture todo - Auth prompt sign-in should redirect directly to Logto 2026-04-13 15:53:07 +02:00
ebf031a62c fix: cap onboarding to 5 categories with 4 items each
All checks were successful
CI / ci (push) Successful in 1m15s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 14s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 15:23:10 +02:00
03e0fe99fa feat: group onboarding items by category
All checks were successful
CI / ci (push) Successful in 1m17s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 14s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 15:19:02 +02:00
adbc13eb15 fix: SelectableItemCard used wrong formatter names, globalItems imageFilename→imageUrl
All checks were successful
CI / ci (push) Successful in 1m12s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 14s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 15:13:23 +02:00
2beabe88f9 fix: popular-items query referenced non-existent imageFilename on globalItems
All checks were successful
CI / ci (push) Successful in 1m17s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 16s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 15:07:38 +02:00
29f925027c chore: one-liner fixing script for docker exec
All checks were successful
CI / ci (push) Successful in 1m15s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 15s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 14:58:19 +02:00
32fa261ec2 chore: diagnostic and fix script for catalog seeding
Some checks failed
CI / deploy (push) Has been cancelled
CI / e2e (push) Has been cancelled
CI / ci (push) Has been cancelled
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 14:57:27 +02:00
9864a09fc1 chore: shell script for nuke-and-reseed (runs inside container)
All checks were successful
CI / ci (push) Successful in 1m16s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 14s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 14:20:03 +02:00
c3874d031a chore: temp script to nuke dev seed user
All checks were successful
CI / ci (push) Successful in 1m13s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 14s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 14:15:54 +02:00
cd55f3c282 fix: seedTags inserts missing tags instead of skipping when any exist
All checks were successful
CI / ci (push) Successful in 1m15s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 15s
2026-04-13 14:09:28 +02:00
80f4d1d9ae fix: lint formatting for seed data and item detail page
All checks were successful
CI / ci (push) Successful in 1m14s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 17s
2026-04-13 14:03:25 +02:00
ba13fa8ded docs: update roadmap, config, and UAT state
Some checks failed
CI / ci (push) Failing after 20s
CI / deploy (push) Has been skipped
CI / e2e (push) Has been skipped
2026-04-13 13:56:56 +02:00
13883ea14d fix: add hobby tags to catalog seed data for onboarding discovery 2026-04-13 13:48:40 +02:00
bedef04581 test(30): re-test UAT - 3 passed, 1 cosmetic, 3 blocked (catalog seed) 2026-04-13 13:45:47 +02:00
c1177764ef docs(29-05): add execution summary 2026-04-13 13:42:20 +02:00
ded6bf521e fix(29-05): add local crop state to ImageUpload for immediate preview 2026-04-13 13:42:06 +02:00
d91d32deaf docs: capture todo - Fix Add Candidate button shows wrong modal on thread page 2026-04-13 13:39:58 +02:00
c98ac6e46f docs(29): create gap closure plan for crop preview state 2026-04-13 13:37:57 +02:00
e536f68bd1 docs(29): diagnose crop preview gap - ImageUpload missing local crop state 2026-04-13 13:36:50 +02:00
80cb313b08 test(29): re-test UAT - 4 passed, 2 issues (crop conflicts) 2026-04-13 13:34:00 +02:00
159ff824b2 fix: position crop button as overlay next to trash icon on image
All checks were successful
CI / ci (push) Successful in 1m11s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 13s
Moved the crop button from below the image into the ImageUpload
component as an absolute-positioned overlay next to the trash icon,
matching the visual pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 23:49:10 +02:00
09952e37b4 fix: move crop button into edit mode so it's reachable
All checks were successful
CI / ci (push) Successful in 1m12s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 14s
The crop icon button was in the view-mode branch but conditioned on
isEditing, making it unreachable. Moved it below ImageUpload in the
edit-mode branch where it belongs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 23:44:56 +02:00
fe5bd49b75 fix: save dominant color from image upload to item record
All checks were successful
CI / ci (push) Successful in 1m12s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 13s
ImageUpload was discarding the dominantColor returned by the upload
API. Now it passes the color through onChange and the item detail
page saves it to the item record immediately after upload.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 23:39:13 +02:00
ef531f79b2 fix: update email display in UI after email change
All checks were successful
CI / ci (push) Successful in 1m11s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 14s
The OIDC session token retains the old email after a Logto email
change. Now the server returns the new email in the response and
the frontend optimistically updates the auth cache.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 23:31:24 +02:00