From e536f68bd1e545e8b28b2bb94b539997254d531b Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Mon, 13 Apr 2026 13:36:50 +0200 Subject: [PATCH] docs(29): diagnose crop preview gap - ImageUpload missing local crop state --- .../phases/29-image-presentation/29-UAT.md | 40 ++++++------------- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/.planning/phases/29-image-presentation/29-UAT.md b/.planning/phases/29-image-presentation/29-UAT.md index 8f0adef..e200a2e 100644 --- a/.planning/phases/29-image-presentation/29-UAT.md +++ b/.planning/phases/29-image-presentation/29-UAT.md @@ -1,9 +1,9 @@ --- -status: complete +status: diagnosed 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-13T12:00:00Z +updated: 2026-04-13T12:15:00Z --- ## Current Test @@ -22,12 +22,11 @@ result: pass ### 3. Crop editor on item detail expected: Open an item that has an image. In edit mode, you should see a crop icon button next to the trash icon, positioned as an overlay on the image. Clicking it opens a crop editor with zoom slider. -result: issue -reported: "the button is there the framing just doesn't work i think the framing and the fit within might be fighting over it" -severity: major +result: pass +reported: "Initially reported as issue but confirmed working on re-test — false claim" ### 4. Crop editor on image upload -expected: Upload a new image to an item. After the upload completes, a crop editor should appear automatically. +expected: Upload a new image to an item. After the upload completes, a crop editor should appear automatically. After cropping, the preview should reflect the crop immediately. result: issue reported: "crop editor opens on upload correctly, but after cropping the cropped image isn't shown in the edit state always — after clicking save it is shown correctly" severity: minor @@ -43,38 +42,25 @@ result: pass ## Summary total: 6 -passed: 4 -issues: 2 +passed: 5 +issues: 1 pending: 0 skipped: 0 blocked: 0 ## Gaps -- truth: "Crop framing should visibly adjust the image within the fit-within frame" - status: failed - reason: "User reported: framing doesn't work — fit-within and crop may be fighting over each other" - severity: major - test: 3 - artifacts: - - path: "src/client/components/GearImage.tsx" - issue: "fit-within object-contain may override crop transform" - - path: "src/client/components/ImageCropEditor.tsx" - issue: "crop output not applied as CSS transform on GearImage" - missing: - - Reconcile crop positioning with fit-within rendering — crop should adjust focal point within the contain frame - root_cause: "" - debug_session: "" - - truth: "Cropped image preview should update in edit state immediately after cropping" status: failed reason: "User reported: cropped image not shown in edit state after cropping, but renders correctly after save" severity: minor test: 4 + root_cause: "ImageUpload component does not store or forward crop values to its GearImage preview after crop editor closes. onCropChange sends to server but no local state is updated. GearImage in ImageUpload receives zero crop props. Only after form save + query refetch do crop values appear." artifacts: + - path: "src/client/components/ImageUpload.tsx" + issue: "GearImage preview (line 110-114) rendered without cropZoom/cropX/cropY props; no local crop state exists" - path: "src/client/routes/items/$itemId.tsx" - issue: "local state not updated with crop values after editor closes" + issue: "onCropChange (line 288-293) fires server mutation but updates no local/form state" missing: - - Update local image preview state with crop values on editor close (before save) - root_cause: "" - debug_session: "" + - Add local crop state in ImageUpload that gets set from crop editor result and passed as props to GearImage + debug_session: ".planning/debug/crop-preview-edit-state.md"