Commit Graph

871 Commits

Author SHA1 Message Date
3c79b7eb9a docs(state): record phase 37 planning complete
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 21:28:52 +02:00
eabfca475c docs(37): write wave plan files for admin global item management
Plans 37-01 (server: services + admin-items routes) and 37-02 (client:
hooks, list page, edit page, sidebar) with full acceptance criteria and
read_first blocks per phase context, research, and UI-SPEC artifacts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 21:28:46 +02:00
2f2fc1e681 docs(37): add research, validation strategy, and UI design contract
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 21:04:03 +02:00
298da6da85 docs(37): capture phase context 2026-04-19 20:57:32 +02:00
868aed4f10 docs(36): add code review report 2026-04-19 20:50:57 +02:00
70a3e159ba docs(phase-36): update ROADMAP and STATE after wave execution 2026-04-19 20:49:56 +02:00
8e76fe35dc docs(36-02): create SUMMARY.md for plan 36-02 completion 2026-04-19 20:49:40 +02:00
72473bc5c5 chore(36-02): regenerate routeTree.gen.ts with /admin and /admin/ routes 2026-04-19 20:49:19 +02:00
8f62edc91d feat(36-02): add conditional Admin link to UserMenu for admin users 2026-04-19 20:49:03 +02:00
7a3dca768a feat(36-02): add /admin layout route and placeholder index
- admin.tsx: createFileRoute('/admin') with sidebar shell (Items, Tags disabled with Soon badge)
- admin/index.tsx: createFileRoute('/admin/') placeholder with shield icon
- useEffect guard redirects non-admin users to /
2026-04-19 20:48:53 +02:00
080838ecb5 feat(36-02): add isAdmin to AuthState interface in useAuth.ts 2026-04-19 20:48:30 +02:00
488fdbb568 docs(36-01): create SUMMARY.md for plan 36-01 completion 2026-04-19 20:48:14 +02:00
d3c5a8945b feat(36-01): add scripts/grant-admin.ts for granting/revoking admin status 2026-04-19 20:47:49 +02:00
48381105b5 feat(36-01): add /api/admin placeholder route with requireAuth + requireAdmin middleware 2026-04-19 20:47:36 +02:00
18883fb9f0 feat(36-01): surface isAdmin in /api/auth/me response 2026-04-19 20:47:12 +02:00
34c7d27ee5 feat(36-01): add requireAdmin middleware to auth.ts
- Import eq from drizzle-orm and users from schema
- Export requireAdmin(c, next) that returns 401 if userId not in context, 403 if user.isAdmin is falsy
2026-04-19 20:47:06 +02:00
23cdb25063 feat(36-01): add isAdmin column to users table schema and generate migration
- Add isAdmin boolean(is_admin) NOT NULL DEFAULT false to users table
- Generate migration 0009_spotty_lord_tyger.sql
- NOTE: db:push requires DATABASE_URL with correct credentials to apply
2026-04-19 20:46:51 +02:00
94e2a8c019 plan(36): admin role & panel foundation — 2 plans ready
- 36-RESEARCH.md: schema migration, requireAdmin middleware, /api/auth/me
  surface, client routing patterns, grant script, wave breakdown
- 36-UI-SPEC.md: admin shell layout, sidebar disabled nav items, UserMenu
  admin link, palette and responsive notes
- 36-01-PLAN.md (wave 1): isAdmin schema column + Drizzle migration,
  requireAdmin middleware, /api/auth/me isAdmin field, /api/admin placeholder
  route, scripts/grant-admin.ts
- 36-02-PLAN.md (wave 2): AuthState isAdmin type, /admin client route with
  sidebar shell, admin/index.tsx placeholder, UserMenu admin link
- STATE.md: updated to Phase 36, ready to execute, 2 plans

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 20:43:12 +02:00
e8cdeafba2 docs(state): record phase 36 context session .planning/STATE.md 2026-04-19 20:34:26 +02:00
38c0382f64 docs(36): capture phase context .planning/phases/36-admin-role-panel-foundation/36-CONTEXT.md .planning/phases/36-admin-role-panel-foundation/36-DISCUSSION-LOG.md 2026-04-19 20:34:10 +02:00
8f4bb5096d docs(35): add code review fix report 2026-04-19 20:15:00 +02:00
7e684176ab fix(35): WR-04 use startsWith/slice for brand-stripping to avoid mid-string matches
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 20:14:28 +02:00
93c273d266 fix(35): WR-03 add onError to GearImage to dismiss skeleton on broken images
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 20:14:07 +02:00
65f25e5964 fix(35): WR-02 close FAB menu before opening catalog search overlay
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 20:13:33 +02:00
b984e8c72f docs(35): add code review report 2026-04-19 19:55:17 +02:00
9d41400faa docs(35-03): complete cursor-pointer audit plan
- Add 35-03-SUMMARY.md with task commits, deviations, and verification results
- Update STATE.md: plan 3/3 complete, progress 100%, FIX-05 decision recorded
- Update ROADMAP.md: phase 35 marked Complete (3/3 plans)
- Update REQUIREMENTS.md: FIX-05 marked complete
2026-04-19 19:52:41 +02:00
d58f7fab40 fix(35-03): add cursor-pointer to FabMenu and BottomTabBar buttons
- Add cursor-pointer to FabMenu menu item buttons (motion.button)
- Add cursor-pointer to FabMenu main FAB button (motion.button)
- Add cursor-pointer to BottomTabBar anonymous collection tab button
- Add cursor-pointer to BottomTabBar anonymous setups tab button
- Add cursor-pointer to BottomTabBar search tab button
2026-04-19 19:50:38 +02:00
e1d516cfe8 fix(35-03): add cursor-pointer to ItemCard navigable case
- Add cursor-pointer to the non-null linkTo branch of the outer button
- Preserve cursor-default for the null linkTo branch (setup cards)
2026-04-19 19:49:44 +02:00
2d45b9024d docs(35-02): complete image lazy loading and skeleton plan
- SUMMARY.md created for 35-02 (FIX-03)
- STATE.md advanced to plan 2 of 3 complete, added 35-02 decisions
- ROADMAP.md updated (2 of 3 summaries)
- REQUIREMENTS.md marked FIX-03 complete
2026-04-19 19:49:04 +02:00
88db308a16 feat(35-02): add image skeleton loading states to all card types
- Add useState(false) loaded state to ItemCard, CandidateCard, GlobalItemCard
- Show bg-gray-100 animate-pulse skeleton overlay while image loads
- Fade in image via transition-opacity duration-200 on onLoad callback
- No-image placeholders (icon on bg-gray-50) unchanged
- Add import { useState } from react to all three files with correct Biome import order
2026-04-19 19:47:11 +02:00
2d2259a0db feat(35-02): add loading=lazy and onLoad prop to GearImage
- Add optional onLoad prop to GearImageProps interface
- Destructure onLoad in function signature
- Forward loading="lazy" and onLoad to all three img render paths (cover, hasCrop, default)
2026-04-19 19:45:01 +02:00
58d6b47c6f docs(35-01): complete plan 01 — type/wiring fixes (FIX-01, FIX-02, FIX-04)
- SUMMARY.md: 3 tasks, all passing, 464 tests green
- STATE.md: plan 1/3 complete, decisions recorded
- ROADMAP.md: phase 35 progress updated (1 of 3 summaries)
- REQUIREMENTS.md: FIX-01, FIX-02, FIX-04 marked complete
2026-04-19 19:44:05 +02:00
053d56236f fix(35-01): replace login page card UI with immediate useEffect redirect (FIX-04)
- Remove auth check, useNavigate, useTranslation, and full card UI
- LoginPage now renders only "Signing in..." and immediately navigates to server /login
- Server /login route handles Logto OIDC redirect; no client-side logic needed
2026-04-19 19:41:57 +02:00
b43a932217 fix(35-01): extend ItemWithCategory with image and currency fields (FIX-02)
- Add imageUrl, dominantColor, cropZoom, cropX, cropY, priceCurrency to interface
- Server already returns these fields via withImageUrls(); type was just incomplete
2026-04-19 19:41:44 +02:00
7fca92985a fix(35-01): wire Add Candidate button to CatalogSearchOverlay, delete AddCandidateModal
- Replace setAddCandidateOpen(true) with openCatalogSearch("thread") + setCatalogSessionThreadId
- Remove addCandidateOpen useState
- Delete entire AddCandidateModal component (~300 lines of dead code)
- Remove imports only used by the deleted modal: useCreateCandidate, useCurrency, ImageUpload, CategoryPicker
2026-04-19 19:41:33 +02:00
44392e8583 docs(35): create phase 35 bug-fix plans (3 plans, wave 1 parallel)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 19:35:31 +02:00
d216c80892 docs(35): fix UI-SPEC typography and spacing checker violations
Collapse font weights from 3 to 2 (remove 500/medium, map Label to 600/semibold).
Remove non-multiple-of-4 Tailwind class references from spacing Usage column.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 19:24:57 +02:00
805b306516 docs(35): UI design contract for bug-fixes phase
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 19:22:56 +02:00
8202a0088b docs(state): record phase 35 context session 2026-04-19 19:13:04 +02:00
8220cf84ab docs(35): capture phase context 2026-04-19 19:12:37 +02:00
2ebf3a37e8 docs: create milestone v2.4 roadmap (4 phases)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 18:43:48 +02:00
4548780e5f docs: start milestone v2.4 Admin Foundation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 18:40:49 +02:00
13c48731ea chore: remove REQUIREMENTS.md for v2.3 milestone
Fresh requirements file will be created with /gsd-new-milestone.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 17:05:24 +02:00
1733fe8cfb chore: archive v2.3 milestone files
Archive setup sharing, currency system, and i18n foundation milestone.
Reorganize ROADMAP.md with v2.3 details block, update PROJECT.md,
MILESTONES.md, STATE.md deferred items, and RETROSPECTIVE.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 17:05:21 +02:00
beaea46e92 fix: use CategoryPicker in AddToThreadModal new-thread create mode
Replaces plain <select> with CategoryPicker for consistency with
ManualEntryForm, CreateThreadModal, and other thread creation flows.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 17:00:03 +02:00
9649ef2514 fix: close PGlite handle after tests to resolve exit code 100
All checks were successful
CI / ci (push) Successful in 1m40s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 58s
PGlite's WASM worker kept an open async handle, causing Bun to detect
a resource leak and exit with code 100 despite all tests passing.
Adds a preload script that closes the cached client via afterAll.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 16:43:11 +02:00
5f63e6f75d fix: resolve Bun mock isolation contamination across test files
Some checks failed
CI / ci (push) Failing after 1m35s
CI / e2e (push) Has been skipped
CI / deploy (push) Has been skipped
- storage.service.ts: use dynamic import() inside each function so the
  current @aws-sdk mock is always picked up regardless of module load order
- images.test.ts + image.service.test.ts: replace module-level storage.service
  mock with @aws-sdk/client-s3 mock to avoid contaminating storage.service.test.ts
- routes/auth.test.ts: remove unnecessary oauth.service mock (no test uses
  verifyAccessToken) which was contaminating oauth.service.test.ts
- middleware/auth.test.ts: complete oauth.service mock shape with all exports

All 464 tests now pass in a single bun test run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 16:19:39 +02:00
4ccbb2b070 fix: wire catalog add buttons, fix Trans bold rendering, lint cleanup
Some checks failed
CI / ci (push) Failing after 1m44s
CI / e2e (push) Has been skipped
CI / deploy (push) Has been skipped
- CatalogSearchOverlay: replace handleAddStub with real openAddToCollection/openAddToThread routing based on catalogSearchMode
- ConfirmDialog + __root.tsx: swap t() for Trans component on deleteItemMessage, deleteCandidateMessage, pickWinnerMessage — fixes <bold> rendering as literal text
- Biome format pass: fix 23 lint/format errors across scripts, services, tests
- Planning: mark all UAT and verification gaps resolved for phases 07, 11, 16, 20, 21, 22, 24, 32, 34; close debug sessions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 15:36:16 +02:00
16058d0f4d chore: update bun.lock for @anthropic-ai/sdk
Some checks failed
CI / ci (push) Failing after 15s
CI / e2e (push) Has been skipped
CI / deploy (push) Has been skipped
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 16:49:33 +02:00
065b262b5b chore: add db:crawl and db:crawl-all npm scripts 2026-04-18 16:45:54 +02:00