feat: allow partial calibration entry#60
Conversation
Saving a calibration run required every selected filament to have complete, valid reads, so a wedge printed for eight filaments could not be saved until all eight were read in one sitting. The save path was already partial-aware: handleSave only writes entries with a complete input and an ok result, and onApply touches only the IDs it is given, so unread filaments were never at risk. The gate was the blocker. Save now enables on the first usable filament and reports how many will be written. The session JND fit previously bailed if any entry was incomplete, which would have quietly dropped a partially-filled Accurate run to the default JND. It now fits over the complete entries and ignores blanks. Discarding stays visible. A filament nobody touched is marked "Not entered" and dropped silently, which is fine. Anything typed that still cannot be saved -- an Accurate filament with some of its bases read, or a value below 1 -- is marked "Won't save" with a reason, tracked by whether a field was touched rather than whether it parsed. Scoped to whole filaments: a filament is saved once all of its base reads are in. That keeps handleSave's non-null read assertion valid, which saving from a subset of bases would break by admitting null opacity layers into stored calibration records. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The touched-state check only looks at the match-read fields and ignores mergeReads. If someone enters only a Merge value for one filament, that row is labeled Not entered and its input is silently discarded when another ready filament is saved. Please include mergeReads[target.key] when determining touched state, and add mergeReads to the memo dependencies. |
But isn't the match rail required? Why would we want to keep the optional merge value, if the required match wasn't specified? |
|
Correct, the match value is required, and I am not suggesting saving the merge value alone. My point was only that a non-empty merge field means the row was touched, so it could show "Won't save" rather than "Not entered" before that input is discarded. This is non-blocking if merge-only input is intentionally treated as untouched. |
Saving a calibration run required every selected filament to have complete, valid reads, so a wedge printed for eight filaments could not be saved until all eight were read in one sitting.
The save path was already partial-aware: handleSave only writes entries with a complete input and an ok result, and onApply touches only the IDs it is given, so unread filaments were never at risk. The gate was the blocker. Save now enables on the first usable filament and reports how many will be written.
The session JND fit previously bailed if any entry was incomplete, which would have quietly dropped a partially-filled Accurate run to the default JND. It now fits over the complete entries and ignores blanks.
Discarding stays visible. A filament nobody touched is marked "Not entered" and dropped silently, which is fine. Anything typed that still cannot be saved -- an Accurate filament with some of its bases read, or a value below 1 -- is marked "Won't save" with a reason, tracked by whether a field was touched rather than whether it parsed.