fix(ui): Task 11 review — verify false override end-to-end, move HasOverrideDelta to the partial, label wording

Claude-Session: https://claude.ai/code/session_01Y5ef34iUUMjmwnMpL9xgmB
This commit is contained in:
Joseph Doherty
2026-09-11 10:11:53 -04:00
parent cbb5e83633
commit c259614a78
4 changed files with 43 additions and 13 deletions
@@ -549,7 +549,7 @@
@* Tri-state: blank = inherit the template alarm's flag.
"Not reportable" is a real override, not a clear — it
pins a reportable template alarm off for this instance. *@
<label class="form-label small text-uppercase text-muted fw-semibold mb-1">MES reportable</label>
<label class="form-label small text-uppercase text-muted fw-semibold mb-1">MES reportable override</label>
<select class="form-select form-select-sm" data-test="alarm-mes-select" @bind="_editingMesReportableText">
<option value="">Inherited (@(_editingAlarm.IsMesReportable ? "reportable" : "not reportable"))</option>
<option value="true">Reportable</option>
@@ -1579,17 +1579,6 @@
return parts.Count == 0 ? "(empty)" : string.Join(", ", parts);
}
/// <summary>
/// The save-time delta rule: does the modal carry anything worth persisting?
/// When it does not, <see cref="SaveOverrideFromModal"/> DELETES any existing
/// override — so every override term must be represented here or it would be
/// silently dropped on save. A <c>false</c> MES-reportable choice counts: it
/// pins a reportable template alarm off for this instance, which is a real
/// override and not the same as inheriting.
/// </summary>
internal static bool HasOverrideDelta(string? overrideJson, int? priority, bool? mesReportable)
=> !string.IsNullOrWhiteSpace(overrideJson) || priority.HasValue || mesReportable.HasValue;
/// <summary>
/// Opens the override editor modal pre-populated with the merged
/// (inherited + existing override) config so the user sees the effective
@@ -115,6 +115,17 @@ public partial class InstanceConfigure
return new CsvOverrideImportOutcome(overrides, Array.Empty<string>());
}
/// <summary>
/// The save-time delta rule for the alarm-override modal: does it carry anything
/// worth persisting? When it does not, <c>SaveOverrideFromModal</c> DELETES any
/// existing override — so every override term must be represented here or it
/// would be silently dropped on save. A <c>false</c> MES-reportable choice
/// counts: it pins a reportable template alarm off for this instance, which is a
/// real override and not the same as inheriting.
/// </summary>
internal static bool HasOverrideDelta(string? overrideJson, int? priority, bool? mesReportable)
=> !string.IsNullOrWhiteSpace(overrideJson) || priority.HasValue || mesReportable.HasValue;
/// <summary>
/// One validated native-alarm-source retarget from an imported CSV: the source
/// binding's name plus the three optional override fields (null = keep the