mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 19:21:33 +02:00
The Filament Mapping panel reported "(Ready)" with a green tick for a slot where the slice wanted dark red and the auto-matched tray held dark green. Manually picking that same tray reported the mismatch correctly, which is what made it obvious something was inconsistent. Auto-match ranks candidates by tray_info_idx first, and a uniquely-matching preset was accepted as definitive on the premise "same preset = same spool = same colour". The preset names the variant, not the spool: GFA00 is PLA Basic, GFA01 PLA Matte, GFA17 PLA Translucent, in every colour Bambu sells. The reporter's own bundle has eight GFA00 trays in eight colours. With one Matte spool loaded, every Matte requirement idx-matched it and the colour comparison was never reached - which is why this surfaced on PLA Matte and not on Basic, where several spools are usually loaded and the match falls through to the branch that does compare colours. The verdict now comes from the tray that was selected rather than from which rule selected it, and both branches share one comparison so they cannot drift apart again. Selection is unchanged - the right variant still wins per mismatch and the slot stays selected. A requirement with no colour at all is treated as satisfied rather than mismatched; 3MFs that omit it parse to "" and there is nothing to disagree with. That also affects the manual branch, which used to flag it. No dispatch change: _get_missing_force_color_slots already required an exact colour, so force colour match was gated correctly throughout.
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])