fix: drop the unreachable virtual-radio guard, keep honest evidence (#385 r2-M1)

An already-checked radio input fires no change event, so the same-binding
guard on the virtual branch was dead code and its smoke assert vacuous.
Removed both; a comment documents why the reset there is always
legitimate. The candidate-list guard (the reachable path) stays tested.

User-Visible: no
Issue: #385
This commit is contained in:
Codex
2026-08-30 11:44:57 +03:00
parent c872c93516
commit e561e5fc5d
21 changed files with 160 additions and 167 deletions
+4 -7
View File
@@ -12251,13 +12251,10 @@ public _renderMarkerDialog(): TemplateResult {
<label class="srcrow">
<input type="radio" name="bmode" .checked=${d.bindingMode === 'virtual'}
@change=${() => {
// #385(а): re-selecting the current binding must not reset
// the configured value source or badge — spec #378 §1.6
// demands the reset only on an actual CHANGE of binding.
if (d.binding === 'virtual') {
this.host._markerDialog = { ...d, bindingMode: 'virtual', bindingOpen: false };
return;
}
// #385(а) r2-M1: no same-binding guard here on purpose — a
// radio input fires no change event when it is already
// checked, so this branch runs only on an actual switch to
// virtual; the reset below is therefore always legitimate.
const next = {
...d, bindingMode: 'virtual' as const, binding: 'virtual', bindingOpen: false,
controls: persistedExternalControls('virtual', d.controls),