Commit Graph
86 Commits
Author SHA1 Message Date
Siddharth Kumar Sah 8a89bc1ec9 Merge branch 'main' of https://github.com/siddharthksah/Stirling-Image 2026-03-23 19:23:17 +08:00
Siddharth Kumar Sah 786a671c39 feat(crop): wire CropCanvas and CropSettings into tool-page with bidirectional state 2026-03-23 19:22:53 +08:00
Siddharth Kumar Sah 70c73d85c9 fix: white screen crash when uploading photos with null GPS EXIF data
Samsung Galaxy phones (and others) can have GPS EXIF tags with null
coordinate values when location is disabled. The server returned
_latitude: null, and the client guard used !== undefined which passed
for null, causing null.toFixed() to crash React with no ErrorBoundary.

- Server: validate GPS array values are actual numbers before computing
- Client: use != null guard (catches both null and undefined)
- App: add ErrorBoundary to prevent white screens from any future crash
2026-03-23 19:22:52 +08:00
Siddharth Kumar Sah c2c256a180 feat(crop): redesign CropSettings with aspect presets, pixel inputs, and grid toggle 2026-03-23 19:19:56 +08:00
Siddharth Kumar Sah 1a076be9b2 feat(crop): add CropCanvas component with visual overlay, grid, and keyboard controls 2026-03-23 19:18:03 +08:00
Siddharth Kumar Sah 31d426ff6f feat(crop): add react-image-crop dependency 2026-03-23 19:17:02 +08:00
Siddharth Kumar Sah 80756d1591 feat: merge multi-image UX — batch processing, filmstrip navigation, resize/rotate redesign
Integrates feature/multi-image-ux branch with 20 commits including:
- Multi-image viewer with arrow navigation and filmstrip thumbnails
- Batch processing across all tool settings components
- File store rewrite with FileEntry model for multi-image support
- Resize settings redesigned with tab-based UI (presets, custom, scale)
- Side-by-side comparison for resize results
- Per-file metadata caching in strip-metadata
- Client-side ZIP extraction via fflate
- SSE progress correlation via clientJobId
2026-03-23 17:13:10 +08:00
semantic-release-bot 8815fc883e chore(release): 0.4.1 [skip ci]
## [0.4.1](https://github.com/siddharthksah/Stirling-Image/compare/v0.4.0...v0.4.1) (2026-03-23)

### Bug Fixes

* unify project on port 1349, improve strip-metadata and UI components ([0e7348a](https://github.com/siddharthksah/Stirling-Image/commit/0e7348a0bedb6c47a8025c47b377849169aa7472))
2026-03-23 08:38:56 +00:00
Siddharth Kumar Sah 0e7348a0be fix: unify project on port 1349, improve strip-metadata and UI components
Consolidate all access to localhost:1349 — Vite dev server serves on 1349
and proxies API calls to an internal dev port (13490). Production API
defaults to 1349. Also includes strip-metadata improvements, UI component
updates, and compress operation fixes.
2026-03-23 16:38:27 +08:00
semantic-release-bot 8841dbb677 chore(release): 0.4.0 [skip ci]
# [0.4.0](https://github.com/siddharthksah/Stirling-Image/compare/v0.3.1...v0.4.0) (2026-03-23)

### Bug Fixes

* streamline CI/CD — remove broken AI docs updater, fix Docker publish ([4f984c8](https://github.com/siddharthksah/Stirling-Image/commit/4f984c83acc4bfaa5b9479d80e2bdda05f4a2ccc))

### Features

* add CSS transform props to ImageViewer for live rotate/flip preview ([113bb75](https://github.com/siddharthksah/Stirling-Image/commit/113bb757333e9ad809a401000f3b6b34fa1ef415))
* add live preview callback to RotateSettings, rename button to Apply ([31a9439](https://github.com/siddharthksah/Stirling-Image/commit/31a943962d46fab1eb1efd9f605fc5a0144ddd87))
* add SideBySideComparison component for resize results ([28a8b10](https://github.com/siddharthksah/Stirling-Image/commit/28a8b10fa15fa216d7f53256bea9461650358fb1))
* conditional result views — side-by-side for resize, live preview for rotate ([989e8dc](https://github.com/siddharthksah/Stirling-Image/commit/989e8dc6e47fe123d6333dddf4431a01623e0437))
* rewrite resize settings with tab-based UI (presets, custom, scale) ([02ef3e6](https://github.com/siddharthksah/Stirling-Image/commit/02ef3e6468b36303dfdbc61e18c14dc5eb68d957))
2026-03-23 07:15:07 +00:00
Siddharth Kumar Sah 4f984c83ac fix: streamline CI/CD — remove broken AI docs updater, fix Docker publish
- Delete ai-docs-updater.yml (never worked: missing ANTHROPIC_API_KEY, tsx not found)
- Delete standalone docker-publish.yml (GITHUB_TOKEN can't trigger cross-workflow)
- Merge Docker build/push into release.yml as dependent job using .release-version
- Add publishCmd to .releaserc.json to signal new releases to Docker job
- Fix deploy-docs.yml: upgrade pnpm@v3→v4, node 20→22, add --frozen-lockfile
- Fix ci.yml: rename job to "Typecheck" (no lint step existed)
2026-03-23 15:14:34 +08:00
Siddharth Kumar Sah 989e8dc6e4 feat: conditional result views — side-by-side for resize, live preview for rotate 2026-03-23 15:14:34 +08:00
Siddharth Kumar Sah 31a943962d feat: add live preview callback to RotateSettings, rename button to Apply 2026-03-23 15:14:34 +08:00
Siddharth Kumar Sah 113bb75733 feat: add CSS transform props to ImageViewer for live rotate/flip preview 2026-03-23 15:14:34 +08:00
Siddharth Kumar Sah 02ef3e6468 feat: rewrite resize settings with tab-based UI (presets, custom, scale) 2026-03-23 15:14:34 +08:00
Siddharth Kumar Sah 28a8b10fa1 feat: add SideBySideComparison component for resize results 2026-03-23 15:14:34 +08:00
Siddharth Kumar Sah 1d35db98bf fix: resolve TypeScript Uint8Array type error with fflate 2026-03-23 14:14:00 +08:00
Siddharth Kumar Sah 474b4a941e feat: multi-file metadata display with per-file caching 2026-03-23 14:11:49 +08:00
Siddharth Kumar Sah 9e2c28f191 feat: wire up batch processing across tool settings components 2026-03-23 14:11:08 +08:00
Siddharth Kumar Sah 846a51a9fd feat: add processAllFiles batch method to tool processor hook 2026-03-23 14:09:09 +08:00
Siddharth Kumar Sah 3796533822 feat: integrate MultiImageViewer and multi-file UX into tool page 2026-03-23 14:07:28 +08:00
Siddharth Kumar Sah 815a8ed419 feat: add MultiImageViewer with arrow navigation and filmstrip 2026-03-23 14:03:59 +08:00
Siddharth Kumar Sah 2514078ea1 feat: accept clientJobId in batch endpoint for SSE progress correlation 2026-03-23 14:03:56 +08:00
Siddharth Kumar Sah 6521d70238 feat: add ThumbnailStrip filmstrip component 2026-03-23 14:03:55 +08:00
Siddharth Kumar Sah 8844b44fff feat: rewrite file-store with FileEntry model for multi-image support 2026-03-23 14:02:33 +08:00
Siddharth Kumar Sah 890ed21617 chore: add fflate for client-side ZIP extraction 2026-03-23 12:55:10 +08:00
Siddharth Kumar Sah 59a57f3a00 feat: conditional result views — side-by-side for resize, live preview for rotate 2026-03-23 12:53:18 +08:00
Siddharth Kumar Sah ec192e3d96 feat: add live preview callback to RotateSettings, rename button to Apply 2026-03-23 12:51:29 +08:00
Siddharth Kumar Sah 267da78577 feat: add CSS transform props to ImageViewer for live rotate/flip preview 2026-03-23 12:50:19 +08:00
Siddharth Kumar Sah bc105fd261 feat: rewrite resize settings with tab-based UI (presets, custom, scale) 2026-03-23 12:49:20 +08:00
Siddharth Kumar Sah 271cab647b feat: add SideBySideComparison component for resize results 2026-03-23 12:47:06 +08:00
semantic-release-bot ddd30f77b0 chore(release): 0.3.1 [skip ci]
## [0.3.1](https://github.com/siddharthksah/Stirling-Image/compare/v0.3.0...v0.3.1) (2026-03-23)

### Bug Fixes

* resolve tsx not found in AI docs updater workflow ([b803b0e](https://github.com/siddharthksah/Stirling-Image/commit/b803b0e443b54bbca33cf88fe1ab38eeddd38baf))
2026-03-23 04:10:54 +00:00
semantic-release-bot acf48432be chore(release): 0.3.0 [skip ci]
# [0.3.0](https://github.com/siddharthksah/Stirling-Image/compare/v0.2.1...v0.3.0) (2026-03-23)

### Bug Fixes

* add SSE progress endpoint to public paths ([b3f590c](https://github.com/siddharthksah/Stirling-Image/commit/b3f590c8b35fb396cf298187f241e45827ea1db8))
* apply continuous progress bar to erase-object and OCR ([8db84a7](https://github.com/siddharthksah/Stirling-Image/commit/8db84a753cd8dbd522146aa25e85bb454b032490))
* continuous progress bar (no 100%→0% reset) ([28cd950](https://github.com/siddharthksah/Stirling-Image/commit/28cd950ede6d0fc03e0d7cca0a013d883ea00238))
* setError(null) was overriding setProcessing(true) ([b5cc452](https://github.com/siddharthksah/Stirling-Image/commit/b5cc45207758c25867833fad961744a37df36fda))

### Features

* **ai:** add emit_progress() calls to all Python AI scripts ([7238429](https://github.com/siddharthksah/Stirling-Image/commit/723842988b39a8d9ea4f5b0cdd97569ff0c65f68))
* **ai:** add onProgress callback to all AI wrapper functions ([acb230c](https://github.com/siddharthksah/Stirling-Image/commit/acb230cc98193766fc978098c12dfedf08a0a339))
* **ai:** rewrite bridge.ts to stream stderr progress via spawn ([7d74ddd](https://github.com/siddharthksah/Stirling-Image/commit/7d74ddd3a6a466f1863412b36501c663fd642194))
* **api:** add SingleFileProgress type and SSE update function ([7eddac5](https://github.com/siddharthksah/Stirling-Image/commit/7eddac5119d1db3cbf831c735c5b78f0c92728ef))
* **api:** wire AI route handlers to SSE progress via clientJobId ([27600a4](https://github.com/siddharthksah/Stirling-Image/commit/27600a431805d54b32875dbe5a58f05cfcdbe2a1))
* replace model dropdown with intuitive subject/quality selector in remove-bg ([9aa0371](https://github.com/siddharthksah/Stirling-Image/commit/9aa0371a1452540557aca9f2195032c5c16ce3fb))
* **web:** add ProgressCard component ([01d5d66](https://github.com/siddharthksah/Stirling-Image/commit/01d5d66466a7bcf4a0c0f454f7b4d58f7e1e7801))
* **web:** add ProgressCard to non-AI tool settings (Group A) ([5c64b30](https://github.com/siddharthksah/Stirling-Image/commit/5c64b306ead8b6214dee6d51e8dae25fb47ff7e8))
* **web:** migrate AI tool settings to ProgressCard ([dbd3bf7](https://github.com/siddharthksah/Stirling-Image/commit/dbd3bf737e4692279ba5b7c3d860779193a21b5f))
* **web:** rewrite useToolProcessor with XHR upload progress and SSE ([60945fd](https://github.com/siddharthksah/Stirling-Image/commit/60945fd3b3674d2026f3f717cd3d123951126933))
2026-03-23 04:03:22 +00:00
Siddharth Kumar Sah 9aa0371a14 feat: replace model dropdown with intuitive subject/quality selector in remove-bg
Replace technical AI model names with user-friendly controls:
- Subject type buttons (People/Products/General) with icons
- Quality selector (Fast/Balanced/Best) with time estimates
- Passport/ID photo checkbox for portrait-optimized processing
- Models selected automatically based on user's choices
2026-03-23 12:02:35 +08:00
Siddharth Kumar Sah 80e536bcf8 chore: remove dead code, add test infrastructure, update docs
- Delete 3 dead files: use-batch-processor.ts, use-i18n.ts, smart-crop.ts (AI package)
- Remove dead getJobProgress function and unused runPythonScript wrapper
- Remove 6 unused imports across API and web apps
- Remove unused shared types (ImageFormat, AppConfig, ApiError, HealthResponse, JobProgress)
  and constants (SUPPORTED_INPUT_FORMATS/OUTPUT_FORMATS, DEFAULT_OUTPUT_FORMAT)
- Remove unused store method (setOriginalBlobUrl) and clean AI package re-exports
- Add test infrastructure: vitest config, unit/integration/e2e tests, fixtures, screenshots
- Add Docker test infrastructure: Dockerfile.test, docker-compose.test.yml
- Add download_models.py for pre-baking AI model weights in Docker
- Add filename sanitization utility (apps/api/src/lib/filename.ts)
- Update .gitignore to exclude coverage/, *.tsbuildinfo, .superpowers/, test artifacts
- Update .dockerignore to exclude test/coverage/IDE artifacts from builds
- Update docs: remove smart crop from AI docs (uses Sharp directly), update bridge docs
2026-03-23 11:46:45 +08:00
Siddharth Kumar Sah 8db84a753c fix: apply continuous progress bar to erase-object and OCR
Same fix as the hook: upload=0-15%, server processing=15-100%.
2026-03-23 09:49:20 +08:00
Siddharth Kumar Sah 28cd950ede fix: continuous progress bar (no 100%→0% reset)
Upload occupies 0-15% of the bar, server processing 15-100%.
SSE progress from the server is scaled into the 15-100 range.
The bar now moves smoothly from start to finish.
2026-03-23 09:47:53 +08:00
Siddharth Kumar Sah b5cc452077 fix: setError(null) was overriding setProcessing(true)
The Zustand setError() setter has a side effect: it sets
processing=false. When called after setProcessing(true), it
immediately killed the processing state, so the ProgressCard
never rendered. Fix: call setError(null) before setProcessing(true).
2026-03-23 09:32:45 +08:00
Siddharth Kumar Sah b3f590c8b3 fix: add SSE progress endpoint to public paths
The /api/v1/jobs/ endpoint was blocked by auth middleware.
EventSource doesn't support custom headers so auth tokens can't be
sent. The jobId is a random UUID (unguessable capability token), same
security model as the download endpoint.
2026-03-23 09:16:44 +08:00
Siddharth Kumar Sah dbd3bf737e feat(web): migrate AI tool settings to ProgressCard
Replace AIProgressBar and inline progress indicators with the new
ProgressCard component across all 5 AI tool settings. The three
useToolProcessor-based tools (remove-bg, blur-faces, upscale) now
destructure `progress` from the hook. The two custom-fetch tools
(erase-object, ocr) gain inline XHR upload tracking + SSE processing
progress with elapsed timer.
2026-03-23 01:46:05 +08:00
Siddharth Kumar Sah 5c64b306ea feat(web): add ProgressCard to non-AI tool settings (Group A)
Replace Loader2 spinner buttons with ProgressCard in all 13 non-AI tool
settings components that use useToolProcessor. Each now shows upload
progress, elapsed time, and processing phase during operations.
2026-03-23 01:45:58 +08:00
Siddharth Kumar Sah 60945fd3b3 feat(web): rewrite useToolProcessor with XHR upload progress and SSE 2026-03-23 01:42:27 +08:00
Siddharth Kumar Sah 27600a4318 feat(api): wire AI route handlers to SSE progress via clientJobId
Extract clientJobId from multipart form data in all 5 AI route handlers
(remove-background, upscale, blur-faces, erase-object, ocr) and forward
progress callbacks to the SSE system via updateSingleFileProgress.
2026-03-23 01:41:13 +08:00
Siddharth Kumar Sah 01d5d66466 feat(web): add ProgressCard component 2026-03-23 01:39:40 +08:00
Siddharth Kumar Sah 7eddac5119 feat(api): add SingleFileProgress type and SSE update function 2026-03-23 01:36:57 +08:00
Siddharth Kumar Sah 4807bd2726 feat: add semantic-release for automated versioning and help dialog
- Set up semantic-release with zero-touch CI pipeline on push to main
- Add version sync script to keep all package.json files and APP_VERSION
  constant in sync automatically
- Consolidate Docker publishing into single tag-triggered workflow that
  pushes to both Docker Hub and ghcr.io with semver tags
- Add help dialog with keyboard shortcuts, getting started guide, and
  resource links
- Sync all versions to 0.2.1 to match Docker Hub latest
2026-03-22 21:25:14 +08:00
Siddharth Kumar Sah fb1d366d5f fix: use U2-Net as default model (fast, 2s) with BiRefNet as opt-in
BiRefNet-Lite times out on first load (~60s+ for 973MB model).
U2-Net works in 2 seconds. Users can still select BiRefNet for
higher quality when they're willing to wait. Added timing hints
in model descriptions and increased timeout for BiRefNet models.
2026-03-22 21:08:37 +08:00
Siddharth Kumar Sah 6668615750 docs: add VitePress documentation site with GitHub Pages deployment
Rewrites all documentation with accurate project details (Fastify, port
1349, single-container Docker, all 33+ tools, full database schema).
Adds getting started guide and configuration reference. Updates help and
settings dialogs to link to the docs site.
2026-03-22 21:00:37 +08:00
Siddharth Kumar Sah 2bdc367767 fix: use BiRefNet-Lite as default model and fix JSON parsing
- Switch default from birefnet-general (973MB, 4min) to
  birefnet-general-lite (faster, still SOTA quality)
- Fix Python script stdout pollution — progress messages now go to
  stderr so the JSON result parser doesn't break
- Pre-download birefnet-general-lite in Docker build
2026-03-22 20:07:39 +08:00
Siddharth Kumar Sah 77ee8469d8 feat: upgrade to BiRefNet SOTA background removal model
- Switch default model from U2-Net to BiRefNet (state-of-the-art)
- Add 6 model options: BiRefNet, BiRefNet Lite, BiRefNet Portrait,
  BRIA RMBG, IS-Net, U2-Net
- Add animated progress bar with stage indicators (loading model,
  analyzing, removing, refining edges) and elapsed timer
- Add intuitive background color presets (Transparent, White, Black,
  Red, Green, Blue) as clickable buttons + custom color picker
- Handle background color compositing in Python (PIL alpha composite)
- Add checkerboard pattern to before/after slider for transparency
- Pre-bake BiRefNet model (973MB) in Docker image for instant use
2026-03-22 19:51:35 +08:00