printhive/lib
dlawler489 48f564c648 Add spools automatically from what the printer has loaded
Every Bambu spool reports an RFID identity — a spool id and a tag id, both
unique — so a printer's report can now keep the Filament page in step: a new
tagged spool is created, named and coded from the bundled filament list; one
already known is moved to its current slot; one you added by hand before the
printer was connected is adopted rather than duplicated; and one the printer no
longer reports is marked as taken out. It runs on "Save & test connection" and
every ten minutes in the background, still only reading from the printer.

Untagged spools are listed, not stored: without a tag, one spool of a colour is
indistinguishable from the next, so guessing would mean duplicates.

The planning is a pure function, tested against the cases that would cause
duplicates. The database side was exercised separately against a real
Postgres: three successive reports created, moved and unloaded spools as
intended, and a deliberate duplicate was refused by the partial unique index.

The amount left isn't taken from the printer yet: an AMS lite only reports full
or empty, so it's left blank until printers can say which kind of AMS they have.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 20:39:30 +10:00
..
importers Don't retry MakerWorld's anti-bot refusal 2026-09-16 12:53:36 +10:00
ai.js Sturdier AI replies: format example, more retries, and errors that show the reply 2026-09-15 20:26:42 +10:00
aiRuns.js Name every model an AI run failed on, and let a finished run retry them 2026-09-16 14:08:08 +10:00
archives.js Browse archives, preview companion files, and view FBX/STEP/3DM/OBJ+MTL 2026-09-15 07:36:47 +10:00
archiveWorker.js Browse archives, preview companion files, and view FBX/STEP/3DM/OBJ+MTL 2026-09-15 07:36:47 +10:00
auth.js Open models in your slicer and drag files out 2026-09-15 09:15:37 +10:00
autotag.js AI tags and descriptions, search by meaning, and automatic tags 2026-09-15 11:12:58 +10:00
collectionWatch.js Let a watch download files as models arrive 2026-09-16 19:18:55 +10:00
converter.js Track the filament you have, and what each model asks for 2026-09-17 11:18:54 +10:00
db.js Stop tagging deadlocking, and retry a transaction that loses one 2026-09-16 14:56:28 +10:00
duplicates.js Add duplicate finder, trash, notes, and library search/filters 2026-09-14 23:06:09 +10:00
embeddingModel.js AI tags and descriptions, search by meaning, and automatic tags 2026-09-15 11:12:58 +10:00
embeddings.js AI tags and descriptions, search by meaning, and automatic tags 2026-09-15 11:12:58 +10:00
filaments.js Add spools automatically from what the printer has loaded 2026-09-17 20:39:30 +10:00
fileProcessor.js Browse archives, preview companion files, and view FBX/STEP/3DM/OBJ+MTL 2026-09-15 07:36:47 +10:00
fingerprint.js Track the filament you have, and what each model asks for 2026-09-17 11:18:54 +10:00
flaresolverr.js Give downloads a deadline instead of hanging for ever 2026-09-16 17:50:48 +10:00
handoff.js Open models in your slicer and drag files out 2026-09-15 09:15:37 +10:00
licenses.js Add per-license commercial-use rules (settings + auto-register) 2026-06-23 10:20:28 +10:00
mailer.js Add email/password auth + SMTP password resets 2026-06-22 22:33:11 +10:00
printer.js Add spools automatically from what the printer has loaded 2026-09-17 20:39:30 +10:00
python.js Stream-parse 3MF files so Bambu projects don't exhaust memory 2026-09-15 07:02:00 +10:00
spoolSync.js Add spools automatically from what the printer has loaded 2026-09-17 20:39:30 +10:00
store.js Let the required colours be edited on the model page 2026-09-17 13:15:48 +10:00
thumbnails.js Make thumbnails on the server in the background 2026-09-15 07:54:26 +10:00