Files
CheapRetouch/specs/08-photo-editor-view.md
jared 1049057d7d Add Ralph Wiggum agent setup and project specifications
- Add project constitution with vision, principles, and autonomy settings
- Add 15 feature specifications covering full app scope
- Configure agent entry points (AGENTS.md, CLAUDE.md)
- Add build prompt and speckit command for spec creation
- Include comprehensive .gitignore for iOS development

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 23:19:41 -05:00

38 lines
1.6 KiB
Markdown

# Photo Editor View
## Description
Main editor screen composing canvas, toolbar, and coordinating edit operations.
## Acceptance Criteria
- [ ] `PhotoEditorView` SwiftUI view containing:
- `CanvasView` for image display and interaction
- `ToolbarView` for tool selection
- Status/feedback area for messages
- [ ] Tap handling routed to appropriate service based on selected tool:
- Person tool → MaskingService.generatePersonMask
- Object tool → MaskingService.generateForegroundMask
- Wire tool → ContourService.findBestWireContour
- Brush tool → direct drawing on mask layer
- [ ] Mask preview shown after detection, before inpainting
- [ ] Confirm/cancel buttons for mask preview
- [ ] On confirm: InpaintEngine processes, result added to operation stack
- [ ] Feedback states implemented:
- Processing: spinner overlay on affected region
- No detection: toast with fallback suggestion
- Success: brief checkmark animation
- [ ] Undo/redo triggers re-render from operation stack
- [ ] State persisted when app backgrounds
- [ ] Full flow UI test: import → edit → confirm
## Technical Notes
- Use `@StateObject` or `@ObservedObject` for editor state
- Coordinate space conversion between view and image coordinates
- Show mask preview as overlay before committing
- Processing should be async to keep UI responsive
## Edge Cases
- Tap during processing: ignore or queue
- App backgrounded during processing: complete in background if possible
- Memory warning during processing: cancel gracefully, show error
- User cancels mask preview: discard mask, return to ready state