Skip to content

test: read runtime paint from page-paint.js when the aim sweep compares page markup - #7413

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-7405
Nov 27, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-7405

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

The aim sweep's PAGE_MARKUP kept its own hand-written list of the runtime's paint attributes, and that list was missing data-lf-beside-marker. readMarkRoom (browser/runtime/dom/geometry.js) writes that attribute on a list item while the composer's pending mark stands on it, and leaves it there after the mark goes. A leftover stamp decides nothing, since element-marks.css applies it only while a mark is showing. Before #7304, the seeded 👍 on ship-review drew a mark at rest, so the stamp was already in the "before" reading. Now the reaction draws as a thread with no mark, so the stamp first appears during the sweep's ⌥-click. The comparison then counted it as a widget reached by the press. Nothing in #7304's intent is at stake: the only difference was this one presentation attribute.

PAGE_MARKUP now imports RUNTIME_PAINT_ATTRIBUTE from /runtime/base/page-paint.js and strips every attribute in it, as source snapshots already do, plus the element marks' data-lf-mark and data-lf-projected-mark. That list has been widened by hand four times (git log -L). A new kind of paint now joins page-paint.js and reaches the sweep with no edit to the test. The sweep still catches what it protects: a stray pick or tab switch changes authored attributes, and a stray decision shows up in the log assertion that follows.

tests/journeys/test_render_aim.py::test_an_aimed_press_does_only_what_the_outline_promised[ship-review] fails on main at 6a95224 with the data-lf-beside-marker="left" diff. With this change all three parametrizations pass, and so does tests/browser/test_render_aim.py::test_design_mode_comments_on_what_a_press_lands_on_and_nothing_else, the only other caller of PAGE_MARKUP.

Closes #7405 — automated triage

…es page markup

The aim sweep's PAGE_MARKUP kept its own list of the runtime's paint
attributes, and that list missed `data-lf-beside-marker`. readMarkRoom
writes it on a list item while the composer's pending mark stands there,
and leaves it once the mark goes, where it decides nothing. Since #7304
the seeded 👍 on ship-review draws no mark at rest, so the stamp first
appears during the sweep's ⌥-click, and the comparison read it as a
widget the press had reached. The reading now strips every
RUNTIME_PAINT_ATTRIBUTE, imported from the runtime, plus the element
marks' attributes. A new kind of paint joins page-paint.js and the sweep
gets it with no edit here. The sweep still catches what it protects: a
stray pick or tab switch changes authored attributes, and a stray
decision shows in the log.

Closes #7405
@leaf-agent
leaf-agent merged commit e5c38d0 into main Nov 27, 2026
7 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-7405 branch November 27, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_an_aimed_press_does_only_what_the_outline_promised[ship-review]: a data-lf-beside-marker attribute appears on the ⌥-click since #7304

1 participant