1
0
Fork 0
mirror of https://github.com/maziggy/bambuddy.git synced 2026-05-09 08:25:54 +02:00

[PR #625] [MERGED] Feature: Force Color Match #1087

Closed
opened 2026-05-07 00:15:56 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/maziggy/bambuddy/pull/625
Author: @cadtoolbox
Created: 3/5/2026
Status: Merged
Merged: 3/9/2026
Merged by: @maziggy

Base: 0.2.3b1Head: dev_forcecolormatch


📝 Commits (10+)

  • 5543358 Added "Force Color Match" feature to filament override
  • 28117c8 Update settings.py
  • 797a30b Update settings.py
  • 32f4f18 Label updates for warnings and checkbox case
  • 590732d Initial plan
  • 218a63e Add noMatchingMaterial i18n translations to all 7 locale files
  • ea712dc Use {{material}} interpolation in noMatchingMaterial; populate from filament_overrides with getColorName
  • 3995793 Updates for PR#625 comments
  • b276b4b Added "Force Color Match" feature to filament override
  • 635fb2e Update settings.py

📊 Changes

17 files changed (+742 additions, -542 deletions)

View changed files

📝 backend/app/services/print_scheduler.py (+120 -11)
📝 frontend/src/api/client.ts (+3 -4)
📝 frontend/src/components/PrintModal/FilamentOverride.tsx (+69 -50)
📝 frontend/src/components/PrintModal/index.tsx (+50 -8)
📝 frontend/src/components/PrinterQueueWidget.tsx (+2 -19)
📝 frontend/src/i18n/locales/de.ts (+1 -0)
📝 frontend/src/i18n/locales/en.ts (+1 -0)
📝 frontend/src/i18n/locales/fr.ts (+1 -0)
📝 frontend/src/i18n/locales/it.ts (+1 -0)
📝 frontend/src/i18n/locales/ja.ts (+1 -0)
📝 frontend/src/i18n/locales/pt-BR.ts (+1 -0)
📝 frontend/src/i18n/locales/zh-CN.ts (+1 -0)
📝 frontend/src/pages/PrintersPage.tsx (+3 -17)
📝 frontend/src/utils/printer.ts (+55 -0)
📝 static/assets/index-BHfcmN6A.js (+430 -430)
📝 static/assets/index-BoLtXYT2.css (+1 -1)
📝 static/index.html (+2 -2)

📄 Description

Description

This PR introduces a new Force Color Match feature to improve how Bambuddy matches filament/color information during print scheduling when selecting "Any Model" as the print method. When enabled, the system will prefer a strict color match (rather than “best effort” / fallback matching) to reduce incorrect filament assignments and improve archive consistency—especially for libraries with similarly-named filaments or overlapping color metadata.

Bambuddy currently performs color/filament matching in a way that can occasionally:

  • Choose an unintended filament when multiple candidates are “close enough”
  • Fall back to a near match when an exact match exists but is not selected due to ordering/heuristics
  • Produce inconsistent assignments between imports depending on metadata completeness

Force Color Match adds an explicit option to make matching behavior deterministic and stricter where users want accuracy over flexibility.

Fixes #604

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition or update

Changes Made

  • Adds a Force Color Match option in the UI where color/filament matching is configured/triggered.
  • When enabled, matching logic will:
    • Prefer exact (or explicitly-defined) color matches first
    • Avoid fallback candidates unless explicitly allowed/necessary
    • Provide clearer outcomes when a strict match cannot be found (e.g., prompt / warning / “unmatched” state)

Screenshots

2026-03-05_16-18-51

Testing

  • I have tested this on my local machine
  • I have tested with my printer model: H2D Pro, X1E

Testing involved:

  • Adding a print job with matching material/color as normal.
  • Adding a print job with no matching material/color.
  • Adding a print job with matching material/color after a no match job. Job jumps queue.
  • Adding filament to the AMS of desired color while a no matching material/color job is waiting.

Checklist

  • My code follows the project's coding style
  • I have commented my code where necessary
  • I have updated the documentation (if needed)
  • My changes generate no new warnings
  • I have tested my changes thoroughly

Additional Notes

Additional testing with different printers, AMS combos and filament would be ideal.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/maziggy/bambuddy/pull/625 **Author:** [@cadtoolbox](https://github.com/cadtoolbox) **Created:** 3/5/2026 **Status:** ✅ Merged **Merged:** 3/9/2026 **Merged by:** [@maziggy](https://github.com/maziggy) **Base:** `0.2.3b1` ← **Head:** `dev_forcecolormatch` --- ### 📝 Commits (10+) - [`5543358`](https://github.com/maziggy/bambuddy/commit/55433582b950c99ded70a1ab5e3db38a2723394a) Added "Force Color Match" feature to filament override - [`28117c8`](https://github.com/maziggy/bambuddy/commit/28117c870c4eb0eb0e7c9f63a40e0654d7f853db) Update settings.py - [`797a30b`](https://github.com/maziggy/bambuddy/commit/797a30bd33d90183603237e5e2f612249e53fed0) Update settings.py - [`32f4f18`](https://github.com/maziggy/bambuddy/commit/32f4f1883701a796475cddc31bac235a83abe28e) Label updates for warnings and checkbox case - [`590732d`](https://github.com/maziggy/bambuddy/commit/590732d96e46c5c25527b771649d19f1f4fd93db) Initial plan - [`218a63e`](https://github.com/maziggy/bambuddy/commit/218a63e818aef7e8647f13658892aba44e9e4056) Add noMatchingMaterial i18n translations to all 7 locale files - [`ea712dc`](https://github.com/maziggy/bambuddy/commit/ea712dc4344cce5db0a99b72188dba27838bfaf2) Use {{material}} interpolation in noMatchingMaterial; populate from filament_overrides with getColorName - [`3995793`](https://github.com/maziggy/bambuddy/commit/3995793162aa99a0e5a48fc91ba34d775b879b0b) Updates for PR#625 comments - [`b276b4b`](https://github.com/maziggy/bambuddy/commit/b276b4b36ac914409159dda47649deed611a6ff7) Added "Force Color Match" feature to filament override - [`635fb2e`](https://github.com/maziggy/bambuddy/commit/635fb2e38ea2a34d5ab5e858a453c79e4dd4352d) Update settings.py ### 📊 Changes **17 files changed** (+742 additions, -542 deletions) <details> <summary>View changed files</summary> 📝 `backend/app/services/print_scheduler.py` (+120 -11) 📝 `frontend/src/api/client.ts` (+3 -4) 📝 `frontend/src/components/PrintModal/FilamentOverride.tsx` (+69 -50) 📝 `frontend/src/components/PrintModal/index.tsx` (+50 -8) 📝 `frontend/src/components/PrinterQueueWidget.tsx` (+2 -19) 📝 `frontend/src/i18n/locales/de.ts` (+1 -0) 📝 `frontend/src/i18n/locales/en.ts` (+1 -0) 📝 `frontend/src/i18n/locales/fr.ts` (+1 -0) 📝 `frontend/src/i18n/locales/it.ts` (+1 -0) 📝 `frontend/src/i18n/locales/ja.ts` (+1 -0) 📝 `frontend/src/i18n/locales/pt-BR.ts` (+1 -0) 📝 `frontend/src/i18n/locales/zh-CN.ts` (+1 -0) 📝 `frontend/src/pages/PrintersPage.tsx` (+3 -17) 📝 `frontend/src/utils/printer.ts` (+55 -0) 📝 `static/assets/index-BHfcmN6A.js` (+430 -430) 📝 `static/assets/index-BoLtXYT2.css` (+1 -1) 📝 `static/index.html` (+2 -2) </details> ### 📄 Description ## Description This PR introduces a new **Force Color Match** feature to improve how Bambuddy matches filament/color information during print scheduling when selecting "Any Model" as the print method. When enabled, the system will **prefer a strict color match** (rather than “best effort” / fallback matching) to reduce incorrect filament assignments and improve archive consistency—especially for libraries with similarly-named filaments or overlapping color metadata. Bambuddy currently performs color/filament matching in a way that can occasionally: - Choose an unintended filament when multiple candidates are “close enough” - Fall back to a near match when an exact match exists but is not selected due to ordering/heuristics - Produce inconsistent assignments between imports depending on metadata completeness **Force Color Match** adds an explicit option to make matching behavior deterministic and stricter where users want accuracy over flexibility. ## Related Issue <!-- Link to the issue this PR addresses (if applicable) --> Fixes #604 ## Type of Change <!-- Mark the relevant option with an "x" --> - [ ] Bug fix (non-breaking change that fixes an issue) - [X] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [ ] Test addition or update ## Changes Made <!-- List the specific changes made in this PR --> - Adds a **Force Color Match** option in the UI where color/filament matching is configured/triggered. - When enabled, matching logic will: - Prefer **exact (or explicitly-defined) color matches** first - Avoid fallback candidates unless explicitly allowed/necessary - Provide clearer outcomes when a strict match cannot be found (e.g., prompt / warning / “unmatched” state) ## Screenshots <!-- If applicable, add screenshots to demonstrate your changes --> ![2026-03-05_16-18-51](https://github.com/user-attachments/assets/a3b1eaeb-c6f1-4f50-a59f-0da54324a2cb) ## Testing <!-- Describe how you tested your changes --> - [X] I have tested this on my local machine - [X] I have tested with my printer model: H2D Pro, X1E Testing involved: - Adding a print job with matching material/color as normal. - Adding a print job with no matching material/color. - Adding a print job with matching material/color after a no match job. Job jumps queue. - Adding filament to the AMS of desired color while a no matching material/color job is waiting. ## Checklist - [X] My code follows the project's coding style - [X] I have commented my code where necessary - [ ] I have updated the documentation (if needed) - [X] My changes generate no new warnings - [X] I have tested my changes thoroughly ## Additional Notes Additional testing with different printers, AMS combos and filament would be ideal. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:15:56 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy-maziggy-1#1087
No description provided.