Repository navigation
Fold a thread summary by hiding its messages where they stand - #3580
Merged
Merged
Conversation
A summary's or an answer's progress fold used to move the messages it covers into a container inside its checkpoint, and back out when the summary was retracted. Moving a node lost a text selection inside it in every engine, and in WebKit, which lacks moveBefore, reloaded any frame in it: once as the summary arrived and twice as it was retracted. The transcript is now flat. A checkpoint stands before the messages it covers, which stay the transcript's own children and are hidden in place while the fold is closed. Behavior changes: - A selection in a covered message survives the summary arriving, and a frame in one keeps its document through arrival, close, open and retraction (new test_a_summary_folds_its_messages_where_they_stand, Chromium and WebKit; it fails on the base in both). - The checkpoint groups its messages for assistive technology with aria-owns, as the nesting did; aria-controls names the checkpoint. - The open fold's frame spans siblings, so it is anchored from the checkpoint to its last message's foot, with the transcript as its containing block. Panel and margin geometry, frames included, measure identical to the base in Chromium, Firefox and WebKit. - Making the transcript the containing block also moves message controls' containing block inside the margin card's scroller; Firefox now places them on scrolled messages as Chromium and WebKit do. - The latest turn a separate transcript lands on, and the margin card's last shown message, skip hidden covered messages. Tests move off .lf-summary-originals onto data-lf-summary. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ction bug Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # skills/leaf/assets/runtime/thread/transcript.js # skills/leaf/kernel/kernel.json # skills/leaf/kernel/runtime/bundle-user-intent.js # tests/browser/threads/test_agent_replies.py
…longer folds Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This was referenced Oct 22, 2026
Closed
…sed checkpoint id aria-controls named the checkpoint, the button's own ancestor; it now names the covered messages. A thread-card comment still said a summary moves the message the user stands on. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 22, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 22, 2026
Move the thread content's positioning context outside the scrolling transcript so a message control's focus ring stays visible at the transcript's top edge. The summary fold outline keeps its anchored span across sibling messages. This fixes the deterministic ring gap in the failed [main browser run](https://github.com/max-sixty/leaf/actions/runs/39829391472), introduced by #3580. Verified the failing rewrite focus test and the summary fold tests in Chromium and WebKit after the change. The rewrite focus test failed before this CSS change under both Chromium versions tested and passes afterward. `pnpm run check:browser` passes. The generated shadow stylesheet is updated with the source change. 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.
A thread summary now folds the messages it covers by hiding them where they stand, instead of moving them into a container inside its checkpoint.
Why. Moving a node unloads an iframe in an engine without
moveBefore: WebKit reloaded a frame in a covered message once as the summary arrived and twice as it was retracted. A selection inside the moved messages was lost in every engine.How.
thread/transcript.js, the checkpoint stands directly before its covered messages. They stay the transcript's own children and are hidden while the fold is closed.aria-ownson the checkpoint groups them under it for assistive technology. In Chromium the covered messages are absent from the accessibility tree when the fold is closed and under the checkpoint when it is open.reply-landing.jsandthread-preview.jsskip hidden messages.Evidence.
test_a_summary_folds_its_messages_where_they_stand, run in Chromium and WebKit, puts a frame in one covered message and a selection in another. The frame never loads again through arrival, close, open and retraction, and the selection survives arrival. On the old runtime it fails in both engines.pnpm run test:runtimepasses (522 tests), as dotest_summaries.pyandtest_agent_replies.py, after merging Hide ephemeral messages when their answer arrives #3534.TODO.md loses the item this closes. It gains two:
lf-diffcomment threads on redraw, a modal into its opener's popover, a reply's widgets between views);