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

[PR #720] [MERGED] [Feature] Add material mismatch and insufficient filament checks #1108

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

📋 Pull Request Information

Original PR: https://github.com/maziggy/bambuddy/pull/720
Author: @Keybored02
Created: 3/16/2026
Status: Merged
Merged: 3/16/2026
Merged by: @maziggy

Base: devHead: feature/material_mismatch_3


📝 Commits (10+)

  • 25d1bef Add material mismatch check
  • 96d208c Add insufficient filament warning
  • ba119a4 Fix duplicated imports after merge
  • e298126 Fix spool assignments query, mismatch dialog premature closing, confirm modal black text, add missing de.ts, fr.ts, and ja.ts locales
  • 1c1d3f0 Fix missing locales
  • 340fd59 Fix formatting
  • fcca966 Refactor settings and update filament mismatch handling; add UI for filament checks and update localization strings
  • 489b985 Merge branch 'dev' into feature/material_mismatch_3
  • 1743655 Merge branch 'dev' into feature/material_mismatch_3
  • 6243281 Update ja.ts

📊 Changes

16 files changed (+436 additions, -23 deletions)

View changed files

📝 backend/app/api/routes/settings.py (+1 -0)
📝 backend/app/schemas/settings.py (+5 -0)
📝 frontend/src/api/client.ts (+2 -0)
📝 frontend/src/components/AssignSpoolModal.tsx (+172 -8)
📝 frontend/src/components/ConfirmModal.tsx (+2 -2)
📝 frontend/src/components/PrintModal/index.tsx (+130 -6)
📝 frontend/src/components/SpoolmanSettings.tsx (+1 -0)
📝 frontend/src/i18n/locales/de.ts (+12 -0)
📝 frontend/src/i18n/locales/en.ts (+12 -0)
📝 frontend/src/i18n/locales/fr.ts (+13 -1)
📝 frontend/src/i18n/locales/it.ts (+13 -1)
📝 frontend/src/i18n/locales/ja.ts (+12 -1)
📝 frontend/src/i18n/locales/pt-BR.ts (+12 -0)
📝 frontend/src/i18n/locales/zh-CN.ts (+12 -0)
📝 frontend/src/pages/PrintersPage.tsx (+10 -4)
📝 frontend/src/pages/SettingsPage.tsx (+27 -0)

📄 Description

Description

Add material mismatch check when assigning non-BL spools. The warning can be dismissed. Added checks prior to printing for insufficient filament on the spool. This is a re-merge of #361, #502 and #572 for branch dev.

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

  • Behaviour: match full word first, trayInfo.type against selectedSpool?.material. If it's a perfect match, check the trayInfo.profile and selectedSpool?.profile. If they do match, no prompt to confirm. If type cannot be matched to anything, or it matches partially with some char excluded, or the profiles do not match, prompt to confirm
  • Added confirm modal with localized strings to cover all cases of mismatch
  • Added checks for insufficient material to PrintModal
  • Added toggle in Setting to disable insufficiency warning

Screenshots

image image

Testing

  • I have tested this on my local machine
  • I have tested with my printer model: H2C

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

🔄 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/720 **Author:** [@Keybored02](https://github.com/Keybored02) **Created:** 3/16/2026 **Status:** ✅ Merged **Merged:** 3/16/2026 **Merged by:** [@maziggy](https://github.com/maziggy) **Base:** `dev` ← **Head:** `feature/material_mismatch_3` --- ### 📝 Commits (10+) - [`25d1bef`](https://github.com/maziggy/bambuddy/commit/25d1bef16a0ec72bf0564083f68841829cff0c5a) Add material mismatch check - [`96d208c`](https://github.com/maziggy/bambuddy/commit/96d208ca8126d51914a97f3e1ddda9e46518c3f9) Add insufficient filament warning - [`ba119a4`](https://github.com/maziggy/bambuddy/commit/ba119a449cd8aa9da93d69e774323358701082df) Fix duplicated imports after merge - [`e298126`](https://github.com/maziggy/bambuddy/commit/e2981262de3711f8ed5b16bc9356ce263a7a921f) Fix spool assignments query, mismatch dialog premature closing, confirm modal black text, add missing de.ts, fr.ts, and ja.ts locales - [`1c1d3f0`](https://github.com/maziggy/bambuddy/commit/1c1d3f09f6a62a303897eb945b62ae65d60036f0) Fix missing locales - [`340fd59`](https://github.com/maziggy/bambuddy/commit/340fd598313502eb317931bc9276cf105a3cd70c) Fix formatting - [`fcca966`](https://github.com/maziggy/bambuddy/commit/fcca966805834d038378f740ae1950e86478b411) Refactor settings and update filament mismatch handling; add UI for filament checks and update localization strings - [`489b985`](https://github.com/maziggy/bambuddy/commit/489b9852311e768d1678a0d50e1584d6367693e9) Merge branch 'dev' into feature/material_mismatch_3 - [`1743655`](https://github.com/maziggy/bambuddy/commit/1743655f608f96adff02d5931adab5ad905da817) Merge branch 'dev' into feature/material_mismatch_3 - [`6243281`](https://github.com/maziggy/bambuddy/commit/624328125fddada3e8ffe13c9d939aa4a4d16d42) Update ja.ts ### 📊 Changes **16 files changed** (+436 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `backend/app/api/routes/settings.py` (+1 -0) 📝 `backend/app/schemas/settings.py` (+5 -0) 📝 `frontend/src/api/client.ts` (+2 -0) 📝 `frontend/src/components/AssignSpoolModal.tsx` (+172 -8) 📝 `frontend/src/components/ConfirmModal.tsx` (+2 -2) 📝 `frontend/src/components/PrintModal/index.tsx` (+130 -6) 📝 `frontend/src/components/SpoolmanSettings.tsx` (+1 -0) 📝 `frontend/src/i18n/locales/de.ts` (+12 -0) 📝 `frontend/src/i18n/locales/en.ts` (+12 -0) 📝 `frontend/src/i18n/locales/fr.ts` (+13 -1) 📝 `frontend/src/i18n/locales/it.ts` (+13 -1) 📝 `frontend/src/i18n/locales/ja.ts` (+12 -1) 📝 `frontend/src/i18n/locales/pt-BR.ts` (+12 -0) 📝 `frontend/src/i18n/locales/zh-CN.ts` (+12 -0) 📝 `frontend/src/pages/PrintersPage.tsx` (+10 -4) 📝 `frontend/src/pages/SettingsPage.tsx` (+27 -0) </details> ### 📄 Description ## Description Add material mismatch check when assigning non-BL spools. The warning can be dismissed. Added checks prior to printing for insufficient filament on the spool. This is a re-merge of #361, #502 and #572 for branch dev. ## 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 - Behaviour: match full word first, `trayInfo.type` against `selectedSpool?.materia`l. If it's a perfect match, check the `trayInfo.profile` and `selectedSpool?.profile`. If they do match, no prompt to confirm. If type cannot be matched to anything, or it matches partially with some char excluded, or the profiles do not match, prompt to confirm - Added confirm modal with localized strings to cover all cases of mismatch - Added checks for insufficient material to `PrintModal` - Added toggle in Setting to disable insufficiency warning ## Screenshots <img width="473" height="226" alt="image" src="https://github.com/user-attachments/assets/5ee142cd-5832-4b3b-b189-3f5562f35ca6" /> <img width="535" height="654" alt="image" src="https://github.com/user-attachments/assets/b39b1033-4b5a-4775-9589-7b7565c3daab" /> <!-- If applicable, add screenshots to demonstrate your changes --> ## Testing <!-- Describe how you tested your changes --> - [x] I have tested this on my local machine - [x] I have tested with my printer model: H2C ## 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:16:02 +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#1108
No description provided.