Commit Graph

888 Commits

Author SHA1 Message Date
f4e93bf554 docs(34-08): complete German translation gap closure plan summary
- 58 missing German keys added across 5 de/*.json files
- 19/19 i18n parity tests pass
- 1 deviation: fixed JSON syntax error from smart quotes
2026-04-18 13:29:38 +02:00
23172f794f fix(34-08): add 58 missing German translations to 5 de/*.json locale files
- de/common.json: add home, imageUpload, profile sections (34 keys)
- de/settings.json: add currency.suggestion, currency.switch, showConversions (4 keys)
- de/threads.json: add card.candidates, card.candidates_one, planning section (11 keys)
- de/setups.json: add card.by, card.anonymous, impact.compareWith (3 keys)
- de/collection.json: add tabs.setups, totals, classificationBadge (6 keys)
- Fixed JSON syntax error: replaced smart quotes in dangerZoneDescription with single quotes
- All German text uses proper Unicode umlauts throughout
- bun test tests/i18n/locales.test.ts: 19 pass, 0 fail
2026-04-18 13:29:12 +02:00
e27c919430 docs(34-01): complete i18n foundation plan summary
- Install react-i18next, i18next, i18next-browser-languagedetector
- Create 6 English namespace JSON files from component string extraction
- Initialize i18n with LanguageDetector before React rendering
2026-04-18 13:28:35 +02:00
8634ca41c1 docs(34-08): gap closure plan for 58 missing German translations
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 13:22:25 +02:00
95c0ab4037 test(34): gap closure verification — 2 gaps found (missing German keys)
Some checks failed
CI / ci (push) Failing after 21s
CI / deploy (push) Has been skipped
CI / e2e (push) Has been skipped
2026-04-17 20:38:39 +02:00
6376cfcb8d docs(34): add code review report 2026-04-17 20:34:56 +02:00
3c973e8ec1 docs(34-07): complete German umlaut correction plan summary 2026-04-17 20:31:24 +02:00
1963faea84 fix(34-07): replace ASCII umlaut fallbacks with proper Unicode in all German locale files
- common.json: Löschen, Schließen, Zurück, Bestätigen, Änderungen, Überspringen, Gegenstände, etc.
- collection.json: Ausrüstung, Gegenstände, Zusätzliche, Hinzufügen
- threads.json: wählen, Kategorie, hinzufügen, Sammlung, hinzugefügt
- setups.json: Ausrüstung, Gegenstände, Öffentlich, Läuft, können, Zurückschalten
- onboarding.json: Ausrüstung, Gegenstände, wählen, fügen, überspringen, prüfen, Stöbern
- settings.json: Schlüssel, Währung, Wählen, Ändern, Gegenstände, Ausrüstung
2026-04-17 20:30:48 +02:00
4a23904c3f docs(34-06): complete i18n gap closure — routes and components plan summary 2026-04-17 20:27:39 +02:00
480abdd17f feat(34-06): wire useTranslation into 10 remaining components
- ThreadTabs: tab labels (gear, planning, setups) via collection namespace
- PlanningView: section title, tab labels, empty state steps, CTAs via threads namespace
- TotalsBar: 'Sign in' link via common.auth.signIn
- ThreadCard: resolved badge and candidate count (plural) via threads namespace
- PublicSetupCard: by/anonymous and item count (plural) via setups namespace
- SetupImpactSelector: compare dropdown placeholder via setups.impact.compareWith
- ClassificationBadge: base/worn/consumable labels via collection.classificationBadge
- ImpactDeltaBadge: add mode label via setups.impact.adding
- ImageUpload: click-to-add, error messages via common.imageUpload
- DashboardCard: skipped (renders props only, no hardcoded UI strings)
- Add card, planning keys to en/de threads.json
- Add classificationBadge, tabs, totals keys to en/de collection.json
- Add card.by, card.anonymous, impact.compareWith to en/de setups.json
- Add imageUpload keys to en/de common.json
- Build passes, all 19 i18n parity tests pass
2026-04-17 20:26:50 +02:00
755c0ab89f feat(34-06): wire useTranslation into routes and settings currency suggestion
- Add useTranslation to routes/index.tsx: home section headings use t()
- Add useTranslation to routes/profile.tsx: all profile/security/danger zone strings use t()
- Wire currency suggestion banner in settings.tsx with t() interpolation
- Wire showConversions section title/description in settings.tsx
- Add home and profile keys to en/common.json
- Add currency.suggestion, currency.switch, showConversions to en/settings.json
- Add corresponding German translations with proper umlauts to de/common.json and de/settings.json
2026-04-17 20:21:54 +02:00
b21ba0d97b docs(34): create gap closure plans for missing i18n wiring and German umlauts 2026-04-17 20:09:47 +02:00
459a4ed4b0 test(34): UAT complete — 6 passed, 1 issue (incomplete German translation coverage) 2026-04-17 20:05:31 +02:00
28dfef555c feat: wire currency conversion into price display
All checks were successful
CI / ci (push) Successful in 1m22s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 14s
useFormatters().price() now accepts an optional sourceCurrency param.
When showConversions is enabled and the source differs from the user's
currency, it converts via ECB rates and shows dual format:
"€200.00 (~$218.00)". ItemCard and CollectionView pass priceCurrency
through from API data. Setup detail items also pass priceCurrency.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 21:44:32 +02:00
c4ddc573d4 fix: price labels use user's selected currency instead of hardcoded $
All checks were successful
CI / ci (push) Successful in 1m21s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 15s
Replaced hardcoded "Price ($)" labels across 6 components and 2 locale
files to display the user's selected currency (EUR, GBP, USD, etc.).
AddToCollectionModal also updated to show correct currency.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 21:33:32 +02:00
23027551b4 fix: currency suggestion uses region detection, seed adds market prices
All checks were successful
CI / ci (push) Successful in 1m24s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 15s
- Currency auto-suggestion now uses locale region subtag (en-US → US → USD,
  en-DE → DE → EUR) instead of language prefix. Fixes wrong suggestion for
  users with English browser locale in European countries.
- Added dismiss button (X) to suggestion banner
- Dev seed script now clears existing dev data before re-seeding (safe to
  run repeatedly without manual DB cleanup)
- Added DEV_MARKET_PRICES with multi-market UVP data for 10 global items
  (EU/US/UK prices) and community prices for 5 owned items

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 21:27:57 +02:00
51c8703a3d fix: share modal UX improvements and creator name fallback
All checks were successful
CI / ci (push) Successful in 1m26s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 21s
- Share links section always visible (not just in link/public mode),
  supporting future write-access link shares on public setups
- Link list layout improved: URL and expiration stacked vertically,
  action buttons have hover backgrounds, trash icon replaces X
- Public setup cards show "by Anonymous" when creator has no display name

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 20:49:28 +02:00
4c80e9aa3c fix: allow unauthenticated access to /items/* with setup context
All checks were successful
CI / ci (push) Successful in 1m23s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 15s
Items accessed via ?setup= or ?share= query params are now treated as
public routes, preventing the auth redirect to /login.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 20:34:13 +02:00
4b26a6c88e feat: public item detail view for shared and public setups
All checks were successful
CI / ci (push) Successful in 1m23s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 15s
Items in shared/public setups are now viewable without auth. Clicking
an item in a shared setup navigates to /items/:id?setup=:setupId&share=token
which fetches the item via a public endpoint authorized by the setup's
visibility or share token. Read-only mode hides all owner controls.

- Added getSetupItemById service function
- Added GET /api/shared/:token/items/:itemId endpoint
- Added GET /api/setups/:setupId/items/:itemId/public endpoint
- Added usePublicSetupItem and useSharedSetupItem hooks
- Item detail page detects setup context and switches to public fetch
- Back link returns to setup instead of collection in setup context

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 20:17:54 +02:00
731d677da6 fix: shared setup items link to catalog instead of requiring auth
Items with a globalItemId now link to /global-items/:id (public) in
shared and public setup views. Items without a catalog link are not
clickable. Owner view behavior unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 20:10:02 +02:00
1fbd9bc609 fix: inject db context for /s/* short share URL route
All checks were successful
CI / ci (push) Successful in 1m22s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 15s
The /s/:token route was registered outside the /api/* db middleware
scope, causing db to be undefined and a 500 error on share link access.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 20:01:48 +02:00
e21e1ec523 fix: allow visibility-only setup updates without name
All checks were successful
CI / ci (push) Successful in 1m24s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 14s
updateSetupSchema required name as mandatory, causing ZodError when
ShareModal sent visibility-only updates. Made name optional in update
schema and guarded against setting undefined name in service layer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:43:10 +02:00
8d7a668da4 fix: resolve lint errors from phase 32/33/34 execution
All checks were successful
CI / ci (push) Successful in 1m23s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 1m20s
Auto-fixed formatting issues and removed unused imports introduced
by background execution agents across currency, i18n, and sharing code.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:32:32 +02:00
ceee6c0f13 docs(phase-34): complete i18n foundation phase execution
Some checks failed
CI / ci (push) Failing after 11s
CI / e2e (push) Has been skipped
CI / deploy (push) Has been skipped
2026-04-13 18:24:22 +02:00
5e731b436b feat(i18n): add German translations and key parity test
- Create all 6 German namespace JSON files (common, collection, threads, setups, onboarding, settings)
- Register German locale in i18n configuration with supportedLngs
- Add key parity test ensuring en/de have identical key structures
- All 19 locale parity tests pass, all 15 formatter tests pass

Phase 34, Plan 05
2026-04-13 18:23:45 +02:00
46715cc793 feat(i18n): add language picker to settings and sync i18n with persisted preference
- Add language picker (English/Deutsch) to settings page using pill-toggle pattern
- Import useLanguage hook and i18n instance in settings
- Language change persists via updateSetting and calls i18n.changeLanguage
- Add useEffect in RootLayout to sync i18n language with DB setting on load
- Language labels use native names (English, Deutsch) for identification

Phase 34, Plan 04
2026-04-13 18:21:30 +02:00
f759dd0fde feat(i18n): locale-aware formatters and useLanguage hook
- Create useLanguage() hook following useCurrency/useWeightUnit pattern
- Update formatPrice() to use Intl.NumberFormat for locale-aware currency display
- Update formatWeight() to use Intl.NumberFormat for locale-aware number formatting
- Update formatDualPrice() to pass locale through
- Update useFormatters() to pass locale to all formatters
- Add formatter tests for en/de locales (15 tests passing)

Phase 34, Plan 03
2026-04-13 18:20:23 +02:00
672b17fd13 feat(i18n): extract strings from navigation, dialogs, onboarding, settings, and login
- Add useTranslation() to TopNav, BottomTabBar, FabMenu, UserMenu
- Internationalize ConfirmDialog, AuthPromptModal, ExternalLinkDialog
- Extract all onboarding flow strings (Welcome, HobbyPicker, ItemBrowser, Review, Done)
- Internationalize settings page (weight unit, currency, API keys, import/export)
- Internationalize login page and root error boundary
- All dialogs in __root.tsx use t() for UI chrome

Phase 34, Plan 02 (core navigation and global UI)
2026-04-13 18:19:29 +02:00
8c0fb31df2 feat(i18n): install react-i18next, create English locale files, and initialize i18n framework
- Install i18next, react-i18next, i18next-browser-languagedetector
- Create 6 namespace JSON files (common, collection, threads, setups, onboarding, settings)
- Initialize i18n with language detection (localStorage + navigator)
- Wire i18n import in main.tsx before React rendering

Phase 34, Plan 01
2026-04-13 18:13:55 +02:00
de82eefa74 docs(phase-33): complete phase execution
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:10:47 +02:00
24304aa8aa docs(34): create phase plans for i18n foundation 2026-04-13 18:10:36 +02:00
e2127ebb84 docs(33): add summaries for plans 05 and 06 (wave 3 complete)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:10:24 +02:00
37edd0edfd feat(33-06): add market prices section to catalog detail page
- Add useGlobalItemPrices and useGlobalItemCommunityStats hooks
- Add MarketPricesSection component with user's market MSRP prominent
- Show community price stats per market with median and report count
- Collapsible "Other Markets" section (collapsed by default)
- Import useCurrency, useExchangeRates, formatPrice for market display

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:09:56 +02:00
02fcae12f0 feat(33-05): market/currency selector, dual price format, conversion toggle
- Add formatDualPrice() with ~prefix for approximate conversions (D-14)
- Evolve useCurrency() to return CurrencyContext with currency, market, showConversions
- Create useExchangeRates hook + convertClientPrice utility
- Redesign settings: Market & Currency selector, Show Converted Prices toggle
- Add locale-based auto-suggestion banner for first-time currency selection (D-13)
- Update useFormatters to destructure from new CurrencyContext

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:08:53 +02:00
d0bbf48bb5 docs(33): add summaries for plans 03 and 04 (wave 2 complete)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:07:16 +02:00
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