Repository navigation
Unify inline page-map threads - #172
Conversation
# Conflicts: # skills/leaf/CLAUDE.md # skills/leaf/assets/runtime/chrome-style.js # skills/leaf/assets/runtime/living-margin.js # tests/test_render_margin.py
leaf-agent
left a comment
There was a problem hiding this comment.
The placement rewrite reads well and the first-painted-frame coverage is the right shape — it fails if placeThreadPreview() stops running in the show turn, which is exactly the defect it names. Three notes, all on parts of the diff that turn out to be inert.
The one that matters is the "repeated category label" thread. .lf-margin-kind is only ever emitted into sheetList (the page-map <dialog>), never into previewList, so the card has never carried a category label and the three new assertions asserting its absence were already true on d215239. I checked by dumping the card's outerHTML on the base commit; the only head chrome the diff actually removes is the Threads button. That leaves the skills/leaf/CLAUDE.md clause describing a behaviour change that didn't happen, and three assertions that can't fail backing it.
How I checked
Rendered the card on d2152390 (DECISION_PAGE + COMMENT_ON_DECISION, viewport 1440×900, marker pressed) and counted .lf-margin-preview .lf-margin-kind → 0. The card's head on base was [Threads button][.lf-margin-preview-title][×]; the list held section.lf-margin-thread > .lf-margin-thread-body > .lf-conversation-thread with no kind span anywhere. grep -rn lf-margin-kind skills/leaf has one generator, in renderSheet, writing into sheetList — and sheetList is appended to sheet, a separate <dialog>, not to preview.
The redundant placeThreadPreview(): deleted it locally and ran uv run pytest tests/test_render_margin.py -n0 → 28 passed, new first-frame assertions included.
Measured widths at the beside range (card left / width): 1208 → 752 / 448, 1280 → 824 / 448, 1440 → 908 / 460, 1920 → 1148 / 460. The 448 is the marker rail eating into the 520px strip; consistent with the floor this PR lowers from 459 to 447, so I read it as intended rather than a regression.
Not this PR: test_a_pending_suggestion_can_be_discussed_instead_of_decided, test_a_decision_that_empties_its_widget_detaches_the_element_anchor, and test_command_hub_derives_the_operator_reading_from_its_goal_tree fail for me in this sandbox on the merged tree — and fail identically on the pre-merge base d215239, same locator timeout — while ci / test was green on 1b77d53. Sandbox-local, not a signal here.
Inline page-map threads carried a redundant local route back to Threads, routed
caway from the visible conversation, and changed posture while the page was still moving. This makes the inline conversation the direct reply surface, removes the redundant local route, and places thread cards beside their Button after any panel motion settles.The newer target-Button model now handles non-thread readings directly, so asks and outcomes no longer open a second, differently placed preview. Browser coverage checks the first painted frame, panel-to-inline transitions, keyboard reply focus, multi-thread cards, and the exact Button/card boundary.