Add debug logging throughout the app

Added DebugLogger utility with emoji-prefixed console output for:
- User actions (👆)
- State changes (📊)
- Processing steps (⚙️)
- Errors ()
- Image info (🖼️)

Logging added to:
- EditorViewModel: tap handling, mask operations, brush/line brush
- InpaintEngine: memory checks, Metal vs Accelerate path
- PatchMatch: texture creation and loading
- MaskingService: Vision requests
- BrushCanvasView: stroke creation and mask generation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-24 12:58:27 -05:00
parent 4fbf1abb57
commit 52094862e0
7 changed files with 137 additions and 6 deletions

View File

@@ -10,7 +10,15 @@
"Bash(git commit -m \"$\\(cat <<''EOF''\nImplement core project structure and foundation components\n\nProject Setup \\(Spec 01\\):\n- Configure iOS 17.0 deployment target\n- Add photo library usage descriptions\n- Create proper folder structure \\(App, Features, Services, Models, Utilities\\)\n\nData Model \\(Spec 02\\):\n- Add EditOperation enum with mask, inpaint, adjustment cases\n- Add MaskOperation, InpaintOperation structs \\(Codable\\)\n- Add Project model with operation stack and undo/redo support\n- Add MaskData with dilation support via vImage\n\nServices \\(Specs 03-05\\):\n- Add InpaintEngine with Metal + Accelerate fallback\n- Add MaskingService wrapping Vision framework\n- Add ContourService for wire/line detection and scoring\n\nUI Components \\(Specs 06-08\\):\n- Add PhotoEditorView with photo picker integration\n- Add CanvasView with pinch-to-zoom and pan gestures\n- Add ToolbarView with tool selection and inspector panel\n\nUtilities:\n- Add ImagePipeline for preview/export rendering\n- Add EdgeRefinement for smart brush edge detection\n- Add check_build.sh for CI verification\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")",
"Bash(git push)",
"Bash(git commit -m \"$\\(cat <<''EOF''\nIntegrate services with UI via EditorViewModel\n\n- Add EditorViewModel coordinating masking, contour detection, and inpainting\n- Connect PhotoEditorView to viewModel with mask confirmation bar\n- Add processing overlay and error toast UI\n- Update CanvasView with tap-to-mask functionality\n- Add coordinate conversion from view space to image space\n- Update ToolbarView to bind to viewModel state\n- Wire up undo/redo actions through viewModel\n\nPerson, object, and wire removal now flow:\ntap -> detect -> preview mask -> confirm -> inpaint\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")",
"Bash(git commit -m \"$\\(cat <<''EOF''\nAdd export functionality with format options\n\n- Add ExportView with JPEG, PNG, HEIC format support\n- Include quality slider for JPEG compression\n- Show image dimensions and estimated file size\n- Implement save to Photo Library with proper permissions\n- Add share sheet for AirDrop, Messages, etc.\n- Wire export button in PhotoEditorView to show ExportView\n- Add HEIC encoding extension for UIImage\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")"
"Bash(git commit -m \"$\\(cat <<''EOF''\nAdd export functionality with format options\n\n- Add ExportView with JPEG, PNG, HEIC format support\n- Include quality slider for JPEG compression\n- Show image dimensions and estimated file size\n- Implement save to Photo Library with proper permissions\n- Add share sheet for AirDrop, Messages, etc.\n- Wire export button in PhotoEditorView to show ExportView\n- Add HEIC encoding extension for UIImage\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")",
"Bash(bash:*)",
"Bash(xcodebuild:*)",
"Bash(git commit -m \"$\\(cat <<''EOF''\nAdd Metal-based inpainting and brush selection tools\n\nImplement GPU-accelerated inpainting using Metal compute shaders:\n- Add Shaders.metal with dilateMask, gaussianBlur, diffuseInpaint, edgeAwareBlend kernels\n- Add PatchMatchInpainter class for exemplar-based inpainting\n- Update InpaintEngine to use Metal with Accelerate fallback\n- Add BrushCanvasView for manual brush-based mask painting\n- Add LineBrushView for wire removal line drawing\n- Update CanvasView to integrate brush canvas overlay\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")",
"Bash(git push:*)",
"Bash(git commit -m \"$\\(cat <<''EOF''\nFix ImagePipeline operation rendering\n\nUpdate MaskOperation to store mask dimensions for reconstruction.\nImplement proper operation rendering in ImagePipeline:\n- Apply mask+inpaint operations with proper mask reconstruction\n- Handle adjustment operations by type \\(brightness/contrast/saturation\\)\n- Scale masks when rendering previews at reduced resolution\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")",
"Bash(git commit -m \"$\\(cat <<''EOF''\nAdd person/wire removal features and accessibility support\n\n- Person removal: select all people option, mask dilation, brush refinement\n- Wire removal: line brush fallback mode with Catmull-Rom smoothing\n- Image import: Files app document picker, large image warnings\n- Accessibility: VoiceOver labels, announcements, Dynamic Type support,\n high contrast mask option, Reduce Motion, 44pt touch targets, steppers\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")",
"Bash(grep:*)",
"Bash(git commit:*)"
]
}
}