Skip to content

Seat the static site's threads on the thread's anchor, not the root's - #325

Merged
max-sixty merged 3 commits into
mainfrom
fix/ci-33999475128
Sep 6, 2026
Merged

max-sixty merged 3 commits into
mainfrom
fix/ci-33999475128

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Sep 6, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

demoThreads in docs/session.js is the in-tab mirror of build_threads that the static product pages run instead of the Python projector. #317 moved every current-state reading of a thread's anchor from thread.root.anchor to a thread-level thread.anchor that a reply can replace, and #326 landed the seeding and the reply move in demoThreads — but its seat was left reading thread.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

seat reads thread.anchor, which is seat_root word 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 passed

No test covers the divergence. test_the_product_site_accepts_a_leaf_comment, the nightly failure this PR opened against, asserts on the quote anchorLabel writes rather than on seat, and #326's seeding answers it: run at d20e59d3 on main, 1 passed. What is left here is a mirror repaired by reading, not by a red test.

demoThreads is a hand-written mirror of build_threads with 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 own ci run was cancelled, so both were candidates for the site failure. Bisected in worktrees against tests/test_site.py -k the_product_site_accepts_a_leaf_comment:

4236327a (#314)  1 passed
5100d89b (#317)  1 failed
210a556f (#316)  1 failed

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 on main now — #326 landed the anchor seeding and pinned lf-drawing and lf-conversation — which is why neither is fixed here.


Opened from failed run 33999475128

…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.
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 leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_rules paragraphs describe the allowlist work that 6b5b064 just removed. #326 pinned both names on main.
  • "docs/session.js … still built threads with a root anchor alone. t.anchor is undefined there" 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" — so demoThreads sets anchor on both branches and moves it on a reply before this PR touches anything, and anchorLabel and groupFor already read a live anchor.
  • The Solution paragraph claims the seeding and the reply move as this PR's work for the same reason. Only seat and 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.

@leaf-agent leaf-agent changed the title Give the static site's threads the anchor a reply can move, and pin draw mode's document-level classes Give the static site's threads the anchor a reply can move Sep 6, 2026
@leaf-agent leaf-agent changed the title Give the static site's threads the anchor a reply can move Seat the static site's threads on the thread's anchor, not the root's Sep 6, 2026
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Rescoped the title and description against the current merge base. The allowlist paragraphs and the test_a_coined_class_cannot_reach_the_chromes_rules clause are gone with the code that 6b5b064 removed, and the seeding and reply move are now credited to #326 rather than claimed here — so the description covers the 8-line diff and nothing else.

One correction to the framing that survived: the site test the run opened this PR against passes on main too. It asserts on the quote anchorLabel writes, not on seat, and #326's seeding answers it — run at d20e59d3, 1 passed. So what is left is the mirror divergence on its own, with no red test behind it. The description says that rather than implying a failing test is being closed. The bisection block stays, reframed as where the run's two failures came from.

@max-sixty
max-sixty merged commit 3c95a79 into main Sep 6, 2026
7 checks passed
@max-sixty
max-sixty deleted the fix/ci-33999475128 branch September 6, 2026 05:14
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.

2 participants