Repository navigation
Seat the static site's threads on the thread's anchor, not the root's - #325
Conversation
…raw mode's document-level classes The runtime now reads a thread's current anchor off the thread rather than its opening comment, but the product site's in-tab session still built threads with only a root anchor, so every comment on a product page landed as "About the page as a whole" with no quote. Draw mode arms the crosshair from the body, beside design mode's, so lf-drawing and lf-conversation are deliberate document-level names.
# Conflicts: # docs/session.js
Main added lf-drawing and lf-conversation to the document-level class allowlist in #326, with a comment covering both. Merging this branch left a second copy of each, which ruff's duplicate-member check fails on. Keep main's block and drop this branch's now-redundant entries.
leaf-agent
left a comment
There was a problem hiding this comment.
The revert in 6b5b064 closes the lint failure — the set literal is back to main's and the two names are pinned once. What is left is the seat read, and it is right: !thread.root.about && thread.anchor && Object.keys(thread.anchor).length === 1 is seat_root in skills/leaf/scripts/leaf/events.py word for word, and main still reads thread.root.anchor there, so a reply that moves a thread's anchor seats the thread where it started. That divergence is worth closing on its own.
The title and description no longer describe the PR, though, and they are what a maintainer reads before merging. Three things to rescope against the current merge base:
- The title's second clause and the
test_a_coined_class_cannot_reach_the_chromes_rulesparagraphs describe the allowlist work that 6b5b064 just removed. #326 pinned both names onmain. - "
docs/session.js… still built threads with a root anchor alone.t.anchorisundefinedthere" is not true of this merge base. #326 also landed the seeding — its body names it, "the static product-site projection had dropped thread anchors" — sodemoThreadssetsanchoron both branches and moves it on a reply before this PR touches anything, andanchorLabelandgroupForalready read a live anchor. - The Solution paragraph claims the seeding and the reply move as this PR's work for the same reason. Only
seatand its comment are.
The bisection in the details block is still sound evidence about the nightly run; it is the framing above it that has drifted. Worth folding into a description that says what the 8-line diff does.
|
Rescoped the title and description against the current merge base. The allowlist paragraphs and the One correction to the framing that survived: the site test the run opened this PR against passes on |
Problem
demoThreadsindocs/session.jsis the in-tab mirror ofbuild_threadsthat the static product pages run instead of the Python projector. #317 moved every current-state reading of a thread's anchor fromthread.root.anchorto a thread-levelthread.anchorthat a reply can replace, and #326 landed the seeding and the reply move indemoThreads— but itsseatwas left readingthread.root.anchor. So a thread whose reply moves its anchor onto another widget still seats where it started, while the same thread on a served page seats where the reply put it.Solution
seatreadsthread.anchor, which isseat_rootword for word. The comment on the reply move names its Python counterpart, so the next reader of the mirror can find the side it has to match.Testing
uv run pytest tests/test_site.py --run-nightly— 27 passedNo test covers the divergence.
test_the_product_site_accepts_a_leaf_comment, the nightly failure this PR opened against, asserts on the quoteanchorLabelwrites rather than onseat, and #326's seeding answers it: run atd20e59d3onmain, 1 passed. What is left here is a mirror repaired by reading, not by a red test.demoThreadsis a hand-written mirror ofbuild_threadswith nothing holding the two together, so this class of drift stays silent until a nightly browser test happens to walk the difference. Worth a pin of its own, separately from this repair.Where the nightly's failures came from
main's nightly suite failed on run 33999475128 with four tests red. The run's commit was 210a556 (#316), but 5100d89 (#317) landed between the last tested commit and it and its owncirun was cancelled, so both were candidates for the site failure. Bisected in worktrees againsttests/test_site.py -k the_product_site_accepts_a_leaf_comment:So the site failure was #317's and the class-surface failure (
test_a_coined_class_cannot_reach_the_chromes_rules) was #316's. Both are answered onmainnow — #326 landed the anchor seeding and pinnedlf-drawingandlf-conversation— which is why neither is fixed here.Opened from failed run 33999475128