Repository navigation
Open the thread card on its latest message under its writer's name - #1763
Merged
Merged
Conversation
The margin thread card pinned the root message's author row beside its Resolve and Close controls, outside the scrolling transcript, so it had to open at the top: scrolled to the newest turn, that row put "You" over an agent's words. Walking to a long thread in the Threads panel already lands on its latest message (#1715); the card now does too. In the card each message's head sticks at the top of the transcript while that message is read, and the controls stand over the transcript's top-right, so the row always names who wrote the words under it. A head's lead comes out of the gap before its message, so the card is no taller (identical geometry at rest on desktop; 25px shorter under a finger, where agent heads no longer keep room for reactions the card never draws). The words under a head take its height as `--lf-top` and `scroll-margin`, so a reveal lands them clear of it. The panel and inline threads keep the hoisted root row. `latestTurn` gives the panel's and the card's landings one home. The arrival cue now settles on the message's own ground rather than transparent, which the card's opaque heads need. Tests: a new card test asserts the card opens on its latest message and its top row names the message under it while reading back up. Card tests that read `.lf-thread-root-meta` now read the controls row and message heads; `open_long_thread` scrolls back up from the latest message. The margin thread snapshots need re-accepting: only the newest message's name row redraws, at the same position. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # skills/leaf/assets/runtime/thread/reply-landing.js
leaf-agent
reviewed
Oct 4, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The lint check fails because ruff format rewrites the new test function signature, so I’m withholding approval until that check passes.
The margin cases' newest name row redraws as a sticky head in the same place; the pin moves to the re-accepted profile. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
previously approved these changes
Oct 4, 2026
leaf-agent
reviewed
Oct 4, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The test job is red on this head, so I’m withdrawing the approval.
test_a_sent_margin_reply_shows_its_words_while_delivery_is_pendingstill assertsscrollTop == 0immediately after opening a margin card. The new latest-turn landing scrolls it to 116–775px in three cases, so the test stops before checking that a pending reply stays visible. Update its opening-state setup or assertion to match the new landing, then retain the pending-word visibility check.- The pinned Linux thread snapshots differ in six delivery-journey cases (
general,panel,margin,panel-dark,margin-dark, andpanel-narrow). The new asset pin includes the macOS acceptance, but the Linux CI profile also needs reviewed captures for the changed appearance; the snapshot test reports mismatches starting atdrafted.
leaf-agent
dismissed
their stale review
October 4, 2026 22:59
CI failed on the approved head: stale opening-scroll assertion and Linux thread snapshots.
…ts latest message The pending-reply smoke test asserted the margin card opened at scrollTop 0; it now expects the latest message in view and keeps its pending-words check. The Linux profile is re-accepted from CI run 37239923576: the margin cases redraw the newest name row as a sticky head, and the composer drafts in the general, panel and margin cases wrap one word earlier on this tree (macOS matches main's pin there). Geometry readings are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 4, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 11, 2026
In the floating thread card (the card `t` or a margin marker opens while the Threads panel is closed), each message's head sticks to the top of the transcript so the row always names who wrote the words under it (#1763). Everything in that head stuck with it, so a long reply carrying "Show 1 progress message" kept offering its earlier updates over every line of the reply, and an edited or sending label did the same. Now only the writer's name and the time stick. The head's annotations (the progress disclosure, delivery receipt, failure, suggestion and edited labels) scroll out with the reply's first line, as the words do. A view timeline on each message cancels the sticky offset for them during the first two head heights of its exit, which also clears a disclosure that a narrow card wraps onto a second row; past that the transcript clips them. The timeline has no inset, since the transcript's scroll padding is ring room rather than where the head sticks; with the default inset the annotations started moving 3px early. All of it is CSS, in `annotation-chrome.css`, beside the sticky head rule. - A wrapped disclosure rises under the name and the time rather than over them: those two paint their message's ground above it, and the name's ground spans the gap to the time. - A keyboard-focused disclosure stays in the stuck row, so Tab still reaches it while the head is stuck. - The metadata clips only sideways while the mechanism is on, for its ellipsis, so a label rises to the card's edge instead of vanishing at the metadata's own top. - The rules sit inside `@supports (animation-timeline: view())`. An engine without view timelines would run the animation on the document clock, whose filled end holds the annotations 56px above their row at rest; Firefox 155 keeps today's behaviour instead. Chromium 153 and WebKit 26.6 support it. A narrow card's stuck head stays as tall as its wrapped two rows, now with the second row empty; it was already that tall before this change, holding the disclosure. Making only one row stick is a separate restructure of the card head. Tests: new `test_a_stuck_card_head_keeps_the_name_and_lets_its_annotations_scroll_out`, at desktop width and a 311px touch card. It scrolls a long edited reply past the card's top in steps and asserts the name and time stay put and stay on top (including the gap between them) while the disclosure and the edited label move with the reply's opening and leave, and that a focused disclosure stays in the row. It fails without the change, without the z-order, and without the gap cover. The thread snapshots and chrome contracts pass unchanged. > _This was written by Claude Code on behalf of max-sixty_ Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
added a commit
that referenced
this pull request
Oct 23, 2026
The ring room added above the margin transcript in #3722 moved its readable content edge 6 px below its scroll clip. The continuation fade still measured sticky author heads from the clip edge, so it painted at the wrong y position during scroll handoffs. Measure from the content edge instead. The author test also sampled a known end-of-scroll gap as though it held message text; keep the writer check when words are under the head and recognize the narrow gap before the next visible writer, the edge documented in #1763. `test_the_thread_card_opens_on_its_latest_message_under_its_own_name` failed on current `main` after #3722 and passed with this change; it also passed with #3722's CSS temporarily removed, confirming the new ring room as the cause. Both cases of `test_a_stuck_card_head_keeps_the_name_and_lets_its_annotations_scroll_out` passed locally. The runtime suite passed (533), `pnpm run check` passed, and the committed kernel was rebuilt. Refs [run 39930571983](https://github.com/max-sixty/leaf/actions/runs/39930571983). Co-authored-by: leaf-agent <[email protected]>
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 margin thread card (the floating card
t/Tand a margin marker open while the Threads panel is closed) pinned its first message's author row beside Resolve and Close, outside the scrolling transcript. Scrolled to the newest turn, that row put "You" over an agent's words, so the card always opened at the top with the newest turn out of view. #1715 made the Threads panel land a walked-to thread on its latest message; this gives the card the same landing.In the card, each message's head is now
position: stickyat the top of the transcript, and the controls (thread nav, news, Resolve, Close) stand over the transcript's top-right in.lf-margin-thread-controls. The top row therefore always names whoever wrote the words under it, and as one message scrolls out the next one's head pushes it off. A head's centring lead comes out of the gap before its message, so nothing grows: at rest on desktop the card's geometry matches main to 0.1px. Under a finger it is 25px shorter, since agent heads no longer reserve room for a reaction trigger the card never draws. AsizeObserverpublishes the controls' width as--lf-margin-controls-width, which caps each head as a percentage so long metadata ellipsizes before the controls without widening the card. The words under a head take its height as--lf-topandscroll-margin(the partial-cover rule at--lf-topin theme.css), so focus and reveals land them clear of it and the runtime's reading counts covered words as hidden. The Threads panel and inline page threads keep the hoisted root row.The card opens on its latest turn with
showLatestTurnin reply-landing.js.latestTurnis now the one home for "the turn a user comes back to", shared with the panel'sthreadLandingStart. The arrival cue's background now settles on the message's own ground instead oftransparent, so the card's opaque heads don't go see-through mid-cue. The name size moved to--lf-msg-name-sizein shadow.css, so the head's lead and the name share one value.Known edge: a card opened at the very bottom of its transcript can show a sliver of the previous message at the top (its head mid push-off, or a cut line), because the scroll is capped at the end. Fixing it means trimming the card to a message boundary; left for now.
Tests:
test_the_thread_card_opens_on_its_latest_message_under_its_own_name..lf-thread-root-metanow read the controls row and the message heads.open_long_threadscrolls back up from the latest message.test_a_sent_margin_reply_shows_its_words_while_delivery_is_pendingexpects the card to open on its latest message instead of atscrollTop0.