Address review: force target to All when the pane picker is hidden

When only one pane is live the Target row is hidden, but _aspectEditTarget
could remain a specific pane key — silently routing edits into a hidden
(and persistent arr:*) override in single-player. Reset the edit target to
"" in _aspectBuildTargets whenever the row is hidden (or the selected pane
is gone), so single-pane edits always go to the shared base.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: topkoa <topkoa@gmail.com>
This commit is contained in:
topkoa
2026-07-01 02:38:58 -04:00
co-authored by Claude Opus 4.8
parent 817db6382b
commit 58047e6ad6
2 changed files with 15 additions and 1 deletions
+7 -1
View File
@@ -1837,7 +1837,13 @@
o.value = pk; o.textContent = reg[pk].label;
_aspectTargetSel.appendChild(o);
});
if (_aspectEditTarget && !reg[_aspectEditTarget]) _aspectEditTarget = '';
// Force the edit target back to "All" when the Target row is hidden
// (single pane) or the selected pane is gone — otherwise a stale pane
// target would silently route edits into a hidden (and persistent
// arr:*) override in single-player.
if (keys.length <= 1 || (_aspectEditTarget && !reg[_aspectEditTarget])) {
_aspectEditTarget = '';
}
_aspectTargetSel.value = _aspectEditTarget;
// The Target row only matters with more than one pane (a split). With a
// single pane there's nothing to disambiguate, so hide it.