Repository navigation
fix: read obligation location before painting focus contours - #4583
Merged
Merged
Conversation
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
…-main verification
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The annotation painter read
data-lf-obligationbefore the obligation view reflected a new location. During an obligation walk it could add and removelf-projected-markwithin 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-askandplan-card-keyboardstills are unchanged against main: the repair removes an intermediate projection, preserving settled focus and thread paint.Startup comparison on
review-a-planhas 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