Commit Graph
66 Commits
Author SHA1 Message Date
Claude f650ec3019 Add selection tools: Magic Wand, Lasso, Ellipse Select
New Selection Tools:
- Magic Wand: Click to select by color similarity (like GIMP)
  - Configurable tolerance (0-100%)
  - Contiguous or global mode
  - Shift+Click to add to selection

- Lasso: Freehand selection by drawing
  - Draw around area to select
  - Shift+Draw to add to selection

- Ellipse Select: Draw elliptical/circular selections
  - Drag to create ellipse
  - Shift+Drag for perfect circle
  - Alt+Drag to draw from center

Smart Select Improvements:
- Fixed copy/cut to layer errors
- Added Shift+Click for multi-select (additive selection)
- All operations use proper layer action system

All selection tools support:
- Ctrl+C: Copy selection to new layer
- Ctrl+X: Cut selection to new layer
- Delete: Delete selected area
- Escape: Clear selection
- Marching ants animation on selection edge
2026-01-27 00:39:40 +00:00
Claude 53225e9e05 Improve SAM selection with mask contour and layer operations
- SAM selection now shows actual mask contour instead of bounding box
- Added marching ants animation on the actual mask edge
- Added keyboard shortcuts:
  - Ctrl+C: Copy selection to new layer
  - Ctrl+X: Cut selection to new layer (removes from original)
  - Delete: Delete selected area
  - Escape: Clear selection
- Removed eye catalog download from startup (was failing with 429)
2026-01-27 00:00:16 +00:00
Claude cfe487e2ed Fix smart select visualization and inpaint API
Frontend:
- Fix smart_select.js to properly render mask overlay
- Add marching ants border around selection
- Calculate selection bounds from mask
- Trigger re-render after mask is loaded

Backend:
- Fix inpaint endpoint to call edit_image() instead of inpaint()
- The AI providers use edit_image() method, not inpaint()
2026-01-26 18:26:12 +00:00
Claude f0ea7df6b7 Fix API base URL for unified container setup 2026-01-26 18:04:27 +00:00
Claude e0eb65810a Fix Docker build for miniPaint frontend
- Update main Dockerfile to copy all miniPaint static files:
  - index.html
  - dist/ (webpack bundle)
  - images/ (icons and assets)
  - src/css/ (stylesheets)
- Update backend main.py to conditionally mount static directories
  - Checks if each directory exists before mounting
  - Supports both React (assets/) and miniPaint (dist/, images/, src/) structures
2026-01-26 17:43:14 +00:00
Claude bf83ecc8ad Add SAM Smart Select and AI Inpaint tools to miniPaint
New features:
- Smart Select tool: Click to select objects using SAM (Segment Anything)
- AI Inpaint tool: Edit selected regions with text prompts

Changes:
- frontend/src/js/tools/smart_select.js: SAM-powered selection tool
- frontend/src/js/tools/ai_inpaint.js: AI inpainting with prompt dialog
- frontend/src/js/services/api.js: API service for backend communication
- frontend/src/js/config.js: Register new tools
- frontend/src/css/layout.css: Tool icon styles
- frontend/images/icons/: SVG icons for new tools
- backend/app/routers/tools.py: New base64 API endpoints
- frontend/Dockerfile: Updated for miniPaint build
- frontend/nginx.conf: Added /api prefix proxy
2026-01-26 17:34:20 +00:00
motion d009a2c0f0 Add miniPaint as new frontend base 2026-01-26 12:23:09 -05:00
motion 6ae4cbcb77 Add miniPaint as new frontend base 2026-01-26 12:20:16 -05:00
outis1one 0525cc8b20 Merge pull request #21 from outis1one/claude/automate-sam-download-mzpRs
Claude/automate sam download mzp rs
2026-01-26 11:44:35 -05:00
outis1one 34e680eb25 Merge branch 'main' into claude/automate-sam-download-mzpRs 2026-01-26 11:44:20 -05:00
Claude 487f52a616 Fix undefined variable references in ImageCanvas
ROOT CAUSE: ImageCanvas referenced props that don't exist:
- activeTool, onSmartSelect, onColorSelect were used but never declared
- selectionMode checked for 'smart'/'color' but App passes advancedToolMode with 'smart-select'/'color-select'

Changes:
- Update mode checking to use advancedToolMode instead of selectionMode for smart/color select
- Replace onSmartSelect/onColorSelect calls with onAdvancedToolClick
- Fix useEffect dependency array to reference actual props
- Add missing state/refs: currentZoom, imageRef, baseScaleRef, isDrawingRef
- Add zoom control buttons to canvas UI
- Fix tool mode indicator to check advancedToolMode
2026-01-26 13:39:24 +00:00
Claude c12e8c9508 Fix missing onZoomChange prop declaration in ImageCanvas 2026-01-26 05:45:44 +00:00
outis1one bb859105ff Merge pull request #20 from outis1one/claude/automate-sam-download-mzpRs
Fix remaining onZoomChange references to use ref pattern
2026-01-26 00:24:36 -05:00
Claude 9cd8a5badb Fix remaining onZoomChange references to use ref pattern 2026-01-26 05:23:01 +00:00
outis1one ece6e990d8 Merge pull request #19 from outis1one/claude/automate-sam-download-mzpRs
Fix onZoomChange reference error - use ref to avoid closure issues
2026-01-26 00:19:36 -05:00
outis1one cfe1073bb2 Merge branch 'main' into claude/automate-sam-download-mzpRs 2026-01-26 00:19:26 -05:00
Claude b185cd549c Fix onZoomChange reference error - use ref to avoid closure issues 2026-01-26 05:14:11 +00:00
outis1one a78621d787 Merge pull request #18 from outis1one/claude/automate-sam-download-mzpRs
Fix black screen issue - ensure canvas has dimensions before loading …
2026-01-26 00:01:53 -05:00
outis1one e6401e4c3e Merge branch 'main' into claude/automate-sam-download-mzpRs 2026-01-26 00:01:44 -05:00
Claude 2c9211355d Fix black screen issue - ensure canvas has dimensions before loading image 2026-01-26 05:00:42 +00:00
outis1one 7695c1ec4e Merge pull request #17 from outis1one/claude/add-eye-detection-feature-69XOl
GIMP-like UI overhaul - toolbar, sidebar, full-width canvas
2026-01-25 20:01:33 -05:00
outis1one 4bd2a38924 Merge branch 'main' into claude/add-eye-detection-feature-69XOl 2026-01-25 20:01:22 -05:00
Claude 09c4f71c0a Improve ImageCanvas - zoom, selection fixes, tool modes
- Add zoom support via prop (scales image around center)
- Fix selection interaction: clicking on selection transforms, clicking elsewhere creates new
- Use refs for state accessed in event handlers (fixes stale closure issue)
- Add smart select mode (clicks call onSmartSelect with image coordinates)
- Add color select mode placeholder
- Add pan mode with cursor feedback
- Add move mode for manipulating selections
- Use dashed blue selection style (more visible)
- forwardRef to expose canvas methods
2026-01-26 00:57:56 +00:00
Claude 9922b2a03e GIMP-like UI overhaul - toolbar, sidebar, full-width canvas
- Redesign layout: left toolbar, center canvas, right sidebar
- Add vertical tool strip with keyboard shortcuts (V, R, E, F, W, B, G, Z, H)
- Collapsible sidebar panels: Tool Options, AI Edit, Quick Actions, Eyes, Layers, History
- Canvas now fills available space with checkerboard background
- Add zoom controls in status bar
- Add menu bar with New, Save, Reset
- Remove old multi-column layout
2026-01-26 00:56:28 +00:00
outis1one e53c2295f7 Merge pull request #16 from outis1one/claude/add-eye-detection-feature-69XOl
Claude/add eye detection feature 69 x ol
2026-01-25 18:42:40 -05:00
outis1one aa3dabfbce Merge branch 'main' into claude/add-eye-detection-feature-69XOl 2026-01-25 18:42:32 -05:00
Claude 2a5b50ee4c Consolidate to single container, remove nginx
- Create unified Dockerfile with multi-stage build (Node + Python)
- FastAPI now serves React static files directly
- Remove frontend service and nginx dependency
- Simplify docker-compose to single service
- All routes work without proxy configuration
2026-01-25 23:40:51 +00:00
Claude a59887f8c5 Add /tools proxy location to nginx config
Fixes 405 errors on /tools/* POST endpoints (smart-select,
remove-background-to-layer, etc.) by proxying to backend.
2026-01-25 23:36:32 +00:00
outis1one 5aa124caf7 Merge pull request #15 from outis1one/claude/automate-sam-download-mzpRs
Wire Smart Select, Color Select, fix layer buttons, add zoom
2026-01-25 16:39:49 -05:00
Claude d95b95e234 Wire Smart Select, Color Select, fix layer buttons, add zoom
Frontend changes:
- Wire Smart Select and Color Select to canvas click handlers
- Add externalSelection prop to ImageCanvas for displaying AI-generated selections
- Add zoom controls (mouse wheel + buttons) to ImageCanvas
- Fix layer buttons (New Layer, Delete, Duplicate) with proper handlers
- Lift advancedToolMode state to App.jsx for coordination between components
- Add tool mode indicator overlay on canvas

Backend changes:
- Update smart-select endpoint to return JSON with polygon and bbox data
- Update color-select endpoint to return JSON with polygon and bbox data
- Add _mask_to_polygon helper function using OpenCV contour detection
- Add cv2 and base64 imports to tools.py

API changes:
- smartSelect and colorSelect now return { polygon, bbox, mask_base64 }
2026-01-25 20:49:52 +00:00
outis1one de578ae5dc Merge pull request #14 from outis1one/claude/automate-sam-download-mzpRs
Automate SAM download and fix database path issues
2026-01-25 15:43:13 -05:00
Claude df4ddc2d8c Automate SAM download and fix database path issues
- Fix database path mismatch: download_sample_eyes.py now uses
  ai_photo_edit.db instead of photoedit.db
- Add init_database.py script to initialize DB before eye import
- Add AUTO_DOWNLOAD_SAM=true environment variable (default: enabled)
- Update entrypoint.sh to:
  1. Initialize database first
  2. Auto-download SAM model (~375MB) on first startup
  3. Then import eyes (now works since DB exists)
- Update path detection to work in both Docker and local environments
2026-01-25 20:28:57 +00:00
outis1one 70cd0d6ea3 Merge pull request #13 from outis1one/claude/add-eye-detection-feature-69XOl
Add git to Dockerfile for segment-anything install
2026-01-25 13:29:14 -05:00
Claude a28b889728 Add git to Dockerfile for segment-anything install 2026-01-25 18:25:42 +00:00
outis1one dd704ab0f4 Merge pull request #12 from outis1one/claude/add-eye-detection-feature-69XOl
Claude/add eye detection feature 69 x ol
2026-01-25 13:22:34 -05:00
Claude 8b96c86a94 Add local SAM model support for offline Smart Select
- Add torch, torchvision, segment-anything to requirements
- Create download_sam_model.py script to fetch SAM checkpoint
- Update tools.py to use local SAM with Replicate API fallback
- Add SAM model check to entrypoint.sh with helpful instructions
- Model persists in /app/data/models via Docker volume mount
2026-01-25 18:15:07 +00:00
Claude 28e842e190 Add auto-populate eyes on startup and comprehensive .env docs
- Create entrypoint.sh that auto-downloads sample eyes on first run
- Update Dockerfile to use entrypoint script
- Rewrite .env.example with step-by-step setup instructions
- Add detailed troubleshooting section
- Clarify which models work for inpainting vs text-to-image
2026-01-25 18:06:09 +00:00
outis1one e8de898e89 Merge pull request #11 from outis1one/claude/add-eye-detection-feature-69XOl
Claude/add eye detection feature 69 x ol
2026-01-25 12:01:10 -05:00
Claude 4c2574ace4 Add SAM (Segment Anything) via Replicate API and update Docker
- Implement SAM object selection via Replicate API
  - Click on any object to select it with AI precision
  - Falls back to flood-fill if Replicate API unavailable
- Update Dockerfile for rembg dependencies
  - Add required system libraries (libsm6, libxext6, etc)
  - Pre-download rembg model during build
  - Create data directories for models and patches
2026-01-25 16:24:08 +00:00
Claude 909bb41f8a Add advanced editing features: layers, background removal, smart selection
Backend:
- Add /tools router with background removal, smart select, color select
- Add rembg dependency for AI background removal
- Add layer management API (list, flatten)
- Fix transparency preservation in blend_patch (veil collapse fix)
- Preserve alpha channel when reverting/resetting images

Frontend:
- Add AdvancedTools panel with background removal, smart select, color select
- Add Layers panel with drag-to-reorder, visibility toggle, flatten
- Add toolsApi for new backend endpoints
- Make right panel scrollable for additional controls

This adds "Photoshop light" capabilities:
- Remove background and create layer
- Smart object selection (click to select)
- Color selection with tolerance
- Layer system with compositing
2026-01-25 15:20:11 +00:00
Claude 7a86d53c88 Add script to download sample eye images for catalog
Creates scripts/download_sample_eyes.py that:
- Downloads public domain classical sculpture images from Wikimedia
- Creates patch records in database
- Generates thumbnails
- Populates the Eye Catalog with starter content
2026-01-25 15:08:50 +00:00
outis1one f99beed2ff Merge pull request #10 from outis1one/claude/add-eye-detection-feature-69XOl
Fix UX issues and add Eye Catalog UI
2026-01-25 00:20:10 -05:00
Claude 2813d930b0 Fix UX issues and add Eye Catalog UI
Fixes:
- Remove scale limit to allow image to fill canvas
- Fix Lasso tool by using Polygon instead of Polyline
- Remove duplicate Clear Selection button
- Fix Undo/Redo dependencies with useCallback

New Features:
- Eye Catalog UI for browsing and applying saved eyes
- Upload new eyes to catalog
- Apply eyes to selected areas with feathering
- Delete eyes from catalog
2026-01-25 05:17:10 +00:00
outis1one ee16bbcf57 Merge pull request #9 from outis1one/claude/add-eye-detection-feature-69XOl
Add core editing UX improvements
2026-01-24 23:53:40 -05:00
Claude d898106368 Add core editing UX improvements
- Make canvas use full viewport height for larger image display
- Add download button to export edited images
- Implement Undo/Redo with Ctrl+Z / Ctrl+Y keyboard shortcuts
- Add transform controls for selections (move, resize, rotate)
- Add warn on reload to prevent data loss
- Make project naming optional, auto-generate from filename
2026-01-25 04:51:45 +00:00
outis1one 87eb9dbbdf Merge pull request #8 from outis1one/claude/download-classic-eyes-EWMFj
Increase nginx client_max_body_size to 50MB for image uploads
2026-01-24 22:12:28 -05:00
Claude 8dfa7d3e17 Increase nginx client_max_body_size to 50MB for image uploads 2026-01-25 03:09:03 +00:00
outis1one 2fda7eb35b Merge pull request #7 from outis1one/claude/download-classic-eyes-EWMFj
Claude/download classic eyes ewm fj
2026-01-24 21:59:16 -05:00
outis1one b81bcb4ebb Merge pull request #6 from outis1one/claude/ai-photo-edit-tool-c8orl
Add public domain eye catalog system for CNC wood carving
2026-01-24 21:58:06 -05:00
Claude 75e04f722d Fix frontend API to use relative URLs through nginx proxy
Changed default API_BASE_URL from 'http://localhost:8000' to empty string
so requests go through nginx proxy instead of trying to connect directly.
2026-01-25 02:53:50 +00:00