Repository navigation
fix: keep obligation target traces off their location rings - #5045
Merged
Merged
Conversation
leaf-agent
commented
Nov 2, 2026
leaf-agent
left a comment
Collaborator
Author
There was a problem hiding this comment.
The existing test_an_open_thread_refresh_keeps_the_current_margin_entry_target_highlighted fails at its first trace assertion: focusing the second suggestion now correctly shows its obligation ring and suppresses the duplicate trace. That test needs to check the target's ring across the refresh instead, preserving its guarantee that the previous card cannot retain the highlight. I’ll apply that test update on this bot-authored branch.
A margin marker projects the current obligation ring onto its question. Its neutral target brackets used the same perimeter and painted over both sides of that ring. Read the obligation owners current location when selecting the trace, just as current thread marks already suppress a duplicate trace. Pointer traces to other targets remain available. Closes #4989
leaf-agent
force-pushed
the
fix/issue-4989
branch
from
November 2, 2026 00:27
e52dd5e to
cb1d60c
Compare
max-sixty
added a commit
that referenced
this pull request
Nov 2, 2026
) `dist/kernel/kernel.json` lists one module hash per line, sorted by path. Git treats changes to two touching lines as one conflict, so a runtime PR conflicted with `main` whenever `main` changed a module whose path sorts next to one the PR changed, even though each line was right for its own module. The kernel build now writes a blank line between the entries, a layout prettier leaves alone, and those merges are clean. The record's content is unchanged. ### How much it helps I replayed the 455 merges of `main` into PRs #4500 to #5045 with `git merge-tree`, rendering each side's `kernel.json` in both layouts: - `kernel.json` conflicted in 257 of them. - In 216, both sides had changed the same module. Those still conflict, and should: the merged module is source no build has read. In 127 of them the source merged cleanly, so the kernel conflict is what makes the PR build and test the merged code before it lands. - The other 41 were conflicts between neighbouring modules, and all merge cleanly in the new layout. In 30 of them `kernel.json` was the only conflict, so those merges become clean outright. - For each of those 30, rebuilding the merged tree's kernel with that tree's own build script reproduced the textual merge byte for byte. A control rebuild of the PR side reproduced its committed kernel each time. Clean merges of `main` go from 145 to 175 of the 455. ### Cost `kernel.json` gains a blank line per entry. When this lands, each open runtime PR conflicts once on the new layout, resolved as any kernel conflict is (`build/AGENTS.md`). ### Checks `check:browser` passes, as does `build/runtime-bundle.test.mjs`. `read_runtime` parses the new file and serves the kernel. > _This was written by Claude Code on behalf of max-sixty_
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.
max-sixty
added a commit
that referenced
this pull request
Nov 24, 2026
… box mark one writer (#7072) Two homes now settle where the user is shown on a box: - `locationStandsDown` (target-paint.js) decides whether the location ring shows round the decision the user is in. - `surfaces.css` decides which mark a box shows when several land on it. On a ringed box, it draws the ring whole in the accent, whatever trace or focus mark the box also wears. Two code checks used to settle the second question themselves. The margin's trace and anchor-paint's focus mark each held their mark off a ringed box, and each read the decision from the obligation view to do it. Both checks are gone, and so is the `currentLocationObligation` capability both painters took. The margin's check dates from #5045, when the trace was a chrome element of its own. Every attribute painted onto the boxes an element shows through now has one writer, `keepsOnEach` in `lib/keeps.js`. That covers the aim, trace, proxy and location marks, the `data-lf-obligation` stamp (which no longer clears itself with a page-wide query each frame), the annotation renderer's marks, and the user-override and reported origin marks. **What changes on screen:** - When a question is styled `display: contents` and focus lands on one of its paragraphs, main drew the focus floor 3px out. Now that paragraph wears the focus mark 6px out, as any focused paragraph does. Main's copy of the ring's box list in anchor-paint skipped the stand-down rule. - When a question sits inside a closed `<details>` and a thread's margin marker on it holds focus, main drew nothing on the page. Now the summary wears the margin's grey brackets. That is what `faceOf` (margin-projection.js) asks for whenever a closed box hides a thread's target, so the page shows which box holds the thread. Main's check held the trace off because the user's location was that question, though the question's ring stood on a box the disclosure hides. The marker's preview card stands above or below the marker depending on what ran before the Tab, on main as here: a journey that settles before the Tab put it above in 3 of 4 runs on main and 4 of 4 here, and one that tabs straight after load put it below in 4 of 4 on both. This change doesn't move it. **Evidence:** `leaf-dev probe --frames` read each marked box's computed outline, clip and border image after every frame, with the checks (3f5751a) and without them. Seven routes drew identical frame sequences: - `m` arrivals; - Tab into a question and back; - a pick on the question, then undo; - a pick from inside the question, which takes the location away, then undo; - Escape, then `m`; - a margin marker left and reached again. On those routes the ringed box wore `data-lf-traced` or `data-lf-mark` without the checks, so the deleted paths ran. **Size against main:** production code +60/−118 lines, comments +39/−42. Tests −50, mostly `tests/runtime/anchor-paint.test.mjs`, which guarded the focus mark against a stale stamp; anchor-paint no longer reads the stamp. Exports: `keepsOnEach` is added and `locationStandsDown` is now private. **Still hand-written:** these keep their own add-and-remove loops: - `holdWords`: a placement and a draft add only the elements their words stand in, and the next paint that changes a mark lets go of the rest, as the header at anchor-paint.js says. `keepsOnEach` takes the whole set, so each such add would read every element holding a comment's words, a cost that grows with the page. The rest diff a set that other code also reads, so moving them would hold that set twice: - `thread/surfaces.js`'s outlets, which five other sites read; - anchor-paint's hover and here classes, which `paintVisualStates` reads; - `focus.js` `paintFocus`, whose diff also drives its `moved` reading and writes shadow `part` tokens. **Tests:** `pnpm run test:runtime` (1119), `pnpm run check`, and 43 named browser tests on the location ring, focus rings, margin entries and traces, comment marks and origin marks all pass. `test_an_obligations_margin_marker_keeps_its_location_ring_whole` no longer asserts that no box wears `data-lf-traced`; its checks of the rings drawn stay. 17 `leaf-dev stills` states are unchanged against main. Two showed 0 px style differences that went away on a rerun. > _This was written by Claude Code on behalf of max-sixty_
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 ask ring was painted correctly, then covered along both sides by the margin marker's gray target brackets. The trace selector now uses the obligation owner's current-location reading to omit that duplicate trace, as it already does for a current thread's mark. Hovering another target still draws its brackets.
This changes the keyboard-focused obligation marker state: the question keeps its complete blue location ring. The before/after capture is from
leaf-dev stills HEAD^ --state pr-obligation-marker; its computed-style comparison changes only the trace's display and placement.Verification: the existing journey restricted to
pr-walkthrough(its Tab walk and eight ring specimens) reproduces the reported failure before and passes after. A small regression test covers keyboard arrival and preserves pointer tracing; the neighboring thread projection test passes. All 737 runtime tests, browser type checking, the browser build and pre-commit checks pass. Startup readings loaded 107 requests before presentation in both arms, with 374 additional bytes in the candidate.Closes #4989 — automated triage