Repository navigation
Draw no box on an element that only holds threads - #1424
Merged
Merged
Conversation
An element with a comment or reaction wore a 1px violet contour for as long as the thread lived. On a section-level thread that framed the whole section, and it stacked with the options frame and the target trace on one edge. The margin entry already says the element holds threads, so the contour repeated it, while every other box Leaf draws on content is about the current moment. anchor-paint no longer projects the resting `comment` and `reaction` states. An element's contour now appears only while one of these holds: - a draft is open on it; - an action concerns it; - the pointer is on its thread; - the user stands in its thread. Passages keep their wash and underline. Other changes: - `lf-react-el` and the reaction map had no other reader, so both are gone. - A draft on an element that already holds a thread now wears the pending contour, since there is no posted contour left for it to defer to. - A focused marked element wears its own focus ring rather than a projected one. - `leaf-dev stills` gains `ship-thread`, a task holding a thread at rest. Tests that read the resting contour to observe the projection now raise it by hovering or by standing in the thread. The tests that asserted the resting contour itself now assert that it is absent. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Sep 29, 2026
max-sixty
added a commit
that referenced
this pull request
Sep 30, 2026
…inter (#1448) After #1424 an element holding threads draws nothing at rest. The pointer anywhere inside it still raised a 2px accent contour, though, because `markAt` counts every point under the element. So a reader whose mouse rested inside a section with a section-level thread saw a box around the whole section. In effect, that was the resting box #1424 removed. On the page, the pointer now lights only these: - the thread's words; - its row in Threads; - the hand cursor, which says a press opens the thread. The element's contour comes only from a moment that names the thread: - a draft; - an action; - the pointer on its row in Threads; - the thread the user stands in. **Standing across a press.** The page hover had been covering a gap. A press moves focus to the page at mousedown, and only the click of a press on the thread's own mark lands the user back in the thread. Everything that read standing from focus therefore went blank for the length of the press. That covered the element's contour, which the hover had been standing in for, and the margin entry's selection, which nothing covered. Standing is now one reading: `standingThreadId` in `thread/focus.js`. It returns the held thread. During a press, it returns the thread held at pointerdown until the frame after the press ends, whether by release, cancel, a native menu, or the window losing focus. The page's marks and the margin entry both read it. Commands still act on `heldThreadId`, so the hold changes only what is drawn. A press that leaves the thread, such as a drag that selects other words, keeps the thread painted until it is released. **Tests.** - The tests that hovered an element to see its projected contour now open its thread with a press, or point at its row in Threads. They use a window wide enough that the panel covers none of the target. - The pixel test for a complete contour also asserts that the pointer inside the element draws none. - The press test samples every frame from mouse-down until after the click, for both the contour and the margin entry. It fails when the margin entry reads focus alone. **Checks.** `npm run test:runtime` passes. The full local suite with `--run-nightly` passed apart from one test that also failed on main, and #1451 has since fixed it. CI passes on the branch merged with main. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Nov 26, 2026
…in a marked element (#7322) A thread on a whole element, such as an open item's section, was under the pointer anywhere inside the element's box: a pointer resting in the section's empty band margin previewed the thread and showed the hand, and a click on any of its words opened it. Elements draw no mark for their threads at rest (#1424), so this was an invisible target the size of the section (1672 × 810 px on the page that reported it). The hit test in `anchor-paint.js` now finds passage marks alone; an element's thread is reached by its margin entry, which already previews it, opens it and traces the element. To weigh: a click on an image or figure that holds a thread no longer opens that thread. #1448 removed the hover contour from elements for the same reason; #5618 had brought the section-wide target back through the preview. Tests that pressed an element to open its thread now press its margin entry or anchor to a passage; the press/tap seam tests straddle two marked lines (`MARK_SEAM_PAGE`). The user asked for this on their Leaf page. > _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.
An element with a comment or reaction wore a 1px violet contour for as long as the thread lived. On a section-level thread that framed the whole section, and it stacked with the options frame and the target trace on one edge. The margin entry already says the element holds threads, so the contour repeated it, while every other box Leaf draws on content is about the current moment.
anchor-paint no longer projects the resting
commentandreactionstates. An element's contour now appears only while one of these holds:Passages keep their wash and underline.
Other changes:
lf-react-eland the reaction map had no other reader, so both are gone.leaf-dev stillsgainsship-thread, a task holding a thread at rest.Tests that read the resting contour to observe the projection now raise it by hovering or by standing in the thread. The tests that asserted the resting contour itself now assert that it is absent.
🤖 Generated with Claude Code