Files
GearBox/.planning/milestones/v2.2-phases/29-image-presentation/29-05-SUMMARY.md
Jean-Luc Makiola 2853477a75
All checks were successful
CI / ci (push) Successful in 1m15s
CI / e2e (push) Has been skipped
CI / deploy (push) Has been skipped
chore: archive v2.2 User Experience Polish milestone
Phases 28-31 archived to milestones/v2.2-phases/
Requirements and roadmap snapshots archived to milestones/

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 16:00:35 +02:00

1.1 KiB

phase, plan, status, gap_closure, started, completed
phase plan status gap_closure started completed
29-image-presentation 05 complete true 2026-04-13T12:00:00Z 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.