Skip to content

Fix: Wire up missing Vuex mutation setCalibrationPattern and calibValidationResult state#119

Open
midaa1 wants to merge 1 commit intoruxailab:mainfrom
midaa1:deed-code
Open

Fix: Wire up missing Vuex mutation setCalibrationPattern and calibValidationResult state#119
midaa1 wants to merge 1 commit intoruxailab:mainfrom
midaa1:deed-code

Conversation

@midaa1
Copy link
Copy Markdown
Contributor

@midaa1 midaa1 commented Mar 7, 2026

Problem

PostCalibration.vue's applyCalibResult() method was silently broken across two missing links:

  1. It read calibValidationResult from the predict store — a property that never existed in state
  2. It committed setCalibrationPattern — a mutation that was never defined in calibration.js

The method always exited at the null-guard, meaning the adapted calibration pattern (with prediction coordinates, precision, and accuracy) was never reactively stored. Post-calibration visualizations only worked because DoubleCalibrationRecord.vue was directly mutating pattern objects in place — bypassing Vuex reactivity entirely and leaving the app in a fragile, unpredictable state.


Changes

File What changed
src/store/predict.js Added calibValidationResult to state + setCalibValidationResult mutation
src/store/calibration.js Added setCalibrationPattern mutation to properly set runtime.usedPattern
src/views/DoubleCalibrationRecord.vue Commits setCalibValidationResult with prediction data after API response, so the result is available when PostCalibration mounts

Screenshot 2026-03-07 110045

Why this matters

Without this fix, any future code that relies on calibValidationResult being populated would silently discard the adapted pattern and render drawCalibPoints() with no predictionX/predictionY — producing empty visualizations and NaN centroids. This PR closes that latent failure path and replaces the direct mutation workaround with a proper reactive store flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant