Commit Graph
1676 Commits
Author SHA1 Message Date
maziggy e4bdddcde1 Housekeeping 2026-03-09 12:35:05 +01:00
maziggy ec8b1f935d Fixed frontend/src/__tests__/utils/currency.test.ts 2026-03-09 12:35:05 +01:00
maziggy 1a4f56d853 Show filament subtypes in all mapping dropdowns (#624)
All filament mapping dropdowns (single-printer, multi-printer, and
  "Print to Any" model-based) showed only the base material type (e.g.
  "PLA") without distinguishing subtypes like "PLA Basic" vs "PLA Matte",
  making entries with different subtypes but same color look identical.

  Backend: Add tray_sub_brands to available-filaments response and include
  it in the dedup key so different subtypes of the same color appear as
  separate entries.

  Frontend: Show tray_sub_brands in FilamentMapping, FilamentOverride, and
  PrinterSelector dropdowns, falling back to base type when unset. Add
  traySubBrands field to LoadedFilament interface.
2026-03-09 12:35:05 +01:00
maziggy 11a70f4be7 Add queue-all-plates and fix clear plate prompt for staged items (#530)
Multi-plate 3MF files can now be queued in one action via a "Queue All
  Plates" toggle in the plate selector (add-to-queue mode only). Each
  plate becomes a separate queue entry, individually editable.

  Fix: "Clear Plate & Start Next" no longer appears when all pending
  queue items are staged (manual_start). The prompt only shows when
  there are auto-dispatchable items the scheduler will actually start.
2026-03-09 12:35:02 +01:00
maziggy f3fd6cab44 Add auto-dispatch toggle for virtual printer queue mode (#587)
Virtual printers in Queue mode now have an "Auto-dispatch" setting.
  When enabled (default), prints start automatically — preserving current
  behavior. When disabled, prints are added with manual_start so they
  wait for manual dispatch from the queue UI.
2026-03-09 12:33:58 +01:00
maziggy 5632368490 fix: remove incorrect ethernet badge on printer cards
home_flag bit 18 was incorrectly interpreted as "wired/ethernet
  connection", causing the ethernet badge to always show — even on
  printers without an ethernet port (e.g. A1, P1S). This hid the
  WiFi signal indicator entirely.

  Removed the wired_network field and ethernet badge UI. The WiFi
  signal badge now shows correctly whenever the printer reports
  signal strength.
2026-03-09 12:33:23 +01:00
maziggy 121b3d53df fix: remove incorrect ethernet badge on printer cards
home_flag bit 18 was incorrectly interpreted as "wired/ethernet
  connection", causing the ethernet badge to always show — even on
  printers without an ethernet port (e.g. A1, P1S). This hid the
  WiFi signal indicator entirely.

  Removed the wired_network field and ethernet badge UI. The WiFi
  signal badge now shows correctly whenever the printer reports
  signal strength.
2026-03-09 12:16:22 +01:00
maziggy 86d7028b80 Updated CHANGELOG 2026-03-09 12:16:08 +01:00
d7401a80df Feature: Force Color Match (#625)
* Added "Force Color Match" feature to filament override

* Update settings.py

* Update settings.py

* Label updates for warnings and checkbox case

* Initial plan

* Add noMatchingMaterial i18n translations to all 7 locale files

Co-authored-by: cadtoolbox <12723486+cadtoolbox@users.noreply.github.com>

* Use {{material}} interpolation in noMatchingMaterial; populate from filament_overrides with getColorName

Co-authored-by: cadtoolbox <12723486+cadtoolbox@users.noreply.github.com>

* Updates for PR#625 comments

* Added "Force Color Match" feature to filament override

* Update settings.py

* Update settings.py

* Label updates for warnings and checkbox case

* Initial plan

* Add noMatchingMaterial i18n translations to all 7 locale files

Co-authored-by: cadtoolbox <12723486+cadtoolbox@users.noreply.github.com>

* Use {{material}} interpolation in noMatchingMaterial; populate from filament_overrides with getColorName

Co-authored-by: cadtoolbox <12723486+cadtoolbox@users.noreply.github.com>

* Updates to PrintersPage and QueuePage

* Update QueuePage.tsx

* Rebase to 0.2.2b3

* Fix compile errors with FilamentOverride

* Updates for PR#625 comments

https://github.com/maziggy/bambuddy/pull/625#pullrequestreview-3908738261

* Fix force color match default, loadedFilamentTypes bug, remove dead translations

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: cadtoolbox <12723486+cadtoolbox@users.noreply.github.com>
Co-authored-by: MartinNYHC <mz@v8w.de>
2026-03-09 11:54:02 +01:00
MartinNYHC 7b74605ae4 Merge pull request #633 from sw1nn/main
feat(metrics): add bambuddy_build_info metric
2026-03-07 17:24:45 +01:00
Neale Swinnerton ae80eaade0 feat(metrics): add bambuddy_build_info metric
Publish a gauge with version, python_version, platform, and
architecture labels at the top of the Prometheus metrics endpoint.
2026-03-07 15:40:48 +00:00
maziggy d225421c6d Fixed frontend/src/__tests__/utils/currency.test.ts 2026-03-07 14:13:12 +01:00
maziggy 9f4d8e126a Show filament subtypes in all mapping dropdowns (#624)
All filament mapping dropdowns (single-printer, multi-printer, and
  "Print to Any" model-based) showed only the base material type (e.g.
  "PLA") without distinguishing subtypes like "PLA Basic" vs "PLA Matte",
  making entries with different subtypes but same color look identical.

  Backend: Add tray_sub_brands to available-filaments response and include
  it in the dedup key so different subtypes of the same color appear as
  separate entries.

  Frontend: Show tray_sub_brands in FilamentMapping, FilamentOverride, and
  PrinterSelector dropdowns, falling back to base type when unset. Add
  traySubBrands field to LoadedFilament interface.
2026-03-07 14:08:38 +01:00
maziggy a6aec2aed8 Added ILS: '₪' (Israeli New Shekel) to the currency list 2026-03-07 13:02:06 +01:00
maziggy 6b12c685aa Add queue-all-plates and fix clear plate prompt for staged items (#530)
Multi-plate 3MF files can now be queued in one action via a "Queue All
  Plates" toggle in the plate selector (add-to-queue mode only). Each
  plate becomes a separate queue entry, individually editable.

  Fix: "Clear Plate & Start Next" no longer appears when all pending
  queue items are staged (manual_start). The prompt only shows when
  there are auto-dispatchable items the scheduler will actually start.
2026-03-07 12:51:07 +01:00
maziggy b3c37072b2 Add auto-dispatch toggle for virtual printer queue mode (#587)
Virtual printers in Queue mode now have an "Auto-dispatch" setting.
  When enabled (default), prints start automatically — preserving current
  behavior. When disabled, prints are added with manual_start so they
  wait for manual dispatch from the queue UI.
2026-03-07 11:41:01 +01:00
maziggy f1d5ee422c Bumped version 2026-03-07 11:11:16 +01:00
maziggy 0efb4690b9 Fix SD card error after FTP upload by waiting for 226 response (#645)
The FTP upload skipped reading the server's "Transfer complete"
  confirmation, sending the print command before the file was flushed
  to the SD card. Now waits for the 226 response with a 60s timeout.
2026-03-07 11:01:34 +01:00
maziggy a7ddc483b3 Add bulk delete for spool and color catalog entries (#646)
Checkbox selection + "Delete Selected" button in Settings > Filament
  for both Spool Catalog and Color Catalog. Adds POST bulk-delete
  endpoints and translations for all 7 locales.
2026-03-07 10:13:40 +01:00
maziggy d55585a73f Fix P2S showing carbon rod maintenance tasks (#640)
P2S uses hardened steel rods, not carbon fiber. Move P2S from
  carbon rod classification to new steel_rod category with its own
  "Lubricate Steel Rods" / "Clean Steel Rods" maintenance tasks.
2026-03-07 09:45:14 +01:00
maziggy 09c3c24111 Add ETA variable to print notification templates (#638)
Add {eta} template variable showing wall-clock completion time
  (e.g. "15:53" or "3:53 PM") to print_start, print_progress, and
  queue_job_started notifications. Respects the user's time_format
  setting (12h/24h). The existing {estimated_time} variable continues
  to show duration ("1h 23m").
2026-03-07 09:34:01 +01:00
maziggy f66bd26f6e Add inventory:view_assignments permission so admins can grant users
visibility into AMS spool assignments on printer cards without exposing
  the full Inventory page (#635). The list_assignments endpoint now
  requires this new permission instead of inventory:read. All default
  groups (Administrators, Operators, Viewers) include it for backward
  compatibility.

  Closes #634
2026-03-07 09:17:26 +01:00
maziggy 60b17ea5d8 Added MYR (Malaysian Ringgit) with the symbol RM to the currency list 2026-03-07 08:59:51 +01:00
maziggy e1e4ec224c Fix dispatch toast stuck after second print dispatch
The print dispatch progress toast stayed visible forever after the
  second print in a session. lastDispatchSummaryRef was never reset
  between batches — every single-printer dispatch produced the same
  summary key ("first-complete:1:0"), so subsequent completions matched
  the stale ref and skipped creating the done toast.

  Reset the dedup guard when the dispatch toast is dismissed and when
  a new batch starts.
2026-03-06 16:50:04 +01:00
maziggy 538fe4b13b Bumped version 2026-03-06 15:51:49 +01:00
maziggy c0625422a4 Moved toast messages v0.2.2b2 2026-03-06 14:50:53 +01:00
maziggy b631713fff Keep dispatch toast visible for 3s after print upload completes (#615)
The print dispatch notification disappeared instantly for small files or
  closed immediately when the progress bar reached 100%, giving no
  confirmation that the job was submitted. The dispatch toast now stays
  visible for 3 seconds showing the completion message before auto-
  dismissing. For very fast uploads where no progress toast was shown,
  a fresh confirmation toast is created instead.
2026-03-06 14:39:36 +01:00
maziggy a010134c09 Disable busy printers in print modal's reprint mode (#622)
When printing from the file manager, the print modal showed all printers
  including busy ones. Selecting a busy printer resulted in a failed send.
  The printer selector now fetches live status for each printer and shows
  state badges (Idle, Printing, Paused, etc.). In reprint mode, non-available
  printers (anything other than IDLE, FINISH, FAILED) are grayed out and
  not selectable. "Select all" skips them. Queue/edit modes still allow
  selecting busy printers since the job will wait.
2026-03-06 14:31:43 +01:00
maziggy 0eada5edcd Fix PWA install not available in Chrome (#629)
Resize PWA icons to match their declared dimensions (192x192, 512x512,
  180x180), split discouraged "any maskable" icon purpose, and add mobile
  and desktop screenshots to manifest.json for Chrome's richer install UI.
2026-03-06 13:35:34 +01:00
maziggy 46097a9ed4 Fix archived files counted as printed in project statistics (#630)
Files added to a project from the archive (status="archived") were
  incorrectly counted in completed_prints and parts_progress stats.
  Only status="completed" (actually printed) now counts toward completion.
2026-03-06 13:32:19 +01:00
maziggy 8c308487c7 Add i18n support for Settings, Smart Plugs, Notifications, and Backup/Restore
Replace all hardcoded English strings with t() translation calls across
  9 components: SettingsPage, SmartPlugCard, AddSmartPlugModal,
  SwitchbarPopover, NotificationProviderCard, AddNotificationModal,
  NotificationTemplateEditor, NotificationLogViewer, GitHubBackupSettings,
  and RestoreModal. Add ~600 new translation keys to all 7 locales
  (en, de, ja, fr, it, pt-BR, zh-CN).
2026-03-06 13:23:55 +01:00
maziggy b16b12bf8d Fixed install/start_bambuddy.bat 2026-03-06 11:20:36 +01:00
maziggy 940810cba3 Show filament subtypes in all mapping dropdowns (#624)
All filament mapping dropdowns (single-printer, multi-printer, and
  "Print to Any" model-based) showed only the base material type (e.g.
  "PLA") without distinguishing subtypes like "PLA Basic" vs "PLA Matte",
  making entries with different subtypes but same color look identical.

  Backend: Add tray_sub_brands to available-filaments response and include
  it in the dedup key so different subtypes of the same color appear as
  separate entries.

  Frontend: Show tray_sub_brands in FilamentMapping, FilamentOverride, and
  PrinterSelector dropdowns, falling back to base type when unset. Add
  traySubBrands field to LoadedFilament interface.
2026-03-06 08:35:06 +01:00
MartinNYHC 5f8f5aae30 Merge pull request #627 from aneopsy/fix-i8n
Sync i18n locales: add 655 translated keys, remove 127 stale keys
2026-03-06 07:51:16 +01:00
AneoPsy ae7c6b4dd2 Add missing i18n keys and remove stale keys across 5 locales
Sync all locale files to match EN's 3,054-key structure:
- it: add 485 missing keys, remove 1 stale key
- pt-BR: add 51 missing keys, remove 10 stale keys
- fr: add 47 missing keys
- ja: add 47 missing keys, remove 116 stale keys
- zh-CN: add 25 missing keys, remove 1 stale key

All 655 new keys are properly translated.
Stale keys from past refactors are cleaned up (127 total removed).
2026-03-05 20:42:05 -10:00
maziggy f77cbbd7d8 Added scripts/import_spoolman.py 2026-03-06 07:27:05 +01:00
maziggy 1bc3da3fad Fix multi-printer filament mapping ignoring nozzle on dual-nozzle printers (#624)
The per-printer InlineMappingEditor showed filaments from both nozzles
  on H2D printers. The single-printer FilamentMapping dropdown was fixed
  in 29e9593 but the multi-printer code path was missed. Added nozzle_id
  filtering to both auto-match logic and dropdown options via shared
  autoMatchFilament() and filterFilamentsByNozzle() functions in
  amsHelpers.ts, with 10 regression tests.
2026-03-05 15:38:37 +01:00
maziggy becc4669b1 Fix greenlet_spawn error in spool auto-assign
Two lazy-load bugs caused greenlet_spawn errors in the RFID auto-assign
  flow:

  1. create_spool_from_tray set spool.k_profiles=[] AFTER db.flush(),
     but assigning to a relationship on a persistent object triggers a
     lazy load (SQLAlchemy loads the current collection before replacing).
     Moved initialization to BEFORE db.add().

  2. spool.assignments was never initialized or eagerly loaded, so
     db.add(SpoolAssignment) triggered a back_populates lazy load
     outside the async greenlet. Added assignments=[] in create and
     selectinload(Spool.assignments) in get_spool_by_tag.

  Also added exc_info=True to error handlers for full tracebacks, and
  19 new tests including greenlet regression tests that reproduce the
  exact failure.
2026-03-05 12:40:53 +01:00
maziggy 4981c60389 Add --branch support to install script with validation
The install script hardcoded origin/main, so beta testers told to
  install from a dev branch silently got the stable release instead.
  Add a --branch CLI option and interactive prompt (defaults to main).
  Invalid branch names are validated via git ls-remote before any work
  is done, showing available branches on failure.
2026-03-05 11:01:06 +01:00
maziggy 3a0b3f8035 Add --branch support to install script
The install script hardcoded origin/main, so beta testers told to
  install from a dev branch silently got the stable release instead.
  Add a --branch CLI option and interactive prompt (defaults to main).
  Fresh installs use git clone --branch, existing installs checkout
  and reset to the selected branch.
2026-03-05 10:58:29 +01:00
maziggy 0faf03ecb3 Fix Python 3.10 compatibility (StrEnum requires 3.11)
enum.StrEnum was added in Python 3.11, but the documented minimum is
  3.10. Add a compatibility shim in backend/app/core/compat.py that falls
  back to (str, Enum) on older versions. Updated all 5 import sites and
  lowered pyproject.toml target-version to py310.
2026-03-05 10:44:24 +01:00
maziggy aa39f6c866 Fix Bind-TLS proxy handshake failure on OpenSSL 3.x
Bambu printers only support plain RSA key exchange ciphers
  (AES256-GCM-SHA384, AES128-GCM-SHA256), but Python's OpenSSL 3.x
  defaults exclude them in favor of forward-secrecy (ECDHE/DHE) only.
  Add the RSA ciphers to the client SSL context so the TLS proxy can
  connect to the printer's bind port (3002).
2026-03-05 10:08:31 +01:00
maziggy 150eaffe1c Fix bug report bubble overlapping toast notifications
Move the toast container from bottom-4 to bottom-20 so toast
  notifications and upload progress stack above the bug report bubble
  instead of rendering on top of each other.
2026-03-05 09:44:54 +01:00
maziggy 0bff20662c Add scheduler diagnostic logging for queue stall debugging (#616)
When the print queue scheduler finds pending items but doesn't start
  any, there was no logging to explain why. Added INFO-level summary
  after each queue check showing skip reasons (manual_start,
  scheduled_future) and busy printer details (state, connected,
  plate_cleared). Also added DEBUG-level logging in _is_printer_idle()
  for the specific condition that failed.
2026-03-05 09:18:38 +01:00
maziggy ed462c5cca Add tests, docs, and lint fix for AMS Info Card feature (#570)
- Add 12 backend integration tests for AMS labels API (GET/PUT/DELETE,
    serial resolution, synthetic key fallback, whitespace handling, validation)
  - Add 10 frontend tests for FilamentSlotCircle component (rendering,
    border styles, background colors, text contrast inversion)
  - Fix ruff W293 trailing whitespace in inventory.py from contributor fix
  - Add ams_label model import to test conftest.py
  - Update CHANGELOG, README, website features page, and wiki AMS docs
2026-03-05 08:46:39 +01:00
Thomas RambachandMartinNYHC 7ba67012f6 Feature AMS Info Card (#570)
* AMS Labels addition to PrintersPage

* Added database reinitialization for schema migrations on database restore

* Bug fixes and AMS Label persistence updates

* Update database.py to resolve PR conflicts

* PR Comment Resolution

* Resolve conflicts in database.py for PR#570

* Updates to address PR#570 additional comments

* Optimize visibility handling for popup component

* Improve serial key handling in printers.py

Refactor serial key assignment to handle empty AMS serial gracefully.

* Implement error handling in serial number mapping

Add error handling for serial number mapping.

* Add migration to drop old ams_labels table

---------

Co-authored-by: MartinNYHC <mz@v8w.de>
2026-03-05 08:36:39 +01:00
maziggy 5ee2ef8dbf Fix Windows server shutdown after 60s from ffmpeg cleanup (#605)
On Windows, process.terminate() on ffmpeg broadcasts CTRL_C_EVENT to
  the entire process group, causing uvicorn to shut down. Spawn ffmpeg
  with CREATE_NEW_PROCESS_GROUP so cleanup doesn't affect the server.
2026-03-04 15:25:55 +01:00
maziggy dba43530cb Bumped version 2026-03-04 15:12:22 +01:00
maziggy 119f1dacc2 Merge remote-tracking branch 'origin/main' into 0.2.2b1 v0.2.2-b1 v0.2.2b1 2026-03-04 14:14:59 +01:00
maziggy 39a231514c Housekeeping 2026-03-04 14:08:27 +01:00