Commit Graph
1235 Commits
Author SHA1 Message Date
Marco Thiel 4854e322dc docs: add MCP server to integrations list (#890)
Add spoolman-mcp to the list of integrations. It's a Model Context
Protocol server that lets you manage your filament inventory through
AI assistants like Claude.
2026-07-07 11:05:19 +02:00
dependabot[bot] ad79373dd0 Bump uuid from 13.0.2 to 14.0.0 in /client (#927)
Bumps [uuid](https://github.com/uuidjs/uuid) from 13.0.2 to 14.0.0.
- [Release notes](https://github.com/uuidjs/uuid/releases)
- [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v13.0.2...v14.0.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-version: 14.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-07 10:52:29 +02:00
Donkie 5c8364fcea Remove hashes from requirements.txt 2026-07-07 10:12:35 +02:00
Donkie 2c638da22a Auto-merge Weblate translation PRs on green CI
Weblate opens a PR for every translation sync. These are machine-generated,
always scoped to client/public/locales/, and gated by the full CI suite, so
hand-merging each one is pure friction. This enables GitHub auto-merge on
Weblate-authored PRs so they merge themselves once required checks pass.

A scope-guard step reads the PR's file list from the API and refuses to enable
auto-merge unless every changed file is a .json under client/public/locales/,
so the trust is in the diff, not just the author: a compromised Weblate token
can open a PR but can only be auto-merged if it is confined to translations.

Claude-Session: https://claude.ai/code/session_01BQjJiwEbu6bHbeDjPPDm3V
2026-07-07 10:11:28 +02:00
chruoss 295265f60d Update sync interval for external database synchronization (#943)
The external database sync scheduler was ignoring the configured
EXTERNAL_DB_SYNC_INTERVAL environment variable and always using the DEFAULT_SYNC_INTERVAL constant (3600 seconds).
2026-07-07 10:07:21 +02:00
Donkie 4f6763716c Merge pull request #919 from velzi/export
Allow archived spool export
2026-07-07 09:49:36 +02:00
Donkie 48ad01b09b Add CI guard blocking manual edits to non-English translations
Non-English locales are managed exclusively through Weblate; any manual
edit to an existing translation file gets silently overwritten on the
next Weblate sync. This workflow fails any PR (except Weblate's own,
detected via PR author login) that modifies or deletes an existing
non-English file under client/public/locales/. Adding a brand-new
language file is still allowed so contributors can bootstrap a new
language alongside the client/src/i18n.ts entry.

Claude-Session: https://claude.ai/code/session_01BQjJiwEbu6bHbeDjPPDm3V
2026-07-07 09:35:12 +02:00
Donkie d9fd44eab9 Add Playwright frontend integration tests; fix broken SPA static serving
Add a browser-driven integration suite (tests_frontend/) that runs against
the real production image + PostgreSQL and drives the UI with Playwright:
a smoke test that navigates every page via the sidebar with no console
errors, and a CRUD test that creates a vendor -> filament -> spool entirely
through the UI. Wired up as `poe itest-frontend` and a new `test-frontend`
CI job (reusing the image built for the backend tests, gating releases).

Navigation goes through real UI buttons (language-independent link targets)
and the app language is forced to English so label matchers are stable
regardless of the runner's browser locale.

This immediately caught a real regression: Starlette 1.3.1 (pulled by a
recent dep bump) removed the `method` kwarg from FileResponse, so
SinglePageApplication 500'd on every static asset and the whole UI was dead.
Drop the removed kwarg — Starlette now derives HEAD handling from the scope.

Claude-Session: https://claude.ai/code/session_01BQjJiwEbu6bHbeDjPPDm3V
2026-07-07 09:12:42 +02:00
Donkie da54ead06f Bump deps to clear Dependabot alerts (path-to-regexp, pytest)
- path-to-regexp: force >=8.4.0 (8.4.2) under @ant-design/pro-layout via a
  scoped npm override, fixing the ReDoS advisories (GHSA sequential optional
  groups + multiple wildcards). Express keeps its own 0.1.x.
- pytest 8.3 -> 9.1.1 and pytest-asyncio 0.23/0.25 -> 1.4.0 in
  tests_integration/requirements.txt and the dev group; regenerated uv.lock.

Verified: client build + typecheck pass, npm audit clean, and the full
integration suite (223 tests) passes on postgres, sqlite, mariadb, and
cockroachdb under podman.

Claude-Session: https://claude.ai/code/session_01BQjJiwEbu6bHbeDjPPDm3V
2026-07-06 20:39:46 +02:00
Donkie 9b6af119c6 Fix commit-before-notify races in write paths (flaky postgres deletes)
Several DB write functions mutated and then sent their websocket notification (or
just returned) without committing, relying on the request session's teardown
commit. On async postgres that commit races the HTTP response, so a fast
follow-up read could still see the pre-write state — e.g. `DELETE /vendor/{id}`
returns 200 but an immediate `GET` still returns 200. Latent since 2023 (a6d527a);
the async-timing dependency bump widened the window enough to intermittently fail
`test (postgres)` in CI.

Commit inline before notifying, matching the functions that already did
(filament.delete, vendor/spool create/update) and the commit-first invariant from
the earlier websocket-ordering fix:
- vendor.delete, spool.delete
- setting.update, setting.delete
- vendor/filament/spool.clear_extra_field
- spool.rename_location

(use/measure already commit via their wrappers; reads are unaffected.)

Verified via `SPOOLMAN_CONTAINER_ENGINE=podman poe itest`: full 4-DB suite green
plus 7/7 repeat postgres runs with zero flakes (was ~66% failing before).
2026-07-06 15:53:40 +02:00
Donkie 3a3273d9a9 Merge PR #798 (current head): tidy unprivileged Docker support
Brings in the latest #798 commit (388082f) that our earlier merge missed: it
drops --chown from the builder COPYs (matching the Podman build fix already on
master), removes the redundant `usermod -G users app`, and simplifies the
entrypoint to re-exec itself via gosu when root instead of duplicating the
uvicorn invocation. Dockerfile comment conflict resolved in favour of the
Podman-explaining comment.
2026-07-06 15:22:03 +02:00
Donkie c81920d23c Merge PR #798: conditional permission drop for unprivileged Docker
Brings in jpiccari's unprivileged-Docker support (rootless entrypoint that only
uses gosu when running as root and only remaps app UID/GID when they differ, plus
dropping the redundant `groupmod -g 1000 users` in the runner stage).

Combines cleanly with the Podman build/test enablement already on master
(builder-stage --chown removal, postgres healthcheck, run.py engine selection),
giving full rootless build + run + test support.
2026-07-06 15:14:49 +02:00
Donkie e3c5f3fc1d Make the integration test suite runnable under Podman
Running tests_integration against rootless Podman surfaced three issues; none
affect the Docker/CI path:

- run.py: add a SPOOLMAN_CONTAINER_ENGINE env var (defaults to "docker") so the
  build/compose commands can be driven by podman instead.
- Dockerfile: drop `--chown=app:app` from the builder-stage COPYs. The "app"
  user only exists in the runner stage; Docker/BuildKit tolerated the dangling
  reference but Podman rejects it. Final ownership is unchanged — it is set when
  the files are copied into the runner stage.
- docker-compose-postgres.yml: add a pg_isready healthcheck and gate spoolman on
  `condition: service_healthy`, matching the mariadb/cockroachdb compose files.
  Without it spoolman raced postgres' initdb and died on connection-refused
  before running migrations.

Verified: full 4-DB suite (sqlite/postgres/mariadb/cockroachdb) green via
`SPOOLMAN_CONTAINER_ENGINE=podman uv run poe itest` — 223 tests each.
2026-07-06 12:16:17 +02:00
Donkie 4e3c228b28 Update client dependencies (npm update)
Refresh transitive client dependencies to the latest versions within the
existing package.json semver ranges (package.json unchanged).

Verified: npm ci, tsc --noEmit, eslint, prettier --check, and npm run build all
pass. (3 high-severity advisories remain that require major/breaking bumps via
`npm audit fix --force`; left for a separate, deliberate change.)
2026-07-06 12:05:25 +02:00
Donkie 059ff94f4b Update Python dependencies (uv lock --upgrade)
Refresh all backend dependencies to the latest versions allowed by the
pyproject constraints and regenerate requirements.txt to match. Notable bumps:
starlette 0.50 -> 1.3, fastapi 0.128 -> 0.139, cryptography 46 -> 49,
uvicorn 0.40 -> 0.50, pydantic 2.12 -> 2.13, sqlalchemy 2.0.45 -> 2.0.51,
alembic 1.17 -> 1.18.

Locally verified: uv sync, ruff check, uv lock --check, app import, and a live
startup smoke (SQLite) — migrations run, /health + /info respond, vendor CRUD
works, and a websocket update event is delivered correctly on starlette 1.x.
The Docker-based 4-DB integration suite still needs to run (CI).
2026-07-06 12:05:25 +02:00
Donkie 9f30c16e4b Document that extra field values are JSON-encoded strings (#849)
The `extra` map on vendors, filaments and spools is intentionally typed as
dict[str, str] where every value is a JSON-encoded string (the client round-
trips them through JSON.parse/stringify). This surprised API consumers, who
saw numeric fields come back as strings.

Spell out the encoding on all three response models via a shared helper so the
generated OpenAPI docs make clear that consumers must JSON-decode each value.
No behaviour change.
2026-07-06 11:50:31 +02:00
Donkie 14a30bc3c5 Commit generated requirements.txt for bare-metal/Moonraker installs (#830)
requirements.txt was moved to .gitignore when the project switched to uv, so
bare-metal installs lost it. Moonraker's update_manager runs
`pip install -r requirements.txt` against the checkout, so upgrading to 0.23
broke with "Invalid path for option `requirements`".

Track requirements.txt again and regenerate it from uv on every release
(spoolman/bump.py exports it alongside the uv.lock bump), keeping uv as the
single source of truth while staying backwards compatible with installs that
expect a requirements.txt.
2026-07-06 11:50:22 +02:00
Donkie 025f18f914 Fix spool price disappearing from the list on live updates (#814)
The REST endpoints serialize with response_model_exclude_none=True (unset fields
are omitted), but websocket events were serialized with a plain .json() that
includes unset fields as explicit null. The spool list fills a missing price
from the filament price only when it is `undefined`, so a live update carrying
`price: null` (e.g. after a quick weight adjust) blanked the price column until
a full page reload.

Fixed on both sides so the two serialization paths can no longer drift:
- Server: websocket payloads now use exclude_none=True (spoolman/ws.py), giving
  live updates and REST responses an identical shape. Note this is a small
  websocket wire-format change external consumers will see: unset fields are now
  omitted instead of sent as null, matching REST.
- Client: collapseSpool and the price column now fall back for both `null` and
  `undefined`, keeping the list resilient regardless of serialization.
2026-07-06 11:50:07 +02:00
Joshua Piccari 388082f27a Tidy up docker file and entrypoint 2026-04-26 14:29:48 -07:00
Veli-Matti Leppänen 7fae319b82 Allow archived spool export 2026-04-21 09:49:30 +03:00
Joshua Piccari 137558639a Add conditional logic to drop permissions for unprivileged Docker
This change enables the container to run in unprivileged mode (without
--privileged or additional capabilities) by making permission drops
conditional:

- Changed users group GID from 1000 to 1001 to avoid conflicts with
  the app user's primary group (UID 1000)
- Only modify user/group IDs when PUID/PGID environment variables differ
  from the default value of 1000, avoiding unnecessary privilege
  requirements
- Skip su-exec entirely when running as the default user, since changing
  user context requires additional capabilities that unprivileged
  containers don't have

This allows the container to work in restricted environments like
Kubernetes with security contexts or rootless Docker while maintaining
backward compatibility for users who customize PUID/PGID.

Fixes Donkie#791
2026-02-28 10:43:50 -08:00
Donkie eafbc64937 Bump version to 0.23.1 v0.23.1 2026-02-03 16:27:38 +00:00
Donkie 1be0884729 Merge pull request #822 from Donkie/dependabot/npm_and_yarn/client/lodash-es-4.17.23
Bump lodash-es from 4.17.22 to 4.17.23 in /client
2026-01-27 21:52:28 +01:00
Donkie e77bea1bc2 Merge pull request #823 from Donkie/dependabot/npm_and_yarn/client/lodash-4.17.23
Bump lodash from 4.17.21 to 4.17.23 in /client
2026-01-27 21:52:11 +01:00
Donkie 5dc26946cb Merge pull request #831 from nyanotech/asdf
explicitly disable pagination for useSelect
2026-01-27 21:51:13 +01:00
nyanotech 34c09d3f55 explicitly disable pagination for useSelect 2026-01-27 03:39:48 -08:00
Donkie 7f14cbdaa9 Added rsa variant of aiomysql to add support for better mysql password methods. 2026-01-24 15:59:53 +01:00
Donkie 115e29bdaf Bump version to 0.23.0 v0.23.0 2026-01-23 20:21:50 +00:00
Donkie 6d817d8c2b Fix package.json not being written with newline at end of file 2026-01-23 21:21:00 +01:00
Donkie c033a3ffe6 Fix trigger release ci 2026-01-23 21:09:39 +01:00
Donkie 1974d4b8d2 Version bump updates 2026-01-23 21:07:45 +01:00
dependabot[bot] c3ef318cb0 Bump lodash from 4.17.21 to 4.17.23 in /client
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-22 09:57:45 +00:00
dependabot[bot] bc442f5063 Bump lodash-es from 4.17.22 to 4.17.23 in /client
Bumps [lodash-es](https://github.com/lodash/lodash) from 4.17.22 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/commits/4.17.23)

---
updated-dependencies:
- dependency-name: lodash-es
  dependency-version: 4.17.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-22 02:00:21 +00:00
Donkie dd0476ced3 Don't use uv specific image in dockerfile, it doesn't support armv7 2026-01-20 22:11:46 +01:00
Donkie 6f9dfd1be7 uvicorn logging fixes 2026-01-19 20:47:06 +01:00
Donkie 29aa9f8d54 Fix fastapi deprecation notices 2026-01-19 20:40:38 +01:00
Donkie 251f7e2ede Removed max height from locations page
Fixes #816
2026-01-19 20:36:11 +01:00
Donkie f137535c1e Merge pull request #811 from kaufi95/master
Bugfix for issue #803 and #805
2026-01-18 23:02:37 +01:00
Donkie fb83220739 Merge pull request #777 from beikeland/AplhanumericQR
All caps short QR codes for alphanumerical encoding
2026-01-18 22:54:10 +01:00
Donkie fdf317fc13 Merge pull request #817 from Donkie/dependabot/uv/setuptools-78.1.1
Bump setuptools from 76.1.0 to 78.1.1
2026-01-18 22:53:36 +01:00
Donkie 205a5c52fa Merge pull request #786 from mnebelung/master
Add support for Fedora to install.sh
2026-01-18 22:45:49 +01:00
Donkie f585c51b18 Merge branch 'master' into master 2026-01-18 22:45:29 +01:00
dependabot[bot] b393f822e8 Bump setuptools from 76.1.0 to 78.1.1
Bumps [setuptools](https://github.com/pypa/setuptools) from 76.1.0 to 78.1.1.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v76.1.0...v78.1.1)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-version: 78.1.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-18 21:30:53 +00:00
Donkie 7cc3bef46f Merge pull request #809 from Donkie/uv
Multiple maintenance updates
2026-01-18 22:29:54 +01:00
Donkie 8a29ce063a Update ci.yml 2026-01-18 17:30:55 +01:00
Donkie fa6343c368 Fix artifact job 2026-01-18 17:11:54 +01:00
Donkie 1cd8c7a962 Added ci job to produce artifact package for all builds 2026-01-18 17:05:00 +01:00
Donkie b361aee956 CI fixes 2026-01-18 16:55:31 +01:00
kaufi95 c179a38f03 fix for issue #803 2026-01-11 00:01:23 +01:00
kaufi95 6e9f6e5af4 fix for issue #805 2026-01-11 00:00:11 +01:00