Commit Graph
207 Commits
Author SHA1 Message Date
semantic-release-bot 8f98b745ff chore(release): 0.19.0 [skip ci]
# [0.19.0](https://github.com/siddharthksah/Stirling-Image/compare/v0.18.0...v0.19.0) (2026-03-29)

### Features

* add privacy policy page and fix CSP blocking API docs ([7f17cb9](https://github.com/siddharthksah/Stirling-Image/commit/7f17cb98ce4b6979f18c34e3a3a94b79fc462e82))
2026-03-29 15:57:41 +00:00
Siddharth Kumar Sah 7f17cb98ce feat: add privacy policy page and fix CSP blocking API docs
Add a privacy policy page accessible at /privacy (public, no auth required).
Relax Content-Security-Policy for /api/docs route to allow Scalar's inline
script initialization, fixing blank docs page in production.
2026-03-29 23:57:08 +08:00
semantic-release-bot d7a917b995 chore(release): 0.18.0 [skip ci]
# [0.18.0](https://github.com/siddharthksah/Stirling-Image/compare/v0.17.7...v0.18.0) (2026-03-29)

### Features

* add worker threads, persistent Python sidecar, graceful shutdown, and architectural improvements ([1cbdfa1](https://github.com/siddharthksah/Stirling-Image/commit/1cbdfa15900a58a5db23361167d3ed71d59bf189))
2026-03-29 09:24:13 +00:00
Siddharth Kumar Sah 1cbdfa1590 feat: add worker threads, persistent Python sidecar, graceful shutdown, and architectural improvements
- Graceful shutdown: SIGTERM/SIGINT handlers drain HTTP, stop workers, close DB
- Thumbnail caching: disk-cached thumbnails with immutable Cache-Control headers
- Worker thread pool: Piscina offloads Sharp processing off the main event loop
- Persistent Python dispatcher: pre-imports ML libraries, eliminates cold-start latency
- Tool page registry: declarative tool-to-component mapping replaces 750-line switch
- File store cleanup: remove dead derived fields, stable files array reference
- Job persistence: progress written to SQLite jobs table, stale jobs recovered on startup
2026-03-29 17:23:41 +08:00
semantic-release-bot 7c71c7c483 chore(release): 0.17.7 [skip ci]
## [0.17.7](https://github.com/siddharthksah/Stirling-Image/compare/v0.17.6...v0.17.7) (2026-03-28)

### Bug Fixes

* move health diagnostics behind admin auth ([818e587](https://github.com/siddharthksah/Stirling-Image/commit/818e5877a773e6af48f9530199c6fa52e207bd50))
* reject HTML tags in settings API to prevent stored XSS ([8a62093](https://github.com/siddharthksah/Stirling-Image/commit/8a6209313052371c123c5996cb41b9e431251874))
* simplify public health to static response, add 403 test ([4577d5c](https://github.com/siddharthksah/Stirling-Image/commit/4577d5c30ea53c72b02490b78b6765295e55213a))
* switch README Docker references from GHCR to Docker Hub ([fb84f5c](https://github.com/siddharthksah/Stirling-Image/commit/fb84f5ce8d175e568cce20caddcf79832d0bb973))
* use two-pass validation in settings PUT to prevent partial writes ([813fa6b](https://github.com/siddharthksah/Stirling-Image/commit/813fa6b7e8d8e371959cff4d4a2a85ece4a636bb))
2026-03-28 11:08:45 +00:00
Siddharth Kumar Sah 4577d5c30e fix: simplify public health to static response, add 403 test
Remove DB probe from public health endpoint - it only needs to confirm
the process is alive. Add test for non-admin user getting 403 on admin
health endpoint.
2026-03-28 19:08:17 +08:00
Siddharth Kumar Sah 818e5877a7 fix: move health diagnostics behind admin auth
Public GET /api/v1/health now returns only status and version.
Full diagnostics (uptime, storage, database, queue) moved to
GET /api/v1/admin/health which requires admin authentication.
2026-03-28 19:08:17 +08:00
Siddharth Kumar Sah 813fa6b7e8 fix: use two-pass validation in settings PUT to prevent partial writes
Validation now runs on all entries before any database writes.
Previously, clean entries could be written before a later malicious
entry triggered a 400 response.
2026-03-28 19:08:17 +08:00
Siddharth Kumar Sah 8a62093130 fix: reject HTML tags in settings API to prevent stored XSS
PUT /api/v1/settings now returns 400 if any key or value contains HTML
tags. Settings are configuration values - there is no legitimate use
case for HTML in them.
2026-03-28 19:08:17 +08:00
semantic-release-bot daf942ba89 chore(release): 0.17.6 [skip ci]
## [0.17.6](https://github.com/siddharthksah/Stirling-Image/compare/v0.17.5...v0.17.6) (2026-03-28)

### Bug Fixes

* resolve pipeline step race condition and infinite re-render loop ([aa1f87f](https://github.com/siddharthksah/Stirling-Image/commit/aa1f87fc91e0b5edd93c6720fcc54a839e51893a))
* show checkerboard behind transparent images in before/after slider ([2e29501](https://github.com/siddharthksah/Stirling-Image/commit/2e29501ae6f1652cc3d0e9193863aeddb18513af))
2026-03-28 10:35:02 +00:00
Siddharth Kumar Sah 2e29501ae6 fix: show checkerboard behind transparent images in before/after slider
The processed image in the BeforeAfterSlider was layered on top of the
original with a semi-transparent background. When the processed result
had transparency (e.g. after remove-background), the original image
showed through, making it look like the background was not removed.

Added an opaque checkerboard background behind the processed image so
transparent areas are clearly visible instead of showing the original.
2026-03-28 18:34:22 +08:00
Siddharth Kumar Sah aa1f87fc91 fix: resolve pipeline step race condition and infinite re-render loop
Two issues caused intermittent step addition failures in the automation
pipeline:

1. RemoveBgControls had onChange in its useEffect deps. Since onChange is
   a new function reference on every parent render, this created an
   infinite re-render loop (effect -> setState -> render -> effect).
   Fixed by using the onChangeRef pattern matching other settings
   components.

2. All step mutation callbacks read from stepsRef.current and passed
   values to setSteps. Concurrent callbacks (e.g. addStep + a settings
   effect) would overwrite each other. Fixed by switching to functional
   state updates (setSteps(prev => ...)) and removing stepsRef.

Also rewrites automate e2e tests to use manual step addition instead of
referencing templates that no longer exist in the UI.
2026-03-28 18:34:05 +08:00
semantic-release-bot b4f0fed679 chore(release): 0.17.5 [skip ci]
## [0.17.5](https://github.com/siddharthksah/Stirling-Image/compare/v0.17.4...v0.17.5) (2026-03-28)

### Bug Fixes

* sync stepsRef during render, not useEffect ([748ac60](https://github.com/siddharthksah/Stirling-Image/commit/748ac607bc71892c588e6a1795d258d4fc7f3413))
2026-03-28 09:02:46 +00:00
Siddharth Kumar Sah 748ac607bc fix: sync stepsRef during render, not useEffect
Child component effects (Controls onChange) fire before the parent's
useEffect that synced stepsRef. This caused updateStepSettings to read
stepsRef.current as [] and wipe out newly added steps.

Fix: assign stepsRef.current = steps directly during render so the
ref is always current before any child effects execute.
2026-03-28 17:02:24 +08:00
semantic-release-bot 04d412873d chore(release): 0.17.4 [skip ci]
## [0.17.4](https://github.com/siddharthksah/Stirling-Image/compare/v0.17.3...v0.17.4) (2026-03-28)

### Bug Fixes

* prevent stale closure in pipeline step callbacks ([8b20fef](https://github.com/siddharthksah/Stirling-Image/commit/8b20fef2d8123411faa2c2379693136af6b0f9ba))
2026-03-28 08:43:23 +00:00
Siddharth Kumar Sah 8b20fef2d8 fix: prevent stale closure in pipeline step callbacks
All step mutation callbacks (addStep, removeStep, moveStep,
updateStepSettings) captured `steps` in their useCallback closures.
When React batched state updates, rapid interactions could use a stale
steps array, causing clicks to silently fail.

Fix: use a stepsRef that always holds the latest value. Callbacks read
from stepsRef.current instead of the captured closure variable, and no
longer need `steps` in their dependency arrays.
2026-03-28 16:42:59 +08:00
semantic-release-bot 6edaaba935 chore(release): 0.17.3 [skip ci]
## [0.17.3](https://github.com/siddharthksah/Stirling-Image/compare/v0.17.2...v0.17.3) (2026-03-28)

### Bug Fixes

* clear search when adding a step from the tool picker ([7b1b019](https://github.com/siddharthksah/Stirling-Image/commit/7b1b019b772a9e36d51e2d696cd5e15312ddc704))
2026-03-28 08:32:54 +00:00
Siddharth Kumar Sah 7b1b019b77 fix: clear search when adding a step from the tool picker
When a tool was selected via search, the search text persisted after
the picker closed. Reopening the picker showed a filtered list instead
of all tools, making it look like clicking tools without searching
didn't work.
2026-03-28 16:32:28 +08:00
Siddharth Kumar Sah 33cd575506 chore: standardize tool count to 30+ across all docs and UI 2026-03-28 16:32:28 +08:00
semantic-release-bot aea0974600 chore(release): 0.17.2 [skip ci]
## [0.17.2](https://github.com/siddharthksah/Stirling-Image/compare/v0.17.1...v0.17.2) (2026-03-28)

### Bug Fixes

* prevent pipeline step settings from resetting on collapse ([9acbedf](https://github.com/siddharthksah/Stirling-Image/commit/9acbedf4b75c6314f659e94f9d0721a40595201d))
2026-03-28 08:18:05 +00:00
Siddharth Kumar Sah 9acbedf4b7 fix: prevent pipeline step settings from resetting on collapse
The settings panel used conditional rendering ({isExpanded && ...})
which unmounted the Controls component on collapse, losing all state.
Switch to CSS hidden class so the component stays mounted and settings
persist when the panel is collapsed and re-expanded.
2026-03-28 16:17:39 +08:00
Siddharth Kumar Sah 1c05bc76e5 refactor: replace TOOL_FIELDS with shared Controls components (DRY)
Extract a *Controls subcomponent from all 16 pipeline-compatible tool
settings components. Each Controls component holds the UI state and
settings controls, accepts an onChange callback, and uses useRef to
prevent infinite re-render loops. The standalone *Settings components
become thin wrappers that add useToolProcessor, useFileStore, and
action buttons.

pipeline-step-settings.tsx is rewritten from ~675 lines to ~55 lines:
the entire TOOL_FIELDS declarative map and generic renderer are deleted
and replaced with direct imports of the Controls components. Pipeline
steps now render the exact same UI as standalone tool pages.

Special cases:
- CropControls: numeric inputs for pipeline (standalone uses canvas)
- RotateControls: resetSignal prop for post-processing reset
- ColorControls: accepts toolId for tab selection
- StripMetadataControls: checkboxes only (no file inspection)
- RemoveBgControls: already extracted, unchanged
2026-03-28 16:04:42 +08:00
Siddharth Kumar Sah 5a50aecd0b refactor: extract RemoveBgControls for DRY reuse in pipeline steps
Extract the settings controls (subject type, quality, background color)
from RemoveBgSettings into a shared RemoveBgControls component that
accepts settings + onChange props. Both the standalone tool page and the
pipeline step configurator now render the same component, so the UI is
identical and changes only need to be made in one place.
2026-03-28 15:40:39 +08:00
semantic-release-bot e5238f5661 chore(release): 0.17.1 [skip ci]
## [0.17.1](https://github.com/siddharthksah/Stirling-Image/compare/v0.17.0...v0.17.1) (2026-03-28)

### Bug Fixes

* add remove-background settings to pipeline step configurator ([017a715](https://github.com/siddharthksah/Stirling-Image/commit/017a71562ad7b15d7d1abec6cee9f8ab73db2b34))
2026-03-28 07:32:56 +00:00
Siddharth Kumar Sah 017a71562a fix: add remove-background settings to pipeline step configurator
The pipeline step settings had an empty array for remove-background,
showing "No configurable settings" even though the tool supports
model selection and background color. Add AI model selector (u2net,
birefnet-general-lite, birefnet-general, birefnet-portrait, bria-rmbg)
and background color picker matching the standalone tool's options.
2026-03-28 15:32:28 +08:00
semantic-release-bot d5add549af chore(release): 0.17.0 [skip ci]
# [0.17.0](https://github.com/siddharthksah/Stirling-Image/compare/v0.16.4...v0.17.0) (2026-03-28)

### Features

* make AI tools pipeline-compatible and add search to tool picker ([c48bfba](https://github.com/siddharthksah/Stirling-Image/commit/c48bfba879f55591e03a0918d9b8de9618cc8dc0))
2026-03-28 07:09:46 +00:00
Siddharth Kumar Sah c48bfba879 feat: make AI tools pipeline-compatible and add search to tool picker
Register remove-background, upscale, and blur-faces in the pipeline
tool registry via registerToolProcessFn(). These tools keep their
custom HTTP routes (with progress callbacks) for direct use, but now
also provide a simple process function for pipeline/batch execution.

Add a search bar to the pipeline tool picker so users can quickly
find tools by name or description. Uses the existing SearchBar
component and the same filtering pattern as the main tool panel.

Update tests to reflect that these 3 AI tools are now pipeline-
compatible (moved from excluded to included assertions).
2026-03-28 15:09:23 +08:00
semantic-release-bot 6d14e83dcb chore(release): 0.16.4 [skip ci]
## [0.16.4](https://github.com/siddharthksah/Stirling-Image/compare/v0.16.3...v0.16.4) (2026-03-28)

### Bug Fixes

* surface hidden errors and add batch rejection tests ([4a50428](https://github.com/siddharthksah/Stirling-Image/commit/4a504281a34561b47b60d00edaf8914f5a8e0197))
2026-03-28 06:45:35 +00:00
Siddharth Kumar Sah 4a504281a3 fix: surface hidden errors and add batch rejection tests
Fix empty catch blocks in settings dialog (logo upload/delete) and
automate page (pipeline save) that silently swallowed errors. Users
now see error messages when these operations fail.

Add 5 integration tests verifying batch endpoint returns 404 for
custom-route tools (remove-background, upscale, ocr, blur-faces,
erase-object), matching the pipeline rejection tests.
2026-03-28 14:45:14 +08:00
semantic-release-bot 2622ae7bdf chore(release): 0.16.3 [skip ci]
## [0.16.3](https://github.com/siddharthksah/Stirling-Image/compare/v0.16.2...v0.16.3) (2026-03-28)

### Bug Fixes

* remove Google Drive coming soon placeholder from files nav ([658954e](https://github.com/siddharthksah/Stirling-Image/commit/658954ea19e17d1af83d45229ec40397de376042))
2026-03-28 06:40:48 +00:00
Siddharth Kumar Sah 658954ea19 fix: remove Google Drive coming soon placeholder from files nav 2026-03-28 14:40:23 +08:00
semantic-release-bot 51684c0cd2 chore(release): 0.16.2 [skip ci]
## [0.16.2](https://github.com/siddharthksah/Stirling-Image/compare/v0.16.1...v0.16.2) (2026-03-28)

### Bug Fixes

* pipeline only shows compatible tools and displays errors ([0410bf3](https://github.com/siddharthksah/Stirling-Image/commit/0410bf34610aa56391615ab3a95ea77a12668743))
2026-03-28 06:39:17 +00:00
Siddharth Kumar Sah 0410bf3461 fix: pipeline only shows compatible tools and displays errors
The pipeline tool picker was showing all tools, but only tools
registered via createToolRoute() support pipeline execution. Tools
with custom routes (remove-background, upscale, ocr, etc.) would
silently fail with "Tool not found" and the empty catch block hid
the error from users.

Add GET /api/v1/pipeline/tools endpoint that returns the IDs of
pipeline-compatible tools. The frontend fetches this list and filters
the tool picker accordingly. Also surface pipeline execution errors
in the UI instead of swallowing them.
2026-03-28 14:38:48 +08:00
semantic-release-bot 1703dcbcfe chore(release): 0.16.1 [skip ci]
## [0.16.1](https://github.com/siddharthksah/Stirling-Image/compare/v0.16.0...v0.16.1) (2026-03-28)

### Bug Fixes

* trigger browser password save prompt on password change ([565b480](https://github.com/siddharthksah/Stirling-Image/commit/565b4805c7b32af66bb07543c6d3bae2865dbbdd))
2026-03-28 06:24:41 +00:00
Siddharth Kumar Sah 565b4805c7 fix: trigger browser password save prompt on password change
Safari, Chrome, and Firefox only offer to save passwords when they see
a real form submission with page navigation, not fetch() + redirect.

After the change-password API call succeeds, dynamically create a form
with the username and new password (autocomplete=username + new-password),
POST it to "/" causing a real navigation. The browser detects the form
submission with credential fields and prompts to save.

Also make the username field visible (read-only) on the change-password
page since Safari ignores hidden inputs for password detection, and add
autocomplete attributes to the login page fields.
2026-03-28 14:24:13 +08:00
semantic-release-bot 006b7c4509 chore(release): 0.16.0 [skip ci]
# [0.16.0](https://github.com/siddharthksah/Stirling-Image/compare/v0.15.0...v0.16.0) (2026-03-28)

### Features

* add password generator and browser save prompt on change-password page ([7c76c2a](https://github.com/siddharthksah/Stirling-Image/commit/7c76c2a2a0116de8418b0438a3859fc1add419e3))
2026-03-28 06:13:13 +00:00
Siddharth Kumar Sah 7c76c2a2a0 feat: add password generator and browser save prompt on change-password page
Add a "Generate strong password" button that creates a random 16-char
password meeting all requirements (uppercase, lowercase, digit).
Generated passwords are shown in plain text so users can copy them.
Add autocomplete attributes (current-password, new-password, username)
so browsers prompt to save the new credentials after submission.
2026-03-28 14:12:46 +08:00
semantic-release-bot 21675623e7 chore(release): 0.15.0 [skip ci]
# [0.15.0](https://github.com/siddharthksah/Stirling-Image/compare/v0.14.2...v0.15.0) (2026-03-28)

### Features

* add forced password change page on first login ([01cd1d9](https://github.com/siddharthksah/Stirling-Image/commit/01cd1d9f71427319284579b438ad08ede56517a6))
2026-03-28 06:02:41 +00:00
Siddharth Kumar Sah 01cd1d9f71 feat: add forced password change page on first login
The backend sets mustChangePassword=true for all new accounts and
blocks API calls until the password is changed. The frontend was not
handling this flag - it logged the user in and redirected to the
dashboard where every API call silently failed with 403.

Add a /change-password page that is shown when mustChangePassword is
true. The login page now redirects there instead of home, and the
AuthGuard intercepts any direct navigation to force the change first.
2026-03-28 14:02:13 +08:00
semantic-release-bot 1c8a6f10c8 chore(release): 0.14.2 [skip ci]
## [0.14.2](https://github.com/siddharthksah/Stirling-Image/compare/v0.14.1...v0.14.2) (2026-03-28)

### Bug Fixes

* **tests:** remove temp DB cleanup that races with other test files ([b08e006](https://github.com/siddharthksah/Stirling-Image/commit/b08e006512744f13b893e92e9ac20ee6299ab41c))
2026-03-28 04:49:54 +00:00
Siddharth Kumar Sah 9f68960eda docs: rewrite README, add CONTRIBUTING.md, developer and translation guides
Rewrite README to remove AI writing patterns (em dashes, promotional
language, vague claims). Make Quick Start section explicit about default
credentials and forced password change. Add Contributing section linking
to CONTRIBUTING.md, developer guide, and translation guide.

Create CONTRIBUTING.md with issue guidelines, PR workflow, commit
conventions, and development setup. Add developer guide (dev setup,
project structure, how to add a tool) and translation guide (how the
i18n system works, step-by-step for adding a language) to VitePress
docs. Register both new pages in the docs sidebar.
2026-03-28 12:14:24 +08:00
semantic-release-bot a0f68465ac chore(release): 0.14.1 [skip ci]
## [0.14.1](https://github.com/siddharthksah/Stirling-Image/compare/v0.14.0...v0.14.1) (2026-03-28)

### Bug Fixes

* handle migration race condition in concurrent test workers ([ce51065](https://github.com/siddharthksah/Stirling-Image/commit/ce5106524333b9bc7ee214b699d76e4b52371519))
2026-03-28 03:46:26 +00:00
Siddharth Kumar Sah ce51065243 fix: handle migration race condition in concurrent test workers
Drizzle's migrate() throws when multiple vitest workers race to apply
migrations on the same temp database. The DrizzleError wraps a
SqliteError ("table already exists") in its cause chain. Add a
same-process guard and a catch that checks both the outer message and
cause for "already exists" so the second worker continues safely.
2026-03-28 11:45:54 +08:00
semantic-release-bot fb7077cf16 chore(release): 0.14.0 [skip ci]
# [0.14.0](https://github.com/siddharthksah/Stirling-Image/compare/v0.13.1...v0.14.0) (2026-03-28)

### Features

* multi-arch Docker support, security hardening, and test improvements ([6cfa3b0](https://github.com/siddharthksah/Stirling-Image/commit/6cfa3b0c38d81a19b230e1bdbad750dce2783afb))
2026-03-28 03:19:36 +00:00
Siddharth Kumar Sah 6cfa3b0c38 feat: multi-arch Docker support, security hardening, and test improvements
Remove hardcoded --platform=linux/amd64 from Dockerfile so buildx produces
native arm64 images for Apple Silicon and Raspberry Pi. Add audit logging
for auth events, harden file storage with extension whitelists and
double-extension attack prevention, reject null-byte buffers in validation,
add data-testid attributes to all tool settings components, update
deployment docs with architecture notes and correct CI workflow references,
and fix unit test mock to match throwWithMessage error extraction.
2026-03-28 11:19:09 +08:00
semantic-release-bot 8f09c0678b chore(release): 0.13.1 [skip ci]
## [0.13.1](https://github.com/siddharthksah/Stirling-Image/compare/v0.13.0...v0.13.1) (2026-03-27)

### Bug Fixes

* **docs:** remove hero logo from home page ([d3f6bac](https://github.com/siddharthksah/Stirling-Image/commit/d3f6bac62b7e01e3a39371a1a52d865909412117))
2026-03-27 12:55:10 +00:00
Siddharth Kumar Sah d3f6bac62b fix(docs): remove hero logo from home page 2026-03-27 20:54:46 +08:00
semantic-release-bot 55df7dd768 chore(release): 0.13.0 [skip ci]
# [0.13.0](https://github.com/siddharthksah/Stirling-Image/compare/v0.12.1...v0.13.0) (2026-03-27)

### Features

* **docs:** add gem logo to GitHub Pages nav bar and home hero ([98478e2](https://github.com/siddharthksah/Stirling-Image/commit/98478e271934c8b3deb1b3003d88fe1a165e75a0))
2026-03-27 12:52:29 +00:00
Siddharth Kumar Sah 98478e2719 feat(docs): add gem logo to GitHub Pages nav bar and home hero 2026-03-27 20:52:06 +08:00
Siddharth Kumar Sah 8ae1d8cec3 docs: slim down REST API page to quick-start guide
The full API reference now lives at /api/docs (Scalar). This page
becomes a getting-started guide covering auth, tool pattern, tool IDs,
batch, pipelines, and errors — pointing to the interactive docs for
per-endpoint details.
2026-03-27 17:36:58 +08:00