mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-08-11 00:30:12 -04:00
2.1 KiB
2.1 KiB
Storage Locations (#1004)
Structured storage locations let you manage physical shelves, drawers, and dryboxes as a catalog instead of free-text only.
Architecture
locationstable — catalog of named storage spots (name+ case-insensitivename_key).spool.location_id— source of truth for structured assignment.spool.storage_location— denormalized display string and Spoolman wire format; always derived on write vialocation_service.resolve_spool_location_fields().- Frontend — spool form sends only
location_id; backend fillsstorage_location.
Location vs Storage Location vs AMS Location
| UI label | Meaning |
|---|---|
| Location (inventory table column) | AMS slot or printer assignment (e.g. H2D-1 B4) |
| Storage Location | Physical shelf/drawer where the spool lives when not in AMS |
| Locations page | Catalog of named storage spots with spool counts |
Managing locations
- Open Inventory → Locations
- Click Add Location and enter a name (e.g.
Regal Etage 2) - Assign spools via the spool edit form Storage Location dropdown
- Click a location row to filter inventory by that shelf
Spoolman mode
Bambuddy keeps a local location catalog. When Spoolman integration is enabled:
- Assigning a location writes the location name to Spoolman's
locationfield - Listing locations syncs distinct names from Spoolman into the catalog
- Renaming a location bulk-renames spools in Spoolman via
PATCH /location/{old}
Upgrade migration
Existing free-text storage_location values are automatically imported into the location catalog and linked on upgrade (case-insensitive dedup via name_key).
Testing before release
./test_frontend.sh— i18n parity, lint, Vitest./test_backend.sh— Ruff, pytest (includestest_locations_api.py,test_location_service.py)- Manual: assign a spool to a location → open Locations → spool count updates without reload
- Companion PR in bambuddy-wiki (user-facing guide)