This branch stacks on enh/178-swatch-grid and makes the Stage 3 swatch-grid traffic-light thresholds user-configurable.
Changes
Added AppSettings.delta_e_good_max and AppSettings.delta_e_warning_max (defaults 2.0 / 5.0) with serde default functions and a validate() method.
Backend save_settings validates the invariant good < warning and non-negative values; unit tests cover defaults, deserialization defaults, and validation.
Added Settings dialog UI with two type="number" inputs, live frontend validation, and an error hint.
settings.js loads and persists the thresholds and dispatches a settings-saved custom event on success.
swatch_grid.js listens for settings-saved, reloads thresholds, and re-classifies all already-rendered patches. New patches use the current thresholds and store their raw ΔE in data-delta-e.
Tooltip now includes the ΔE classification word (Good / Warning / Bad).
Updated AGENTS.md, README.md, and ROADMAP.md.
Verification
CARGO_INCREMENTAL=0 cargo test in src-tauri/: 75 passed (including 3 new settings tests).
Closes #184.
This branch stacks on `enh/178-swatch-grid` and makes the Stage 3 swatch-grid traffic-light thresholds user-configurable.
### Changes
- Added `AppSettings.delta_e_good_max` and `AppSettings.delta_e_warning_max` (defaults 2.0 / 5.0) with serde default functions and a `validate()` method.
- Backend `save_settings` validates the invariant `good < warning` and non-negative values; unit tests cover defaults, deserialization defaults, and validation.
- Added Settings dialog UI with two `type="number"` inputs, live frontend validation, and an error hint.
- `settings.js` loads and persists the thresholds and dispatches a `settings-saved` custom event on success.
- `swatch_grid.js` listens for `settings-saved`, reloads thresholds, and re-classifies all already-rendered patches. New patches use the current thresholds and store their raw ΔE in `data-delta-e`.
- Tooltip now includes the ΔE classification word (Good / Warning / Bad).
- Updated `AGENTS.md`, `README.md`, and `ROADMAP.md`.
### Verification
- `CARGO_INCREMENTAL=0 cargo test` in `src-tauri/`: 75 passed (including 3 new settings tests).
- Add AppSettings fields delta_e_good_max / delta_e_warning_max with
serde defaults (2.0 / 5.0) and validation on save.
- Add Settings dialog UI for the two threshold inputs with live frontend
validation and a backend validate() method / unit tests.
- Dispatch a settings-saved custom event so the swatch grid can re-classify
existing patches on the fly.
- Refactor swatch_grid.js to load thresholds from settings, classify using
current bounds, store raw ΔE on each patch element, and re-classify on
settings change.
- Update AGENTS.md, README.md, and ROADMAP.md.
Generated with Devin
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #184.
This branch stacks on
enh/178-swatch-gridand makes the Stage 3 swatch-grid traffic-light thresholds user-configurable.Changes
AppSettings.delta_e_good_maxandAppSettings.delta_e_warning_max(defaults 2.0 / 5.0) with serde default functions and avalidate()method.save_settingsvalidates the invariantgood < warningand non-negative values; unit tests cover defaults, deserialization defaults, and validation.type="number"inputs, live frontend validation, and an error hint.settings.jsloads and persists the thresholds and dispatches asettings-savedcustom event on success.swatch_grid.jslistens forsettings-saved, reloads thresholds, and re-classifies all already-rendered patches. New patches use the current thresholds and store their raw ΔE indata-delta-e.AGENTS.md,README.md, andROADMAP.md.Verification
CARGO_INCREMENTAL=0 cargo testinsrc-tauri/: 75 passed (including 3 new settings tests).Pull request closed