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

[PR #572] [CLOSED] Add material mismatch and insufficient filament checks #1074

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

📋 Pull Request Information

Original PR: https://github.com/maziggy/bambuddy/pull/572
Author: @Keybored02
Created: 3/2/2026
Status: Closed

Base: 0.2.3b1Head: feature/material_mismatch_2


📝 Commits (10+)

  • 8ddc736 Add material mismatch check
  • ca04660 Add insufficient filament warning
  • ef84987 Fix duplicated imports after merge
  • d775600 Fix spool assignments query, mismatch dialog premature closing, confirm modal black text, add missing de.ts, fr.ts, and ja.ts locales
  • b531808 Fix missing locales
  • 06b04db Fix formatting
  • 1d89e6e Locales fix #2
  • 8aaa9bd Add material mismatch check
  • cf4c6a3 Add insufficient filament warning
  • e554abb Fix duplicated imports after merge

📊 Changes

16 files changed (+518 additions, -216 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 (+264 -128)
📝 frontend/src/components/ConfirmModal.tsx (+2 -2)
📝 frontend/src/components/PrintModal/index.tsx (+131 -7)
📝 frontend/src/components/SpoolmanSettings.tsx (+1 -0)
📝 frontend/src/i18n/locales/de.ts (+12 -2)
📝 frontend/src/i18n/locales/en.ts (+12 -2)
📝 frontend/src/i18n/locales/fr.ts (+11 -2)
📝 frontend/src/i18n/locales/it.ts (+18 -63)
📝 frontend/src/i18n/locales/ja.ts (+12 -4)
📝 frontend/src/i18n/locales/pt-BR.ts (+12 -2)
📝 frontend/src/i18n/locales/zh-CN.ts (+1 -0)
📝 frontend/src/pages/PrintersPage.tsx (+7 -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 and #502 for branch 0.2.2b1.

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, Filament 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/572 **Author:** [@Keybored02](https://github.com/Keybored02) **Created:** 3/2/2026 **Status:** ❌ Closed **Base:** `0.2.3b1` ← **Head:** `feature/material_mismatch_2` --- ### 📝 Commits (10+) - [`8ddc736`](https://github.com/maziggy/bambuddy/commit/8ddc736ca377d2c29c5e0020b5388bcb28478d63) Add material mismatch check - [`ca04660`](https://github.com/maziggy/bambuddy/commit/ca04660c786cc2561bca881729fc74e544b040a2) Add insufficient filament warning - [`ef84987`](https://github.com/maziggy/bambuddy/commit/ef849879029cc85be31281cbe6fc95b3bb1fdebb) Fix duplicated imports after merge - [`d775600`](https://github.com/maziggy/bambuddy/commit/d77560033936fc7be3e0f0f138d49a5b8a0fb6a4) Fix spool assignments query, mismatch dialog premature closing, confirm modal black text, add missing de.ts, fr.ts, and ja.ts locales - [`b531808`](https://github.com/maziggy/bambuddy/commit/b531808eb4ef4df1f0f594ad13563b713c08e78b) Fix missing locales - [`06b04db`](https://github.com/maziggy/bambuddy/commit/06b04dbf5d494e369969fa0be01020fbf7174ca6) Fix formatting - [`1d89e6e`](https://github.com/maziggy/bambuddy/commit/1d89e6e526168152ad5154f6e14a722396dcd90b) Locales fix #2 - [`8aaa9bd`](https://github.com/maziggy/bambuddy/commit/8aaa9bd5f3a4b3a981b00bf5a8610cf3eb5aac73) Add material mismatch check - [`cf4c6a3`](https://github.com/maziggy/bambuddy/commit/cf4c6a38a8420b2de1092ff4c77f6c79a7200c88) Add insufficient filament warning - [`e554abb`](https://github.com/maziggy/bambuddy/commit/e554abbfe2f0e9936b1d01af87aae66a58c24093) Fix duplicated imports after merge ### 📊 Changes **16 files changed** (+518 additions, -216 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` (+264 -128) 📝 `frontend/src/components/ConfirmModal.tsx` (+2 -2) 📝 `frontend/src/components/PrintModal/index.tsx` (+131 -7) 📝 `frontend/src/components/SpoolmanSettings.tsx` (+1 -0) 📝 `frontend/src/i18n/locales/de.ts` (+12 -2) 📝 `frontend/src/i18n/locales/en.ts` (+12 -2) 📝 `frontend/src/i18n/locales/fr.ts` (+11 -2) 📝 `frontend/src/i18n/locales/it.ts` (+18 -63) 📝 `frontend/src/i18n/locales/ja.ts` (+12 -4) 📝 `frontend/src/i18n/locales/pt-BR.ts` (+12 -2) 📝 `frontend/src/i18n/locales/zh-CN.ts` (+1 -0) 📝 `frontend/src/pages/PrintersPage.tsx` (+7 -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 and #502 for branch 0.2.2b1. ## Related Issue ## 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, Filament 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="533" height="532" alt="image" src="https://github.com/user-attachments/assets/f22a3a1f-b492-4d89-b5ef-ca39fc92bb18" /> <!-- 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:15:51 +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#1074
No description provided.