Commit Graph
639 Commits
Author SHA1 Message Date
maziggy 75fa935851 Fix filament color name and subtype inconsistencies (#857) 2026-04-01 12:20:12 +02:00
maziggy 3270179090 Add batch print quantity to print/schedule dialog (#342) 2026-04-01 11:55:30 +02:00
maziggy 9aa9fdc586 Add configurable default print options (#858) 2026-04-01 10:30:05 +02:00
maziggy 914adde5aa Add REST/Webhook smart plug type (#472) 2026-04-01 10:06:01 +02:00
maziggy f228a8b549 Fix sidebar bottom icons cut off when smart plugs enabled (#862) 2026-04-01 09:17:03 +02:00
maziggy 5a696f9fa3 ● Add prefer lowest remaining filament in auto-matching (#805)
When multiple AMS spools match the same type/color criteria, an optional
  setting now prefers the spool with the lowest remaining filament. This
  helps consume partial spools before starting new ones. Sorting applies
  to all matching paths: queue scheduler, print modal, and multi-printer
  mapping. Unknown remain values (-1) sort to end.
2026-03-31 14:14:15 +02:00
maziggy 3c887f5166 Add bulk printer actions toolbar (#825)
Select multiple printer cards and apply bulk actions (stop, pause,
  resume, clear notifications, clear bed) from a floating toolbar.
  Selection shortcuts: Select All, Select by State (printing/paused/
  finished/idle/error/offline), Select by Location. Action buttons are
  smart-enabled based on selected printers' current states. Confirmation
  modals for destructive actions. The status summary bar now shows all
  printer states.
2026-03-31 13:24:43 +02:00
maziggy ec0ae162e8 Add per-user statistics filtering (#730)
Admins can now filter the Statistics page by user via a new
  stats:filter_by_user permission. A user dropdown appears in the stats
  header showing all users plus "No User (System)" for prints without
  attribution. The filter applies to all stats widgets, failure analysis,
  and CSV/Excel exports. Backend validates the permission on all 4 stats
  endpoints, returning 403 if the filter is used without authorization.
2026-03-31 12:13:58 +02:00
maziggy 51b5781c0b Re-arranged settings 2026-03-31 11:27:06 +02:00
maziggy 046dbf3608 Add stagger to Print dialog, add plate-clear setting (#752)
Stagger option now available when printing directly to multiple printers,
  not just in queue mode. Prints are automatically queued with staggered
  start times using group size/interval from Settings. New "Require
  plate-clear confirmation" setting lets farm users disable per-printer
  plate confirmations so queued prints start automatically on finished
  printers.

  Also fixes settings API type parsing for require_plate_clear (boolean),
  stagger_group_size and stagger_interval_minutes (integer) — without this,
  saved values returned as strings would cause the settings toggle to
  always show enabled and trigger a permanent save loop.
2026-03-31 11:12:42 +02:00
maziggy 86693b4f75 Fix archives capped at 50 items, add pagination (#843)
The archives page only fetched the 50 most recent prints due to a
  hardcoded API limit default. Added client-side pagination with
  configurable page sizes (25/50/100/200/All) and bumped the fetch
  limit to return all archives. Page size is persisted to localStorage.
2026-03-30 08:27:34 +02:00
maziggy eaf0a1c281 Add queue timeline view, visual refresh, and fix plate thumbnail auth
Queue page redesign: compact stats bar replaces summary cards, color-
  coded left borders for status scanning, collapsible history with
  condensed rows, and a new production schedule timeline view (#823)
  showing estimated completion times grouped by hour with filter tabs
  and day navigation. i18n keys added for all 7 languages.

  Fix plate thumbnails returning 401 in print modal when auth is enabled
  (missing stream token). Fix schedule calendar picker opening off-screen
  (hidden input positioned with sr-only instead of near the date field).
2026-03-28 13:45:37 +01:00
maziggy 68dce24cc9 Add staggered batch start for multi-printer queue jobs (#752)
When adding a print to the queue for multiple printers, users can now
  enable "Stagger printer starts" to avoid power spikes from simultaneous
  bed heating. Configurable group size and interval — first group starts
  immediately (ASAP) or at scheduled time, subsequent groups get offset
  scheduled_time values. No backend queue/scheduler changes — leverages
  existing scheduled_time field.

  Also adds a dedicated Queue tab in Settings (stagger defaults + auto-
  drying moved from Filament tab), i18n keys for all 7 locales, frontend
  and backend tests.
2026-03-28 12:11:22 +01:00
maziggy a4b927f2d2 Fix SpoolBuddy add-to-inventory, dashboard crash, and kiosk display issues
- Round scale weight to integer before sending to backend (Pydantic
    rejects non-whole floats for int fields), move modal close to finally
    block, add error toast with actual API message
  - Fix null-field crash in SpoolInfoCard prop construction: pick one
    source object instead of per-field ?? fallbacks that crash when
    displayedSpool has null subtype/brand/rgba and matchedSpool is null
  - Add React ErrorBoundary to App so crashes show error instead of
    black screen
  - Remove --max-old-space-size=128 and --enable-low-end-device-mode
    from kiosk Chromium flags (crashed renderer/display)
  - Append kiosk flags to Pi GPU defaults instead of resetting them
  - Add wlr-randr keep-alive and screenBlankTimeout=0 to prevent
    display blanking on labwc 0.9.x
  - Fix tests: add ToastProvider to Dashboard test wrapper, update
    StatusBar tests for removed animate-pulse class
2026-03-28 10:51:51 +01:00
maziggy 09ebac1c09 Reduce SpoolBuddy kiosk idle CPU load from ~3.3 to ~0.9
Frontend: replace expensive idle dashboard animations (3x animate-ping
  with scale transforms, blur-2xl glow, continuous animate-pulse on
  status dots) with static NFC rings and slow 5s color-cycling spool.
  Chromium: add --disable-extensions, --disable-background-timer-throttling,
  --memory-pressure-off, --disable-renderer-backgrounding, --disable-breakpad,
  and --js-flags=--max-old-space-size=128. Install script: mask stripped
  services (not just disable) to prevent socket/dbus reactivation; use
  /etc/systemd/user/ global overrides for user services instead of
  unreliable su-based systemctl --user. Remove chromium/upower from
  strip_packages since kiosk reinstalls them immediately.
2026-03-27 14:04:11 +01:00
maziggy 3887938e8f Security: add token-based auth for all media endpoints
Camera streams, snapshots, thumbnails, timelapse videos, photos, QR
  codes, and cover images served via <img>/<video> tags were previously
  unauthenticated because browser media elements cannot send Authorization
  headers. When auth is enabled, these endpoints are now protected by a
  reusable stream token (?token=xxx) obtained from POST
  /printers/camera/stream-token (requires CAMERA_VIEW permission).
2026-03-27 12:58:08 +01:00
maziggy f9ae9f83cc Optimize SpoolBuddy kiosk performance on Raspberry Pi
Chromium: override Debian defaults via /etc/chromium.d/spoolbuddy-kiosk
  to disable GPU rasterization, enable low-end device mode, and disable
  smooth scrolling/background networking. The system default
  --enable-gpu-rasterization conflicted with per-launch flags.

  WebSocket: add React Query `select` to SpoolBuddyLayout and
  SpoolBuddyDashboard printer status queries so only `connected` is
  extracted. Temperature/fan/progress changes no longer trigger
  re-renders on every MQTT tick (~10/sec idle).

  Services: expand install script to strip pipewire, CUPS, rpcbind,
  upower, polkit, accounts-daemon, xdg-desktop-portal, mpris-proxy.
  Add user-level service masking for pipewire/portals.
2026-03-27 11:37:15 +01:00
maziggy 6b93cf806e Fix SpoolBuddy virtual keyboard layout and number input support
Virtual keyboard now participates in flex layout instead of fixed
  overlay, eliminating dead space between content and keyboard. Bottom
  nav and status bar hide when keyboard is open. Number inputs (e.g.
  Weight field on Write Tag) now accept virtual keyboard input.
2026-03-27 08:29:48 +01:00
maziggy c6f62f9cd9 Add persistent auto-off option for smart plugs (#826)
Auto-off now has a "Keep Enabled" toggle that keeps it active between
  prints instead of disabling after each use (one-shot). Useful for HA
  accessories like BentoBox filters that should always power off after
  prints. Default behavior (one-shot) is unchanged.
2026-03-27 07:50:47 +01:00
maziggy 94c6696469 Add Ukrainian Hryvnia to known currencies (#815) 2026-03-26 17:25:35 +01:00
maziggy b75f65fe64 Fix SpoolBuddy low filament warning missing slot number
Status bar showed "AMS B" instead of specific slot like "B2". Now uses
  formatSlotLabel with tray index to display the full slot label.
2026-03-26 15:56:59 +01:00
maziggy 9c6a374843 Add SpoolBuddy Inventory page to kiosk UI
Catalog-style spool grid with colored spool circles (matching AMS page
  style), material/subtype labels, color dots, fill level bars, remaining
  weight percentages, and AMS location badges. Touch-friendly search bar
  and inline filter pills (All, In AMS, per-material). Full-screen detail
  view with slicer filament, PA K-profiles, weight breakdown, temperature,
  cost, tag ID, AMS assignment, and notes — updates live from query data.
  Shows Spoolman iframe when Spoolman is enabled. Navigation item added
  between Write and Settings in the bottom bar.
2026-03-26 15:28:32 +01:00
maziggy 0969ec0a59 Add SpoolBuddy Inventory page to kiosk UI
Catalog-style spool grid with colored spool icons, material/subtype
  labels, color dots, remaining weight percentages, and AMS location
  badges. Search bar with inline filter pills (All, In AMS, per-material).
  Detail bottom sheet on tap. Shows Spoolman iframe when enabled.
  Navigation item added between Write and Settings in the bottom bar.
2026-03-26 15:11:03 +01:00
maziggy c834a0bd00 Add SpoolBuddy Inventory page to kiosk UI
New page at /spoolbuddy/inventory with compact 2-column spool card grid,
  search bar, material filter chips, sort options, and tap-to-open detail
  sheet. Shows Spoolman iframe when Spoolman is enabled. Navigation item
  added between Write and Settings in the bottom bar.
2026-03-26 15:04:41 +01:00
maziggy fa705102b4 Fix slot picker stretched and double scroll in Assign Spool modal
Narrowed CSS selector to only target max-w-2xl modals (Assign Spool)
  not max-w-sm ones (slot action picker). Removed inner max-h-96 on
  the spool grid to eliminate nested scrollbars.
2026-03-26 11:46:05 +01:00
maziggy e7c81e3f08 Fix Assign Spool modal clipping on SpoolBuddy display
CSS rules scoped via data-spoolbuddy-kiosk force the modal panel to
  90vh with flex column layout. Content area scrolls, header/footer
  pinned. Uses height (not just max-height) so flex-basis auto works
  correctly. No flash — CSS applies before paint.
2026-03-26 11:40:44 +01:00
maziggy eed1498d40 Fix Assign Spool modal clipping on SpoolBuddy display
useEffect in SpoolBuddyAmsPage applies inline styles to the modal
  panel after render (requestAnimationFrame + setTimeout) to cap it
  at 90vh with scrollable content. Targets the DOM directly to avoid
  CSS specificity issues with Tailwind v4.
2026-03-26 11:36:35 +01:00
maziggy e0f0718dfc Fix Assign Spool modal clipping on SpoolBuddy display
Used a ref callback wrapper in SpoolBuddyAmsPage to directly apply
  inline styles (max-height 90vh, flex column, scrollable content) to
  the shared AssignSpoolModal DOM elements without modifying the
  shared component.
2026-03-26 11:29:22 +01:00
maziggy d4a997db34 Fix Assign Spool modal clipping on SpoolBuddy display
Added data-spoolbuddy-kiosk attribute to the SpoolBuddy layout and
  global CSS rules that cap modals at 90vh with scrollable content on
  the small touchscreen, without modifying shared components.
2026-03-26 11:26:12 +01:00
maziggy 702b201aa6 Fix Assign Spool modal clipping on SpoolBuddy display
Added scoped CSS in SpoolBuddyAmsPage that constrains the shared
  AssignSpoolModal to 90vh with scrollable content and pinned
  header/footer, without modifying the shared component.
2026-03-26 11:22:15 +01:00
maziggy 1b0c97538f Fix Assign Spool modal clipping on SpoolBuddy display
Added scoped CSS in SpoolBuddyAmsPage that constrains the shared
  AssignSpoolModal to 90vh with scrollable content, without modifying
  the shared component used by the main Bambuddy frontend.
2026-03-26 11:18:34 +01:00
maziggy 01af948f66 Fix Assign-to-AMS modal clipping on SpoolBuddy display
The AMS slot content area was missing overflow-y-auto, so on the
  small SpoolBuddy touchscreen the content overflowed and clipped
  instead of scrolling.
2026-03-26 11:11:18 +01:00
maziggy 81360a32c2 y Remove diagnostic buttons from SpoolBuddy Write Tag page
The NFC Diag and Scale Diag buttons on the Write Tag page's right
  card were misplaced — diagnostics are already available on the
  Settings page. Removed the buttons and all associated dead code.
2026-03-26 11:05:02 +01:00
maziggy 6e93b9f7d1 Fix virtual keyboard overlaying input fields on SpoolBuddy settings
When the virtual keyboard opened on the SpoolBuddy device tab, the
  API token field and Save button were hidden behind the keyboard.
  The keyboard now adds bottom scroll padding and scrolls the parent
  card (not just the focused input) to the top of the visible area,
  keeping all related fields accessible.
2026-03-26 10:58:08 +01:00
maziggy 00b4386e90 Fix virtual keyboard overlaying input fields on SpoolBuddy settings
When the virtual keyboard opened on the SpoolBuddy device tab, the
  Backend URL and API Token fields were hidden behind the keyboard
  overlay. The keyboard now adds temporary bottom padding to the
  scrollable container so inputs scroll above it, and removes the
  padding on dismiss.
2026-03-26 10:54:19 +01:00
maziggy bebfc01167 Fix right-swipe still triggering browser back navigation
Non-passive touchmove listener with preventDefault() blocks Chromium's
  compositor-level back/forward swipe gesture. Once horizontal movement
  is detected, the gesture is locked and all further touchmove events
  are prevented for that swipe. Removed touch-action: pan-y which was
  insufficient on its own.
2026-03-26 10:50:10 +01:00
maziggy f6d760bb3e Add swipe-to-switch-printer and auto-navigate on tag scan
Swiping left/right on the SpoolBuddy touchscreen now cycles through
  online printers instead of triggering browser back/forward navigation.
  Uses touch-action: pan-y to suppress Chromium's native swipe history
  gesture. Auto-navigates to dashboard when a new NFC tag is detected
  on any other page, with edge detection so a persistent tag doesn't
  block manual navigation. Also wakes the screen if blanked.
2026-03-26 10:47:27 +01:00
maziggy ceb599ec00 Add swipe-to-switch-printer and auto-navigate on tag scan
Swiping left/right on the SpoolBuddy touchscreen now cycles through
  online printers instead of triggering browser navigation. Auto-navigates
  to dashboard when a new NFC tag is detected on any other page, with
  edge detection so a persistent tag doesn't block manual navigation.
2026-03-26 10:44:28 +01:00
maziggy 57a774c32f Auto-navigate SpoolBuddy to dashboard on tag scan
When an NFC tag is first detected while the UI is on a non-dashboard
  page, automatically navigate to the main dashboard. Uses edge detection
  (previous ref) so a persistently present tag doesn't block navigation
  to other pages. Also wakes the screen if the display was blanked.
2026-03-26 10:40:40 +01:00
maziggy 1c35ed94a5 Auto-navigate SpoolBuddy to dashboard on tag scan
When an NFC tag is detected while the UI is on a non-dashboard page
  (Settings, AMS, Write Tag, Calibration), automatically navigate back
  to the main dashboard to display the scanned spool. Also wakes the
  screen if the display blank timeout had kicked in.
2026-03-26 10:38:25 +01:00
maziggy c1676b1a32 The daemon now collects CPU temp, core count, load average, memory/disk
usage, OS info, and system uptime every heartbeat using stdlib-only reads
  from /proc and /sys. Stats are sent as a JSON blob in the heartbeat
  payload, stored in a new system_stats TEXT column, and displayed in a
  new "System" tab in SpoolBuddy Settings with color-coded usage bars.
2026-03-26 10:06:24 +01:00
maziggy 3c53d741a3 The daemon now collects CPU temp, core count, load average, memory/disk
usage, OS info, and system uptime every heartbeat using stdlib-only reads
  from /proc and /sys. Stats are sent as a JSON blob in the heartbeat
  payload, stored in a new system_stats TEXT column, and displayed in a
  new "System" tab in SpoolBuddy Settings with color-coded usage bars.
2026-03-26 10:03:46 +01:00
maziggy 4b14a4146c Add SpoolBuddy System tab with live OS stats from Raspberry Pi
The daemon now collects CPU temp, core count, load average, memory/disk
  usage, OS info, and system uptime every heartbeat using stdlib-only reads
  from /proc and /sys. Stats are sent as a JSON blob in the heartbeat
  payload, stored in a new system_stats TEXT column, and displayed in a
  new "System" tab in SpoolBuddy Settings with color-coded usage bars.
2026-03-26 09:59:58 +01:00
maziggy 77cb7158d2 Add SpoolBuddy System tab with live OS stats from Raspberry Pi
The daemon now collects CPU temp, core count, load average, memory/disk
  usage, OS info, and system uptime every heartbeat using stdlib-only reads
  from /proc and /sys. Stats are sent as a JSON blob in the heartbeat
  payload, stored in a new system_stats TEXT column, and displayed in a
  new "System" tab in SpoolBuddy Settings with color-coded usage bars.
2026-03-26 09:57:09 +01:00
maziggy 1df5130df2 Broadcast spool assignment changes via WebSocket for cross-tab updates
Assigning or unassigning a spool now broadcasts a spool_assignment_changed
  event to all connected WebSocket clients. The frontend handles this event
  by invalidating the spool-assignments and slotPresets caches, so other
  open tabs update automatically without a page reload.
2026-03-26 09:34:46 +01:00
maziggy 45892077ab Add material/profile mismatch warnings to SpoolBuddy Assign-to-AMS modal
The AssignToAmsModal was missing all material/profile validation guards
  that exist in the main AssignSpoolModal. Clicking an AMS slot now checks
  the spool's material and slicer profile against the target slot's current
  filament, showing a confirmation dialog on mismatch. Respects the global
  disable_filament_warnings setting. Uses existing i18n keys and ConfirmModal.
2026-03-26 09:23:42 +01:00
maziggy d749209ef4 Append /spool to Spoolman iframe URL in inventory page
When Spoolman is enabled, the sidebar filament item embedded
  Spoolman at its root URL. Now navigates to <url>/spool so users
  land directly on the spool management page.
2026-03-25 15:14:37 +01:00
maziggy c52ff1dcee Add Unassign button to edit spool modal
Allows removing a spool's AMS slot assignment directly from the
  edit modal, clearing the location column in the inventory table.
2026-03-25 14:14:40 +01:00
maziggy 91320e76d3 Clear all tag fields when deleting tag from spool
Delete Tag only cleared tag_uid, leaving tray_uuid, tag_type, and
  data_origin as stale data. Now sends all four fields as null.
2026-03-25 14:06:39 +01:00
maziggy c5dedff113 Show Assign or Unassign exclusively in SpoolBuddy slot picker
When a spool is already assigned/linked, only show Unassign/Unlink.
  When no spool is mapped, only show Assign/Link. Previously both
  buttons appeared simultaneously.
2026-03-25 13:58:47 +01:00