From c1177764efd9060c3122033aa35cfb94aabadc56 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Mon, 13 Apr 2026 13:42:20 +0200 Subject: [PATCH] docs(29-05): add execution summary --- .../29-image-presentation/29-05-SUMMARY.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .planning/phases/29-image-presentation/29-05-SUMMARY.md diff --git a/.planning/phases/29-image-presentation/29-05-SUMMARY.md b/.planning/phases/29-image-presentation/29-05-SUMMARY.md new file mode 100644 index 0000000..fe6dd50 --- /dev/null +++ b/.planning/phases/29-image-presentation/29-05-SUMMARY.md @@ -0,0 +1,34 @@ +--- +phase: 29-image-presentation +plan: 05 +status: complete +gap_closure: true +started: 2026-04-13T12:00:00Z +completed: 2026-04-13T12:10:00Z +--- + +## Summary + +Fixed cropped image preview not updating immediately in edit mode. Added `localCrop` state to `ImageUpload` that captures crop values from `ImageCropEditor` and passes them to `GearImage` as props. Previously, the preview only reflected crop settings after saving the form and refetching from the server. + +## Accomplishments + +- Added `localCrop` useState to ImageUpload for immediate crop feedback +- Wired ImageCropEditor onSave to set localCrop before forwarding to parent +- Passed localCrop values (cropZoom, cropX, cropY) to GearImage preview +- Clear localCrop on image removal to prevent stale state + +## Key Files + +### Modified +- `src/client/components/ImageUpload.tsx` — local crop state + GearImage prop wiring + +## Self-Check: PASSED + +- TypeScript compiles without errors (no new errors in ImageUpload.tsx) +- Local crop state correctly flows: ImageCropEditor → localCrop → GearImage props +- Image removal clears both preview and crop state + +## Deviations + +None — implemented exactly as planned.