Commit a8a2fc7
fix(gui): clear stale result on successful run, not on mode switch (F10 vs #70)
The first F10 pass cleared the previous mode's result inside _on_mode_change, but
that defeated release-gate contract #70
(test_run_validation_error_preserves_previous_valid_result_overview): switching
mode then hitting a validation error left "No results" because the result was
already wiped at switch time, so there was nothing to preserve.
Reconcile by moving the clear off the switch: a successful run in the new mode
replaces the result (so stale wrong-mode output is never shown/exported once you
actually compute — F10's real intent, satisfied via the _on_calc_finished ->
_show_*_results path), while a failed or validation-errored run returns early and
keeps the last good result (#70). Rewrite F10's own test to assert the new
timing (switch preserves; a successful run replaces).
Both previously-conflicting tests pass; 221 neighborhood tests pass; ruff clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 08c56a8 commit a8a2fc7
2 files changed
Lines changed: 22 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2180 | 2180 | | |
2181 | 2181 | | |
2182 | 2182 | | |
2183 | | - | |
2184 | | - | |
2185 | | - | |
2186 | | - | |
2187 | | - | |
2188 | | - | |
2189 | | - | |
2190 | | - | |
2191 | | - | |
2192 | | - | |
| 2183 | + | |
| 2184 | + | |
| 2185 | + | |
| 2186 | + | |
| 2187 | + | |
| 2188 | + | |
2193 | 2189 | | |
2194 | 2190 | | |
2195 | 2191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | | - | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
| 46 | + | |
43 | 47 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
47 | 56 | | |
48 | 57 | | |
49 | 58 | | |
| |||
0 commit comments