fix: hide the settled guides copy for the whole gesture, and prove it (#521)

Code review r1 was right that AC5's evidence was empty: the smoke never
forced a settled render during a gesture, so the settled copy of
`.hp-editor-only-layer` was empty at every point it looked, and
`groups() === 1` held whether the copy was hidden or not.

Measuring the case the reviewer named turned up more than a weak assertion.
Ownership of the layer alternates on its own — every settled render ends in
`updated()` → `_commitLiveEditor()`, which empties the live root — so a
settled render mid-gesture takes the guides back and draws them itself, from
the same live `_alignPoint`. That much needs no suppression. But the copy it
leaves behind stays in the settled scene, and the NEXT live paint adds a
second one: measured two `.alignline` on one alignment, the settled one a
grid step behind the marker. So the suppression stays, and now it stays with
a witness.

The smoke counts what is visible, not what is in the DOM: the hidden copy is
still a node, and counting nodes is how this check could have looked green
while showing the user two lines. Its device scenario now drives the whole
handover — force an unrelated settled render mid-drag (`_hdrH`, the same
header-height observer that masked the defect in the S2 measurements), assert
the render actually happened, that the layer went back to the settled scene
with the live point on it, and that one real move later the live painter owns
it again — exactly one visible guide at every step.

Mutant `live-editor-keeps-the-settled-guides-visible` puts the suppression
back under the plan branch, as it was before this issue, and the smoke goes
red on `nextMoveTakesTheLayerBack`.

Issue: #521
User-Visible: no
This commit is contained in:
Claude
2026-09-10 23:25:46 +03:00
parent deebcfb095
commit 9a3af808d9
48 changed files with 451 additions and 355 deletions
+16
View File
@@ -7334,6 +7334,22 @@ const MUTANT_DEFINITIONS = [
replace: " ${host._tool === 'draw' ? nothing : host._renderPlanSnapOverlay()}",
}],
},
{
id: 'live-editor-keeps-the-settled-guides-visible',
guard: 'node demo/smoke_align_guides.mjs',
because: 'a settled render landing mid-gesture leaves its own guides behind; without '
+ 'hiding that copy the next live paint adds a second one, and the leftover is a step '
+ 'behind the marker — two dashed lines for one alignment (#521 AC5)',
patches: [{
file: 'src/live-editor.ts',
find: " makeTransparent(state, root, '.hp-editor-only-layer:not(.hp-plan-snap-layer)');\n"
+ " if (host._mode === 'plan') {\n"
+ ' if (host._opDrag) hide(state, root, \'.wallbodies\');',
replace: " if (host._mode === 'plan') {\n"
+ " makeTransparent(state, root, '.hp-editor-only-layer:not(.hp-plan-snap-layer)');\n"
+ ' if (host._opDrag) hide(state, root, \'.wallbodies\');',
}],
},
{
id: 'align-point-reads-frozen-snapshot',
guard: 'node demo/smoke_align_guides.mjs',