Commit Graph
1972 Commits
Author SHA1 Message Date
maziggy 5fe4134d86 Reduce SpoolBuddy kiosk CPU/memory pressure
Add Chromium flags to cut overhead on Pi: disable extensions, crash
  reporter, background timer throttling, renderer backgrounding, and cap
  V8 heap at 128MB. Mask (not just disable) stripped system services to
  prevent socket/dbus reactivation, and add xdg-permission-store to the
  disable list. Remove chromium and upower from strip_packages since the
  kiosk needs them — they were being uninstalled then immediately
  reinstalled on every run.
2026-03-27 13:32:49 +01:00
maziggy 70382ec55c Add Chromium flags to cut overhead on Pi: disable extensions, crash
reporter, background timer throttling, renderer backgrounding, and cap
  V8 heap at 128MB. Also mask (not just disable) stripped system services
  to prevent socket/dbus reactivation, and add xdg-permission-store to
  the disable list.
2026-03-27 13:28:12 +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 7a0ea8faed Revert " Optimize SpoolBuddy kiosk performance on Raspberry Pi"
This reverts commit 24cda842af.
2026-03-27 12:00:14 +01:00
maziggy a8b50e809f Optimize SpoolBuddy kiosk performance on Raspberry Pi 2026-03-27 11:45:28 +01:00
maziggy 24cda842af Optimize SpoolBuddy kiosk performance on Raspberry Pi
Replace Chromium with cog (WPE WebKit) for the kiosk browser. Cog is
  purpose-built for embedded kiosk displays with a fraction of Chromium's
  CPU and memory footprint on Pi hardware.

  Add React Query `select` to SpoolBuddyLayout and SpoolBuddyDashboard
  printer status queries so only `connected` is extracted. Temperature,
  fan, and progress changes no longer trigger re-renders on every MQTT
  tick.

  Expand service/package stripping to disable pipewire audio stack, CUPS
  printing, rpcbind, upower, polkit, accounts-daemon, xdg-desktop-portal,
  and mpris-proxy. Add user-level service masking for pipewire/portals.

  Update SSH update cache clearing to handle both WPE WebKit and legacy
  Chromium cache paths.
2026-03-27 11:43:55 +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 54c67f9e4e Optimize SpoolBuddy kiosk performance on Raspberry Pi
Override Debian's default Chromium flags 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 — the new config replaces all system defaults
  so kiosk flags take effect cleanly.

  Expand service/package stripping to disable pipewire audio stack, CUPS
  printing, rpcbind, upower, polkit, accounts-daemon, xdg-desktop-portal,
  and mpris-proxy. Add user-level service masking for pipewire/portals
  that system-level disable misses.
2026-03-27 10:44:58 +01:00
maziggy 26c2549a56 Optimize SpoolBuddy kiosk performance on Raspberry Pi
Add Chromium performance flags (disable-gpu-rasterization,
  enable-low-end-device-mode, disable-smooth-scrolling,
  disable-background-networking, disable-dev-shm-usage) to reduce
  CPU load from ~54% to manageable levels on Pi 4B.

  Expand service/package stripping to disable pipewire audio stack,
  CUPS printing, rpcbind, upower, polkit, accounts-daemon,
  xdg-desktop-portal, and mpris-proxy. Add user-level service
  masking for pipewire/portals that system-level disable misses.
2026-03-27 10:26:56 +01:00
maziggy 866103bb96 Fix ruff format check for spool_assignment_notifications.py 2026-03-27 09:33:28 +01:00
maziggy 3dbfda9661 @renovate - Bump minimatch to 10.2.5 2026-03-27 08:44:31 +01:00
maziggy 886fb90339 Fix print failing on files with spaces in filename (#824)
Filenames with spaces (e.g. "Junktion Box PRO 90.3mf") broke the MQTT
  print command because the url field (ftp://file name.3mf) contained
  unencoded spaces the firmware can't parse. FTP upload succeeded but the
  printer silently ignored the command and stayed IDLE. Replace spaces
  with underscores in the remote filename before upload and print command.
2026-03-27 08:38:08 +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 a05b880a0b Fixed backend/tests/unit/test_spoolbuddy_system_stats.py 2026-03-26 16:35:29 +01:00
Keybored eb3450b1d0 Spoolbuddy init and diagnostic improvements (#814)
Spoolbuddy init and diagnostic improvements (#814)
2026-03-26 16:16:09 +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 161015a577 Fix rapid MQTT disconnect/reconnect bouncing (#813)
The stale connection fix force-closed the socket on every frontend
  status poll, causing a tight close→reconnect→stale→close loop. Added
  a 30-second cooldown between stale reconnect attempts so paho has time
  to re-establish the connection. Also added reconnect backoff (1-30s)
  and unique-per-process MQTT client IDs to prevent broker session
  takeovers.
2026-03-26 14:33:23 +01:00
maziggy 7841d2f997 Housekeeping 2026-03-26 14:20:11 +01:00
maziggy ba991702e5 Housekeeping 2026-03-26 14:08:10 +01:00
maziggy ac75d4957f Changed pipeline 2026-03-26 13:52:52 +01:00
dependabot[bot] 27bf1a4e28 Bump picomatch in /frontend in the npm_and_yarn group across 1 directory (#821)
Bumps the npm_and_yarn group with 1 update in the /frontend directory: [picomatch](https://github.com/micromatch/picomatch).


Updates `picomatch` from 4.0.3 to 4.0.4
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/4.0.3...4.0.4)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 4.0.4
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-26 13:39:25 +01:00
maziggy 6c2df27860 Fix MQTT connected/disconnected UI bouncing caused by stale reconnect
The stale connection fix (6ac375a) force-closed the socket to trigger
  paho reconnect, but paho's disconnect callback redundantly broadcast
  state changes, causing rapid connected/disconnected cycling in the UI.
  Now sets a flag before the force-close so _on_disconnect skips the
  redundant broadcast. Also relaxed keepalive from 15s to 30s — the
  aggressive interval caused spurious disconnects on transient hiccups.

  Moved _disconnection_event.set() to the top of _on_disconnect so no
  early-return filter can prevent it from unblocking disconnect() callers.

  Removed leftover debug payload dump.
2026-03-26 13:32:38 +01:00
maziggy e4999f48fb Polish SpoolBuddy boot splash and reduce initramfs rebuilds
New splash shows only the SpoolBuddy logo with green glow bloom,
  radial gradient, light rays, and vignette. Removed Bambuddy branding.
  Includes generator script for easy customization.

  Defers initramfs rebuild during install until after Plymouth theme
  is configured, avoiding redundant rebuilds from apt hooks.
2026-03-26 13:05:20 +01:00
maziggy 12c2b57962 Polish SpoolBuddy boot splash and reduce initramfs rebuilds
New splash shows only the SpoolBuddy logo with green glow bloom,
  radial gradient, light rays, and vignette. Removed Bambuddy branding.
  Includes generator script for easy customization.

  Defers initramfs rebuild during install until after Plymouth theme
  is configured, avoiding redundant rebuilds from apt hooks.
2026-03-26 13:00:06 +01:00
maziggy b1f2670058 Revert install.sh to Plymouth, keep polished splash
Reverts the fim/fbi experiment — Plymouth is the only splash tool
  that reliably handles Pi KMS/DRM from early boot. install.sh is
  restored to the original Plymouth setup. The new polished splash
  image and generator script are kept.
2026-03-26 12:52:14 +01:00
maziggy dd6b022bba Polish SpoolBuddy boot splash image
New splash shows only the SpoolBuddy logo with baked-in green glow,
  radial gradient background, subtle light rays, and vignette effects
  (66KB vs 205KB). Removed Bambuddy branding. Includes generator
  script for easy customization.
2026-03-26 12:48:07 +01:00
maziggy 58b5e3ae09 Replace Plymouth with fim for SpoolBuddy boot splash
Plymouth ran as a persistent daemon throughout boot, consuming memory
  and competing for framebuffer allocation. fim renders via DRM (Pi KMS
  doesn't expose a usable legacy framebuffer), displays the image, and
  exits — zero ongoing resource cost.

  New splash image shows only the SpoolBuddy logo with baked-in glow,
  radial gradient, light rays, and vignette effects (66KB vs 205KB).
  Install script auto-purges Plymouth on existing installs in a single
  pass to avoid redundant initramfs rebuilds.
2026-03-26 12:22:29 +01:00
maziggy 387aafaee4 Replace Plymouth with fbi for SpoolBuddy boot splash
Plymouth ran as a persistent daemon throughout boot, consuming memory
  and competing for framebuffer allocation. fbi writes pixels directly
  to the framebuffer and exits — zero ongoing resource cost.

  New splash image shows only the SpoolBuddy logo with baked-in glow,
  radial gradient, light rays, and vignette effects (66KB vs 205KB).
  Install script auto-purges Plymouth on existing installs in a single
  pass to avoid redundant initramfs rebuilds.
2026-03-26 12:10:42 +01:00
maziggy 4c7141f738 Replace Plymouth with fbi for SpoolBuddy boot splash
Plymouth ran as a persistent daemon throughout boot, consuming memory
  and competing for framebuffer allocation. fbi writes pixels directly
  to the framebuffer and exits — zero ongoing resource cost.

  New splash image shows only the SpoolBuddy logo with baked-in glow,
  radial gradient, light rays, and vignette effects (66KB vs 205KB).
  Install script auto-removes Plymouth on existing installs.
2026-03-26 12:03:49 +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