Skip to content

Bug fixes and small enhancements#21

Open
gibz104 wants to merge 3 commits intomarcokreeft87:masterfrom
gibz104:master
Open

Bug fixes and small enhancements#21
gibz104 wants to merge 3 commits intomarcokreeft87:masterfrom
gibz104:master

Conversation

@gibz104
Copy link
Copy Markdown

@gibz104 gibz104 commented Dec 31, 2025

Summary

This PR adds a settings UI for customization options and fixes the QR code scanning functionality which was not working.

Changes:

  1. Settings UI
  • Added a settings dialog (gear icon in toolbar) with:
  • Settings persist to localStorage
  • Accent color applies to toolbar and buttons via CSS custom properties
  1. QR Code Scanner Fix
  • Problem: The QR scanner was completely non-functional with Spoolman's QR codes. It was passing the raw QR code value (e.g., web+spoolman:s-4 or https://.../spool/show/4) directly to a barcode lookup API, expecting an exact match in the spool's barcode field. This would never work with Spoolman's built-in QR codes.
  • Fix: Added proper parsing for Spoolman QR code formats to extract the spool ID, then look up the spool by ID from the existing spools list. Supports:
    • web+spoolman:s-{id} format
    • https://.../spool/show/{id} URL format
    • Plain numeric IDs
    • Falls back to barcode field matching for custom barcodes
  1. Error Handling on Scan Page
  • Problem: When the spool lookup failed, the page showed no feedback. Clicking tray buttons did nothing with no error message.
  • Fix: Added loading states, error messages, and a "Go Home" button when errors occur. Users now see clear feedback like "No spool found for barcode: xyz".
  1. Spool ID Display
  • When "Show Spool IDs" is enabled, IDs appear at the beginning of dropdown entries (#4 Bambu Lab PETG...) so they don't get cut off
  • Spool ID shown subtly at bottom of spool info cards

Testing:

  • Tested QR scanning with both Spoolman QR code formats
  • Tested accent color theming
  • Tested spool ID display toggle

Screenshots:
Demo

image

@gibz104
Copy link
Copy Markdown
Author

gibz104 commented Jan 2, 2026

I've also removed the unused /Spools/barcode backend endpoint. Barcode lookups are now handled client-side by filtering the spool list returned from GET /Spools, which already contains the barcode field. This simplifies the codebase by eliminating redundant server-side lookup logic

@gibz104 gibz104 changed the title Add settings UI and fix QR code scanner Bug fixes and small enhancements Jan 2, 2026
@gibz104
Copy link
Copy Markdown
Author

gibz104 commented Jan 2, 2026

I've also included a bug fix for the external spool not persisting the selected spool as discussed in #20

@marcokreeft87
Copy link
Copy Markdown
Owner

marcokreeft87 commented Jan 15, 2026

I've also removed the unused /Spools/barcode backend endpoint. Barcode lookups are now handled client-side by filtering the spool list returned from GET /Spools, which already contains the barcode field. This simplifies the codebase by eliminating redundant server-side lookup logic

The barcode endpoint is being used. Maybe not in your changes, but I scanned the barcode with the camera button and than it selected the spool I scanned.

Can you alter your change to only add functionality for now?
Not everyone wants to print qr codes every time they get a new spool

@gibz104
Copy link
Copy Markdown
Author

gibz104 commented Jan 15, 2026

I've also removed the unused /Spools/barcode backend endpoint. Barcode lookups are now handled client-side by filtering the spool list returned from GET /Spools, which already contains the barcode field. This simplifies the codebase by eliminating redundant server-side lookup logic

The barcode endpoint is being used. Maybe not in your changes, but I scanned the barcode with the camera button and than it selected the spool I scanned.

Can you alter your change to only add functionality for now? Not everyone wants to print qr codes every time they get a new spool

My changes do not require users to print QR codes every time. The end user functionality of using barcodes is still intact. I've just also added the ability to use Spoolman QR codes in addition to barcodes. The change I made was purely on the backend and a simplification of existing logic. We already get the barcode field from spoolman when calling GET /spools, so the /Spools/barcode endpoint was unnecessary. I've tested on my version of the code and both barcodes (from the Spoolman extra data field) and Spoolman QR codes work. Therefore, end user functionality was not changed and only added to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants