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
+8
View File
@@ -235,6 +235,14 @@ test('pruning drops the matching readout slot and a dangling __last', () => {
);
});
test('single-pane forces the edit target back to All (no hidden pane edits)', () => {
assert.match(
src,
/if\s*\(\s*keys\.length\s*<=\s*1\s*\|\|\s*\(\s*_aspectEditTarget\s*&&\s*!reg\[_aspectEditTarget\]\s*\)\s*\)\s*\{\s*_aspectEditTarget\s*=\s*''/,
'_aspectBuildTargets must reset the edit target to "" when the Target row is hidden',
);
});
test('the panel has a dismiss (close) control', () => {
assert.match(
src,