# 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
