Skip to content

fix: read obligation location before painting focus contours - #4583

Merged
leaf-agent merged 3 commits into
mainfrom
fix/issue-4315-location
Oct 28, 2026
Merged

leaf-agent merged 3 commits into
mainfrom
fix/issue-4315-location

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

The annotation painter read data-lf-obligation before the obligation view reflected a new location. During an obligation walk it could add and remove lf-projected-mark within one turn, producing the unchanged class write. It now reads the obligation owner's existing current-location API and shown parts, preserving #4337's single-ring behavior without depending on painter order.

The narrow ask case reproduces on current main at 6× CPU slowdown. A deterministic runtime regression fails before the repair and passes afterward, covering arrival before attribute reflection and departure while that attribute is stale. Six navigation cases pass at 10× slowdown, including both reported ask/suggestion cases and the original walk variants; the readiness and keyboard/pointer ring checks also pass. All 695 runtime tests, pnpm run check, and focused pre-commit checks pass.

The ideas-ask and plan-card-keyboard stills are unchanged against main: the repair removes an intermediate projection, preserving settled focus and thread paint.

Startup comparison on review-a-plan has the same 38 requests before presentation and adds 198 JavaScript bytes. The location reading must be current when focus paints; it adds no deferred loading or timer.

Closes #4315 — automated triage

The annotation painter read data-lf-obligation before the obligation view reflected the current location. An obligation walk could add and remove lf-projected-mark within one task, triggering the write watch. Read the existing location API and its shown parts instead, preserving the single-ring decision from #4337 without depending on painter order.

The reported 390px obligation-discussion case fails before this change and passes afterward. Both widths, focus-ring routes and first-replay readiness pass (five cases); pnpm run check passes.

Closes #4315
The annotation painter read data-lf-obligation before the obligation owner reflected the new location. A walk could add then remove lf-projected-mark in one turn. Read the existing owner and its shown parts, retaining the single-ring behavior from #4337 without depending on paint order. The regression covers both arriving before reflection and leaving while reflection is stale.

Closes #4315
@leaf-agent
leaf-agent merged commit caa472a into main Oct 28, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-4315-location branch October 28, 2026 10:27
max-sixty added a commit that referenced this pull request Nov 24, 2026
…rigin marks onto keepsOnEach

The margin trace (margin-projection.js) and the focus mark
(anchor-paint.js) no longer give way to the location ring in code, so
`locationRingOn` goes, and both painters lose their
`currentLocationObligation` capability. surfaces.css already draws a
ringed box's ring whole, in the accent, whatever trace or focus mark it
also wears. The margin's check dates from #5045, when the trace was a
chrome element of its own; the marks have since moved onto the boxes
they mark.

`leaf-dev probe --frames`, reading every marked box's computed outline,
clip and border image after each frame, drew the same sequence of frames
with and without the checks (base 3f5751a) on seven routes: `m`
arrivals, Tab into a question and back, a pick on the question and
undo, a pick from inside it, which takes the location away, and undo,
Escape and `m` again, and a margin marker left and reached again. Head
wore `data-lf-traced` and `data-lf-mark` on the ringed box in those
routes, so the comparison exercised the deleted paths.

tests/runtime/anchor-paint.test.mjs is deleted. It protected that the
focus mark followed the obligation view's live reading rather than a
stale `data-lf-obligation` stamp (#4583); anchor-paint no longer reads
the decision at all.

The user-override and reported origin marks (projection/presentation.js)
move onto `keepsOnEach`, which now answers the elements it reached.
`markOne` loses the mode it took for the decision stamp, which
`paintLocation` writes through `keepsOnEach` once a repaint frame, as
`markHere` did.
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.

Focus projection reports unchanged class writes during navigation and startup

1 participant