[PR #531] [MERGED] Add customizable low stock threshold, add low stock filter #1061

Closed
opened 2026-05-06 12:34:45 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

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

Base: 0.2.2b1Head: feature/low_spool_edit


📝 Commits (10+)

  • 4e80efe feat(queue): show spool grams left in filament slot mapping
  • f7459d1 Merge branch '0.2.2b1' into custom/feature-queue-spool-remaining-weight
  • 0bb4682 Bumped version
  • 72e94ce Add SpoolBuddy AMS slot config, external slots, and dashboard redesign
  • 0310574 Fix SpoolBuddy daemon crash when read_tag module is missing
  • d0877bd Fix SpoolBuddy daemon failing to import hardware drivers
  • 1e88d14 Increase scale moving average window to reduce weight bouncing
  • 7f38e30 Remove stability flipping as scale report trigger
  • c936945 Merge branch '0.2.2b1' into custom/feature-queue-spool-remaining-weight
  • 7104b56 Fix formatting of option elements in FilamentMapping

📊 Changes

12 files changed (+531 additions, -12 deletions)

View changed files

📝 backend/app/api/routes/settings.py (+1 -0)
📝 backend/app/schemas/settings.py (+9 -0)
📝 backend/tests/integration/test_settings_api.py (+21 -0)
frontend/src/__tests__/pages/InventoryPageLowStock.test.tsx (+392 -0)
📝 frontend/src/api/client.ts (+2 -0)
📝 frontend/src/i18n/locales/de.ts (+1 -1)
📝 frontend/src/i18n/locales/en.ts (+1 -1)
📝 frontend/src/i18n/locales/fr.ts (+1 -1)
📝 frontend/src/i18n/locales/it.ts (+1 -0)
📝 frontend/src/i18n/locales/ja.ts (+1 -1)
📝 frontend/src/i18n/locales/pt-BR.ts (+1 -1)
📝 frontend/src/pages/InventoryPage.tsx (+100 -7)

📄 Description

Description

Make the low spool threshold customizable instead of hard-coded to 20%. Add a new filter to the Filament page to show only low spools.

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

  • Added UI and logic to let users edit and persist the "low stock" threshold (default 20%) via localStorage
  • Introduced a "Low Stock" filter button in the inventory page

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

Additional Notes


🔄 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/531 **Author:** [@Keybored02](https://github.com/Keybored02) **Created:** 2/26/2026 **Status:** ✅ Merged **Merged:** 3/3/2026 **Merged by:** [@maziggy](https://github.com/maziggy) **Base:** `0.2.2b1` ← **Head:** `feature/low_spool_edit` --- ### 📝 Commits (10+) - [`4e80efe`](https://github.com/maziggy/bambuddy/commit/4e80efec3f24bc1ddc3558d28301b3fbf3465da1) feat(queue): show spool grams left in filament slot mapping - [`f7459d1`](https://github.com/maziggy/bambuddy/commit/f7459d1934d9a99e26c801f82188fd5a8256f769) Merge branch '0.2.2b1' into custom/feature-queue-spool-remaining-weight - [`0bb4682`](https://github.com/maziggy/bambuddy/commit/0bb468237b290766c56f6983060b2206d7d640d9) Bumped version - [`72e94ce`](https://github.com/maziggy/bambuddy/commit/72e94ce6f9f1de04eb72028bd0480c8ecba4806e) Add SpoolBuddy AMS slot config, external slots, and dashboard redesign - [`0310574`](https://github.com/maziggy/bambuddy/commit/0310574db8eaa8027d47c31a30444c298e22acf8) Fix SpoolBuddy daemon crash when read_tag module is missing - [`d0877bd`](https://github.com/maziggy/bambuddy/commit/d0877bd4c4ad0ccd2a785ceb87b092ac970011ae) Fix SpoolBuddy daemon failing to import hardware drivers - [`1e88d14`](https://github.com/maziggy/bambuddy/commit/1e88d14678f7791e93b3321a82bdfe67346acff0) Increase scale moving average window to reduce weight bouncing - [`7f38e30`](https://github.com/maziggy/bambuddy/commit/7f38e3038c338afce4371e180c90b4e452334fb2) Remove stability flipping as scale report trigger - [`c936945`](https://github.com/maziggy/bambuddy/commit/c93694584bdcf07e4e9a39da9a3d3de01d96748b) Merge branch '0.2.2b1' into custom/feature-queue-spool-remaining-weight - [`7104b56`](https://github.com/maziggy/bambuddy/commit/7104b56c068b3018a7362c2f5bc1905ecdfdf8b4) Fix formatting of option elements in FilamentMapping ### 📊 Changes **12 files changed** (+531 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `backend/app/api/routes/settings.py` (+1 -0) 📝 `backend/app/schemas/settings.py` (+9 -0) 📝 `backend/tests/integration/test_settings_api.py` (+21 -0) ➕ `frontend/src/__tests__/pages/InventoryPageLowStock.test.tsx` (+392 -0) 📝 `frontend/src/api/client.ts` (+2 -0) 📝 `frontend/src/i18n/locales/de.ts` (+1 -1) 📝 `frontend/src/i18n/locales/en.ts` (+1 -1) 📝 `frontend/src/i18n/locales/fr.ts` (+1 -1) 📝 `frontend/src/i18n/locales/it.ts` (+1 -0) 📝 `frontend/src/i18n/locales/ja.ts` (+1 -1) 📝 `frontend/src/i18n/locales/pt-BR.ts` (+1 -1) 📝 `frontend/src/pages/InventoryPage.tsx` (+100 -7) </details> ### 📄 Description ## Description Make the low spool threshold customizable instead of hard-coded to 20%. Add a new filter to the Filament page to show only low spools. ## 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 --> - Added UI and logic to let users edit and persist the "low stock" threshold (default 20%) via localStorage - Introduced a "Low Stock" filter button in the inventory page ## Screenshots <img width="325" height="126" alt="image" src="https://github.com/user-attachments/assets/924ad700-6286-47ae-9244-70a1c5aa22bb" /> <img width="277" height="46" alt="image" src="https://github.com/user-attachments/assets/ee5d3dd2-14a8-4313-b28f-aaeedd98144b" /> ## 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 ## Additional Notes <!-- Add any additional information that reviewers should know --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 12:34:45 +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#1061
No description provided.