Commit Graph
1565 Commits
Author SHA1 Message Date
Donkie 88f222d613 client_v2: record ultra-wide layout findings for #1033
Measurements at 3440/2560/1920/1440 against a 156-spool library, plus the
approaches tried and why each was rejected. Notes only, no layout changes.
2026-08-11 22:18:38 +02:00
github-actions[bot] 34a990efcf Merge pull request #1063 from Donkie/weblatev2
Translations update from Hosted Weblate
2026-08-11 03:14:38 +00:00
Taylan Tatlı 7eaf37fa35 Translated using Weblate (Turkish)
Currently translated at 29.2% (157 of 537 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/tr/
2026-08-11 03:01:01 +00:00
KnightArch f462245622 Translated using Weblate (Portuguese (Brazil))
Currently translated at 26.8% (144 of 537 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/pt_BR/
2026-08-11 03:00:56 +00:00
Micha a46caaabf5 Translated using Weblate (German)
Currently translated at 50.6% (272 of 537 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/de/
2026-08-11 03:00:52 +00:00
github-actions[bot] 3843785690 Merge pull request #1061 from Donkie/weblate
Translations update
2026-08-10 05:55:58 +00:00
KnightArch a17e351e25 Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.6% (292 of 293 strings)

Co-authored-by: KnightArch <knightarch@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/spoolman/web-client/pt_BR/
Translation: Spoolman/Web Client LEGACY
2026-08-10 05:51:26 +00:00
dimquea 9bcaece766 Translated using Weblate (Russian)
Currently translated at 99.3% (291 of 293 strings)

Co-authored-by: dimquea <dimquea@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/spoolman/web-client/ru/
Translation: Spoolman/Web Client LEGACY
2026-08-10 05:51:24 +00:00
github-actions[bot] 292f8ee305 Merge pull request #1058 from Donkie/weblatev2
Translations update from Hosted Weblate
2026-08-09 20:01:26 +00:00
Micha 423c06abc8 Translated using Weblate (German)
Currently translated at 35.1% (182 of 518 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/de/
2026-08-09 21:56:39 +02:00
Donkie 7dc17f12da Merge pull request #1054 from Donkie/client-v2-date-filters
client_v2: filter the library by date
2026-08-09 21:56:27 +02:00
Donkie bfabb54c3c Merge pull request #1056 from Donkie/client-v2-add-flow-sections
client_v2: separate manufacturer, filament and spool in the add flow
2026-08-09 21:53:59 +02:00
Donkie dd16672a4a Parse the datetime range grammar in one place
The previous commit claimed the built-in timestamps and the datetime extra
fields share a grammar, then wrote that grammar out twice: once in
add_where_clause_datetime_opt for the typed columns, once inline in
add_where_clause_extra_field for the JSON-stored ones. Two copies of a
grammar drift, which would quietly falsify the thing the change was for.

The `<start>|<end>` split and its "at least one end" rule now live in
split_datetime_range_filter, which both call.

Only the parsing is shared, because only the parsing can be: an extra
field is JSON text in a joined key/value table, reached through a subquery,
while a built-in is a typed column on the row. The comparison that follows
the split therefore stays separate, and the two are not equivalent. The
built-in path parses the bound and compares real datetimes; the extra-field
path compares decoded ISO strings, so an offset or a missing '.000' changes
the answer there and not here. That asymmetry is now written down at both
sites, and tracked in #1057.
2026-08-09 21:52:10 +02:00
Donkie 587521eff6 client_v2: reword the manufacturer section note 2026-08-09 21:45:52 +02:00
Donkie 2c84acfd24 Filter dates with the grammar the extra fields already use
The two commits before this one invented `<field>_after`, `<field>_before`
and `<field>_unset` for the built-in timestamps. That was a third way to
ask a question this API already answers: extra-field filters have taken
`<start>|<end>` for datetimes and `<min>:<max>` for numbers since v0.26.0,
with an empty value meaning "unset", the same as it means for `location`
or `lot_nr`.

Two grammars for one question is bad on its own, but the split was worse
than cosmetic. Someone who learned `extra.opened_on=2025-01-01T00:00:00Z|`
and tried `last_used=2025-01-01T00:00:00Z|` got every spool back, because
an unknown query param is silently ignored.

So the eight parameters become three, named after their columns and
taking the shipped grammar:

    /spool?last_used=2026-08-01T00:00:00Z|      since
    /spool?last_used=|2026-01-01T00:00:00Z      until
    /spool?last_used=<start>|<end>              between
    /spool?last_used=                           never used

Commas OR several of those, and quotes are accepted and ignored, so every
filter on the endpoint is spelled the same way. `_unset` disappears: the
empty value already means unset everywhere else here. No new convention
enters the API, and the next filterable column costs one parameter rather
than three.

Two consequences worth naming. Malformed input is now a 400 with a message
instead of FastAPI's automatic 422, matching the other unparseable filters
on this endpoint. And "has a timestamp" (the old `_unset=false`) has no
spelling any more, because the shipped grammar has none; nothing offered
it in the UI.

The client is unchanged apart from how it builds the request. The chip
value in the app URL keeps its own grammar, since it also carries relative
offsets and "never", neither of which the API takes.
2026-08-09 15:18:46 +02:00
Donkie 43bf140675 client_v2: separate manufacturer, filament and spool in the add flow
Step 2 of the add-spool modal creates up to three records at once, but laid
them out as one flat run of fields, so there was no way to tell which record
a field would land on. The vendor combobox in particular sat among the
filament fields while quietly creating a second entity.

Lay the step out as one labelled block per entity: the manufacturer and the
new filament each get their own card, and the spool fields get a heading of
their own instead of just following on. Weight, spool weight and price are
written to both the new filament and the spool, so say so rather than let
the headings imply otherwise.

Closes #1038
2026-08-09 11:19:40 +02:00
Donkie b6d220a3ef Filter the library by spools that have never been used
A date range cannot express "no date at all": a NULL fails every
comparison, so no bound, however far back it reaches, selects the spools
that have never been used. That state needed a filter of its own.

Backend: /spool and /spool/group take first_used_unset / last_used_unset.
True matches only the spools missing that timestamp, false only those
that have one. Registered gets no such param — the server sets it at
creation and a spool never lacks one.

Client: the chip value `never` sits alongside the range grammar, and
Last Used / First Used offer it under their presets. It is labelled
"Never", deliberately not "unused": the list already calls a spool unused
when no weight has come off it, which is a different claim — a spool can
be unused and still carry a last_used date, or have used weight and no
date at all.
2026-08-09 11:02:26 +02:00
github-actions[bot] 421ad925a7 Merge pull request #1053 from Donkie/weblatev2
Translations update from Hosted Weblate
2026-08-09 08:56:32 +00:00
dimquea 01f13357b4 Translated using Weblate (Russian)
Currently translated at 75.8% (393 of 518 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/ru/
2026-08-09 08:51:30 +00:00
변성운 e5daed84e6 Translated using Weblate (Korean)
Currently translated at 100.0% (518 of 518 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/ko/
2026-08-09 08:51:27 +00:00
Sungjun Park bd244e8387 Translated using Weblate (Korean)
Currently translated at 100.0% (518 of 518 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/ko/
2026-08-09 08:51:26 +00:00
변성운 d81e43aa56 Translated using Weblate (Korean)
Currently translated at 100.0% (518 of 518 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/ko/
2026-08-09 08:51:25 +00:00
변성운 18e31bf4b1 Translated using Weblate (Korean)
Currently translated at 100.0% (518 of 518 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/ko/
2026-08-09 08:51:24 +00:00
변성운 dd8e7868be Translated using Weblate (Korean)
Currently translated at 100.0% (518 of 518 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/ko/
2026-08-09 08:51:23 +00:00
Donkie 179ea3b4d0 Filter the library by date range
The library could filter by every discrete property a spool has but by
none of its timestamps, so "what have I used this week" and "what has
been sitting untouched for a year" were questions the UI could not ask.

Backend: /spool and /spool/group take first_used / last_used /
registered `_after` and `_before` bounds, each optional, inclusive, and
resolved against the UTC-naive form the columns store (an offset-aware
value is converted; a naive one is read as UTC). A spool with no
timestamp matches neither end.

Client: the Filter menu gains the three timestamps, each opening presets
(last 24 hours ... older than 1 year) plus a custom range whose empty
end means open. A range lives in the URL as a chip value, `<from>..<to>`,
where an end is a calendar day or an offset back from now. Relative ends
stay relative all the way into the URL and are resolved at request time,
so a bookmarked "last 24 hours" keeps meaning the last 24 hours instead
of drifting into "since the day I made it".
2026-08-09 09:53:42 +02:00
Donkie 64d41c78b3 Merge pull request #1049 from Donkie/dependabot/npm_and_yarn/client/js-yaml-3.15.1
Bump js-yaml from 3.15.0 to 3.15.1 in /client
2026-08-09 08:22:14 +02:00
dependabot[bot] 352d36cb86 Bump js-yaml from 3.15.0 to 3.15.1 in /client
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.15.0 to 3.15.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/3.15.1/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.15.0...3.15.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 3.15.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-08 20:50:40 +00:00
Donkie 56c181f634 Merge pull request #1048 from Donkie/deps/batch-1018-1022-1030
build(deps): bump cryptography, fast-uri and postcss
2026-08-08 22:33:18 +02:00
github-actions[bot] 8b00fc0d43 Merge pull request #1047 from Donkie/weblate
Translations update
2026-08-08 18:55:50 +00:00
변성운 2225db0b5f Translated using Weblate (Korean)
Currently translated at 100.0% (293 of 293 strings)

Co-authored-by: 변성운 <kamyu1537@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/spoolman/web-client/ko/
Translation: Spoolman/Web Client LEGACY
2026-08-08 20:51:26 +02:00
Miloslav Kos 30fa35d38b Translated using Weblate (Czech)
Currently translated at 100.0% (293 of 293 strings)

Co-authored-by: Miloslav Kos <kos.m@post.cz>
Translate-URL: https://hosted.weblate.org/projects/spoolman/web-client/cs/
Translation: Spoolman/Web Client LEGACY
2026-08-08 20:51:24 +02:00
Donkie 8680805416 build(deps): bump fast-uri to 3.1.5 and postcss to 8.5.26 in /client 2026-08-08 20:23:51 +02:00
Donkie aa83c0c1e9 build(deps): bump cryptography from 49.0.0 to 50.0.0 2026-08-08 20:23:14 +02:00
Donkie 7f19ff0952 Merge pull request #1046 from Donkie/client-v2-numeric-inputs
client_v2: accept decimal commas in every numeric field
2026-08-08 20:10:03 +02:00
Donkie e09d63b443 client_v2: accept decimal commas in every numeric field
Most of the world writes 1,75 rather than 1.75, and `<input type="number">`
only accepts the separator the browser locale dictates: everything else it
reports as an empty value. A user typing a comma therefore watched a weight
or a diameter silently come out blank or, once the separator was dropped,
a hundred times too large. The same input type also accepts "e", "+" and "-"
anywhere in the text, since they are legal exponent syntax, and then reports
the whole value as empty too, so "1e" read back as nothing at all.

Numeric fields are now text inputs with `inputmode="decimal"`, guarded by a
shared `numericInput` action that filters at the keystroke: both separators
go in, letters cannot, and a pasted "12,5 g" is cleaned rather than refused.
Reading is centralised in `parseDecimal`, which takes either separator and
returns null instead of NaN for text that is not a number, so an unset field
stays distinguishable from a real 0. What the parent, and the API, receive is
always canonical.

The typed separator stays on screen: each field keeps a draft of the text and
gives it up only when the value moves somewhere that text no longer means, so
storing 1.5 does not rewrite a typed "1,5" between keystrokes. Arrow-key
stepping, which was native to the old input type, is now the component's own.

Covers the spool/filament/vendor inspectors, the add-spool modal (whose price
box was a bare text input accepting anything at all), extra fields of every
numeric type, the extra-field editor's order box and the low-stock threshold.
2026-08-08 19:42:39 +02:00
github-actions[bot] 41e6c65199 Merge pull request #1043 from Donkie/weblatev2
Translations update from Hosted Weblate
2026-08-08 08:17:22 +00:00
변성운 d7c2e52a67 Translated using Weblate (Korean)
Currently translated at 69.0% (355 of 514 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/ko/
2026-08-08 08:12:32 +00:00
Sungjun Park 4ad904d270 Translated using Weblate (Korean)
Currently translated at 69.0% (355 of 514 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/ko/
2026-08-08 08:12:32 +00:00
변성운 9b652b5d77 Translated using Weblate (Korean)
Currently translated at 69.0% (355 of 514 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/ko/
2026-08-08 08:12:31 +00:00
Donkie dd13f6ea34 Merge pull request #1042 from Donkie/client-v2-label-export-formats
client_v2: pluggable label export formats, add AML
2026-08-08 10:12:11 +02:00
Donkie 4e3e0e849d tests_frontend_v2: follow the label export rename, cover AML
The export mode button is "Files" now, not "Image files", and the action is
"Save as PNG" / "Save as AML" rather than "Save as Image", so the label spec
timed out clicking a button that no longer exists.

While updating it, split the export step in two and assert both formats:
the PNG carries the layout's resolution in its pHYs chunk (300 dpi = 11811
px/m), and the AML is an LPAPI document embedding the same raster. That makes
the .aml path covered end to end against a real deployment, which is as close
as CI can get without a label printer.
2026-08-08 10:07:47 +02:00
Donkie c321346571 Merge pull request #1041 from Donkie/client-v2-remember-view
client_v2: remember the library's grouping and sorting
2026-08-08 10:07:10 +02:00
Donkie 93f49449a0 client_v2: restore the remembered view by navigating, not by parsing
Folding the remembered grouping into parseLibraryState left the address
bar saying nothing while the list was grouped, and that gap broke the
group control: picking the default grouping serialises back to the very
same bare URL, and an unchanged URL means SvelteKit reuses its cached
load, so the choice never took effect. The load was also no longer a
pure function of the URL, which is what that per-URL cache assumes -
preloading the nav tab cached a redirect built from the old preference
and replayed it.

The page now navigates on arrival to the URL that spells the remembered
view out, replacing the history entry. The load goes back to reading the
URL alone, the view stays linkable, and every distinct view has a
distinct URL again. Only on arrival: a goto is a choice the user just
made and a popstate is Back, and overruling either would be wrong.
2026-08-08 10:01:10 +02:00
Donkie 538c78e7b3 client_v2: remember the library's grouping and sorting
Group and sort live in the URL, so they survive a reload of a library
link but not a trip to Settings and back: every other route links to a
bare `/`, which handed back the shipped view and made a deliberately
chosen grouping something the user re-picked several times a day.

A URL that mentions neither grouping nor sorting now means "however I
had it last", restored from localStorage; one that mentions either still
wins outright, so a shared link shows its recipient what its sender saw.
Only the layout is remembered - filters, search and archived-visibility
hide spools, and one silently restored days later reads as missing data.

Fixes #1036
2026-08-08 10:00:33 +02:00
Donkie bef99d5891 client_v2: stamp exported PNGs with their real resolution
Label designs are authored in millimeters and rasterized at the layout's
DPI, but canvas.toDataURL() writes no pHYs chunk, so every reader falls back
to 96 dpi. A 50x25mm label exported at 300 dpi opened as a ~156x78mm image,
and printing it "at 100%" produced a label three times too big.

Stamp pHYs with the layout's density on the way out, replacing any existing
chunk and inserting after IHDR so it precedes IDAT as the spec requires.
Anything that doesn't parse cleanly as a chunk stream is passed through
untouched — a wrong DPI beats a corrupted download.

Verified independently with Pillow: the stamped files are valid PNGs and
read back as exactly 300 and 203 dpi.

AML is unaffected; it carries the label size in mm in its own header.
2026-08-08 09:36:28 +02:00
Donkie 2f1a2a2b2d client_v2: make label export pluggable and add .aml
The label designer's "image" mode could only ever write PNG. Move the
encoding step behind a small format registry ($lib/labels/export): the
renderer produces one PNG raster per label, and the selected format turns
that into file bytes. Adding a format is now one module plus a registry
entry, with no changes to the render, download or zip path.

Add AML as the second format. It is the label-document format the companion
apps of most cheap thermal label printers read (Phomemo/Aimo, Niimbot and
friends) — XML carrying the physical label size in mm, wrapping our raster
as a single full-bleed base64 image. That size is the part a bare PNG cannot
express, so the app scales to the loaded media instead of guessing at pixels.

AML has no published spec, so the output is modelled field-for-field on real
.aml files written by those apps; aml.test.ts pins the document, page and
image field sets against a Phomemo PM-241-BT template.

The chosen format is saved per design (PrintLayout.exportFormat) and resolved
leniently, so a design naming a format this build lacks falls back to PNG.
2026-08-08 09:23:30 +02:00
github-actions[bot] 633e1fa2b0 Merge pull request #1040 from Donkie/weblatev2
Translations update from Hosted Weblate
2026-08-08 06:47:39 +00:00
Miloslav Kos 4c1c905a83 Translated using Weblate (Czech)
Currently translated at 82.8% (425 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/cs/
2026-08-08 06:43:28 +00:00
Donkie 71c607122f Merge pull request #1039 from Donkie/client-v2-resizable-list
client_v2: make the library list column resizable
2026-08-08 08:43:14 +02:00
Donkie 16e34da538 client_v2: make the library list column resizable
The list was a fixed 470px, which truncated longer filament names with no
way to see the rest. The divider between the list and the inspector is now
a draggable, focusable separator, and the width is remembered per browser.

Fixes #1034
2026-08-08 08:33:43 +02:00