Skip to content

Extract COD photo capture into dedicated sheet - #657

Merged
mnindrazaka merged 1 commit into
mainfrom
claude/intelligent-goldberg-ayicat
Sep 27, 2026
Merged

mnindrazaka merged 1 commit into
mainfrom
claude/intelligent-goldberg-ayicat

Conversation

@mnindrazaka

Copy link
Copy Markdown
Collaborator

Refactor the COD (Cash on Delivery) photo capture flow to use a dedicated modal sheet instead of embedding the camera capture inline within the customer details sheet.

Summary

This change improves the UX for COD photo verification by separating the photo capture step into its own dedicated sheet. Users now explicitly open a photo capture modal rather than having the camera interface appear inline, and can navigate back to the details sheet without losing previously captured photos.

Key changes

  • New component: CodPhotoCaptureSheet — a dedicated modal for capturing verification photos with a back button and header
  • Updated CustomerDetailsSheet:
    • Removed inline CameraCapture component
    • Replaced onCapturePhoto and onRetakePhoto callbacks with single onOpenPhotoCapture callback
    • Changed photo display from full-size preview to compact thumbnail (72×96) with "Retake" button
    • Wrapped content in ScrollView for better mobile UX
  • Updated checkout state machine (CheckoutUsecase):
    • Added capturingPhoto state type
    • Added OPEN_PHOTO_CAPTURE action to transition from askingDetails to capturingPhoto
    • Changed RETAKE_PHOTO to BACK_TO_DETAILS — navigating back preserves the captured photo
    • CAPTURE_PHOTO now transitions from capturingPhoto back to askingDetails with the photo saved
  • Updated CartHandler: Wired up the new photo capture sheet and state transitions
  • Updated CameraCapture: Made viewfinder responsive (100% width with 3:4 aspect ratio) instead of fixed 280px

Notable implementation details

  • The photo capture is now a true modal step in the checkout flow, not an inline component swap
  • Users can open/close the photo capture sheet without losing their details form state
  • The thumbnail preview in the details sheet is intentionally small to encourage users to review the full photo in the dedicated capture sheet if needed
  • All state transitions are handled through the checkout use case reducer, maintaining the FSM pattern

https://claude.ai/code/session_01EGS6rwnshDjEFNh2ZYFcxe

Picking COD used to embed the camera inline in the customer-details sheet,
so the viewfinder was squeezed small and, once a photo was added, the
sheet's content outgrew the fixed-height frame with nothing to scroll it.
Now COD hands off to its own full sheet (CodPhotoCaptureSheet) with a
full-width viewfinder, while the details sheet gets a scrollable body with
pinned action buttons.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EGS6rwnshDjEFNh2ZYFcxe
@vercel

vercel Bot commented Sep 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
gatherloop-order Ignored Ignored Sep 27, 2026 2:37am UTC
gatherloop-pos Ignored Ignored Sep 27, 2026 2:37am UTC
gatherloop-ui-storybook Ignored Ignored Sep 27, 2026 2:37am UTC

@mnindrazaka
mnindrazaka merged commit 3622480 into main Sep 27, 2026
7 checks passed
@mnindrazaka
mnindrazaka deleted the claude/intelligent-goldberg-ayicat branch September 27, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants