3 Commits

Author SHA1 Message Date
ddb76fd229 fix: destructure useLogout correctly in UserMenu
All checks were successful
CI / ci (push) Successful in 1m13s
CI / e2e (push) Has been skipped
CI / deploy (push) Successful in 14s
useLogout() returns { logout } but was assigned directly, causing
"r is not a function" when clicking sign out.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 21:47:55 +02:00
84205563a7 test(29): complete UAT - 2 passed, 4 issues 2026-04-12 21:41:24 +02:00
094301cc92 test(28): complete UAT - 4 passed, 1 issue, 3 blocked 2026-04-12 21:30:53 +02:00
3 changed files with 192 additions and 1 deletions

View File

@@ -0,0 +1,76 @@
---
status: partial
phase: 28-profile-and-logto-integration
source: [28-01-SUMMARY.md, 28-02-SUMMARY.md, 28-03-SUMMARY.md]
started: 2026-04-12T18:30:00Z
updated: 2026-04-12T19:00:00Z
---
## Current Test
[testing complete]
## Tests
### 1. Profile page navigation
expected: Click your avatar in the top nav. The dropdown shows "Profile" above "Settings". Clicking it navigates to /profile.
result: pass
### 2. Profile page sections
expected: /profile page shows four sections: Profile Info (displayName, bio, avatar), Account Info (email, member-since date), Security (password change), and Danger Zone (delete account).
result: pass
### 3. Settings page separation
expected: /settings page shows only app preferences: weight unit, currency, import/export, API keys. No profile section.
result: pass
### 4. Edit display name and bio
expected: On /profile, change display name and bio, click Save. Success message appears. Refreshing the page shows the updated values.
result: issue
reported: "Save works for name/bio after Zod null fix, but avatar upload doesn't persist after save. Also needs: crop editor for avatar, larger profile pic with name/bio side-by-side layout, click-to-open modal with full-size image + Remove/Update buttons."
severity: major
### 5. Email display
expected: Account Info section shows your email address (from Logto) and a "Change" button next to it.
result: blocked
blocked_by: third-party
reason: "Logto Management API returns 500 — M2M env vars (LOGTO_MANAGEMENT_API_ENDPOINT, LOGTO_M2M_APP_ID, LOGTO_M2M_APP_SECRET) not configured on test env"
### 6. Password change form
expected: Security section shows a password change form. If you signed in with email+password: current password, new password, confirm new password fields. If social login only: just new password + confirm fields.
result: blocked
blocked_by: third-party
reason: "Logto Management API returns 500 — M2M env vars not configured on test env"
### 7. Delete account UI
expected: Danger Zone shows a red-bordered card with "Delete Account" button. Clicking it shows a confirmation dialog requiring you to type "DELETE" before proceeding.
result: blocked
blocked_by: third-party
reason: "Logto Management API returns 500 — M2M env vars not configured on test env"
### 8. Member-since date
expected: Account Info section shows a "Member since" date formatted nicely (e.g., "April 2026").
result: pass
## Summary
total: 8
passed: 4
issues: 1
pending: 0
skipped: 0
blocked: 3
## Gaps
- truth: "Avatar upload should persist after save. Profile pic should have crop editor, larger display with side-by-side layout, and click-to-open modal."
status: failed
reason: "User reported: avatar upload doesn't persist. Also needs crop editor, layout redesign (larger pic, name/bio beside it), click-to-open modal with Remove/Update."
severity: major
test: 4
artifacts:
- src/client/components/ProfileSection.tsx
missing:
- Avatar save persistence fix
- Crop editor integration for avatar
- Profile layout redesign (larger pic, side-by-side, modal)

View File

@@ -0,0 +1,115 @@
---
status: complete
phase: 29-image-presentation
source: [29-01-SUMMARY.md, 29-02-SUMMARY.md, 29-03-SUMMARY.md, 29-04-SUMMARY.md]
started: 2026-04-12T19:10:00Z
updated: 2026-04-12T19:20:00Z
---
## Current Test
[testing complete]
## Tests
### 1. Images use fit-within instead of crop
expected: Browse any page with item/catalog cards. Images should fit inside the frame without cropping — full image visible, no parts cut off.
result: issue
reported: "Fit-within works on detail pages but collection view cards don't render images at all."
severity: major
### 2. Dominant color background fill
expected: Where an image doesn't fill the entire frame, the empty space is filled with a color extracted from the image (not white or gray).
result: issue
reported: "Background is just plain gray. Even newly uploaded images don't get a dominant color — extraction not working or color not passed to frontend."
severity: major
### 3. Crop editor on item detail
expected: Open an item that has an image. You should see an "Adjust framing" button. Clicking it opens a crop editor with zoom slider.
result: issue
reported: "'Adjust framing' text doesn't feel like an action. Should be an icon button, only visible in edit mode, positioned below the X icon. X icon should be a trash icon to symbolize removal."
severity: minor
### 4. Crop editor on image upload
expected: Upload a new image to an item. After the upload completes, a crop editor should appear.
result: issue
reported: "Crop editor doesn't open when adding an image to an existing item. Can only be edited afterward."
severity: major
### 5. Crop settings persist
expected: Adjust the crop on an item image, save it. Navigate away and come back — image displays with saved crop settings.
result: issue
reported: "Framing adjustment doesn't save. No error message, no console log — silently fails."
severity: blocker
### 6. Consistency across surfaces
expected: All image surfaces use the same fit-within + dominant color treatment.
result: pass
reported: "Consistent across all surfaces where images render (detail pages). Collection cards don't render images (see test 1)."
## Summary
total: 6
passed: 2
issues: 4
pending: 0
skipped: 0
## Gaps
- truth: "Collection view cards should render images using GearImage component"
status: failed
reason: "User reported: images not rendering on collection view cards, only on detail pages"
severity: major
test: 1
artifacts:
- src/client/components/ItemCard.tsx
- src/client/components/GearImage.tsx
missing:
- GearImage integration in collection card view
- truth: "Dominant color should be extracted on upload and used as background fill"
status: failed
reason: "User reported: background is plain gray even for newly uploaded images — extraction not working or color not reaching frontend"
severity: major
test: 2
artifacts:
- src/server/services/image.service.ts
- src/client/components/GearImage.tsx
missing:
- Debug extractDominantColor pipeline
- Verify color is returned from upload API and stored in DB
- Verify frontend reads and applies dominantColor
- truth: "Crop editor should be an icon button visible only in edit mode, with trash icon for image removal"
status: failed
reason: "User reported: 'Adjust framing' text doesn't feel like an action. Should be icon, edit-mode only. X should be trash icon."
severity: minor
test: 3
artifacts:
- src/client/routes/items/$itemId.tsx
- src/client/components/ImageCropEditor.tsx
missing:
- Redesign crop trigger as icon button in edit mode
- Replace X with trash icon for image removal
- truth: "Crop editor should open automatically when uploading a new image"
status: failed
reason: "User reported: crop editor doesn't open when adding image to existing item"
severity: major
test: 4
artifacts:
- src/client/components/ImageUpload.tsx
missing:
- Trigger crop editor after upload in ImageUpload component
- truth: "Crop settings (zoom, x, y) should persist to DB and render on subsequent views"
status: failed
reason: "User reported: framing adjustment doesn't save, no error, no log — silent failure"
severity: blocker
test: 5
artifacts:
- src/client/routes/items/$itemId.tsx
- src/server/routes/items.ts
missing:
- Debug crop save pipeline (client mutation → API → DB)

View File

@@ -6,7 +6,7 @@ import { LucideIcon } from "../lib/iconData";
export function UserMenu() {
const [open, setOpen] = useState(false);
const menuRef = useRef<HTMLDivElement>(null);
const logout = useLogout();
const { logout } = useLogout();
useEffect(() => {
if (!open) return;