Repository navigation
Hold a thread resolved or reopened elsewhere behind its card's notice - #1835
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # skills/leaf/assets/AGENTS.md # skills/leaf/assets/runtime/thread/held-news.js # skills/leaf/assets/runtime/thread/thread-card.js # skills/leaf/assets/runtime/thread/thread-list-view.js # tests/test_render_threads.py
…ges whole Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…e the row a settlement swaps Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…s rows hold nothing Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…messages as drawn Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # skills/leaf/assets/runtime/thread/thread-card.js # tests/test_render_threads.py
Main (#1787) moved a resolved panel card's Reopen into its title and drew the row below its messages only while it held news, so a held reopening grew the card by that row and moved every card below it. The notice now stands where Reopen does, in the title's action face, and the card has no row to grow. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…he website test A card the reading hides, or one folding out, shows nothing news could move, so HeldNews no longer holds there. After the user's own Resolve folded a card out of Open, the reading that dropped the gesture from the ledger read the resolution against the card's last drawn (open) face and held it as news. The website test's `card-r` and `card-enter` routes focused the title by script, which is itself the arrival that shows held news, and with no input behind it the shift watch rightly flagged the answer growing in. `r` then resolved the thread and Enter went to the reply box, so neither was a route to the news. The test now arrives by clicking the title. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Main (#1788) reserves the room each workflow label takes in a message's head row, so a held thread's messages now draw their words and reactions as drawn and their delivery status as it stands, rather than as wholly drawn. The website test keeps main's checks that the receipt clears and the notice stays put; the notice's text follows this branch's hold ("Resolved · 1 new reply", then "1 new reply" once the answer reopens the thread drawn open), and the folded card in its `elsewhere` case holds nothing. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A held thread now draws its messages' delivery as it stands, so the board's receipt leaves when the agent's next turn arrives, whether or not that turn waits behind the card's notice. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # tests/test_website_server.py
…other HeldNews spliced a held thread together from reading fields: the settlement's four, and each message's words, edit marker and reactions. Every other field came from the current reading, so derived ones could disagree with what the card drew: a thread reopened elsewhere while the agent worked drew resolved but folded its title's status as a waiting thread's, hiding the box Reopen's place anchors to. Each reading now carries its thread and a reread, and a held thread is the current thread with the log's news withheld (its settlement, its messages and reactions as drawn, each message's words as drawn), read as any other. The title's status reads that thread too, so the separate `status` field goes. The title of a resolved panel card holds one control, Reopen or the notice in its place. The notice there is a node of its own, and takes the user standing on Reopen with it, so `r` and Enter still press it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…notice's places A held edit to a thread's first message showed in its title, which reads the thread's root, and search matched held words through each message's body, so the root is the held first message and a held message keeps its body with its text. Whose turn it is stays the server's reading as it stands, like each message's delivery; the comment now says so. Focus on the card's notice moves with it between its row and the title. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The startup test's card, resolved from another tab while open, now holds the resolution behind its notice, and its title drops the agent's Working status, since whose turn it is reads as it stands. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 5, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 5, 2026
The two thread-resolution tests in the [failed default-branch run](https://github.com/max-sixty/leaf/actions/runs/37345741869) expected a remote resolution to redraw an open thread immediately. Since #1835, the thread holds that change behind a `Resolved` notice while the user is editing a reply. The tests now check the held state and reveal the resolution through the notice, preserving coverage of focus, draft text, and the eventual Reopen control. Both tests failed with their original assertions on current `main` and passed after this change: `uv run pytest -q tests/test_render_pages.py::test_a_failed_resolution_restores_a_focused_inline_reply tests/test_render_pages.py::test_failed_resolve_candidate_restores_focused_reply -n 2`. 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 resolved or reopened from another tab, or by the agent, moved an open card with nothing to say why. Resolving removed a short card's reply box and reaction strips, so the card's words rose 17px and the next card rose 54px. Reopening put them back. On a diff line, resolving folded the outlet and lifted the paragraph below it by 155px.
HeldNews(thread/held-news.js) now holds a settlement behind the thread's existing notice, the way it already held new replies and reactions. The card stays as drawn and the notice reads "Resolved" or "Reopened".This is a restructure of
HeldNews, not one more kind of news:One baseline. Each reading is compared only with the reading the seat drew last.
difference(was, now)says what would draw differently: new or edited messages, reactions added or removed, and the settlement. The notice's label is that difference, and a reading that returns to what is drawn holds nothing. The three snapshots the old code kept are gone (#known,#turns,#reopened).Holding at the source. Each reading carries its thread (
source) and areread. A held thread is the current thread with the log's news withheld: its settlement, its messages and reactions as drawn, and each message's words as drawn (only an edit changes them). It is read like any other thread, so what is derived from it (its title, reaction strips and controls) agrees with what the card draws. Whose turn it is and each message's delivery read as the server has them now; they change the title's status and a message's head row in place.One own-gesture rule.
gesturedOn(thread)reads the ledger to decide whether the user is acting in a thread. It counts:HeldNews,HeldArrivalsand the panel list'skeepingall use it. The list had its own copy, andHeldNewshad a narrower one that missed settlements, refusals and undos.Holding only what would be seen. A change is held when growth would be seen after a changed message, after the thread's foot, or at the row a settlement swaps (the reply box, or a page thread's row holding Reopen). A folded panel card holds nothing, because its title row draws at one size. In a long thread whose reply box is pinned, new replies still grow above the box, but a settlement is held, because it would take the box away.
Presses mean what they drew. Pressing Resolve on a card whose resolution is held shows the resolution and sends nothing, because
settlealready refuses a thread that is already in that state. If the reveal removes the pressed control, focus lands on the card's title.Cards off screen. A card the reading hides, or one folding out, holds nothing.
The panel's view. Changing the filter or Find shows what every card holds, since it moves the cards anyway. A card the view stops admitting is put away at once rather than folded out.
Kept cards. A card another actor resolves under the Open filter holds the resolution behind its notice. Once the user shows it, the card keeps the shape it stood in until it leaves, as before.
Resolved panel cards. Since Paint resolved thread cards continuously and reopen from status #1787 a resolved panel card's Reopen stands in its title and the card draws no row below its messages. Its notice stands in Reopen's place there, in the same face, so a held reopening grows nothing. The title holds one control: the notice is a node of its own, and takes the focus of a Reopen it replaces, so
rand Enter still press it.Behaviour changes, each with its test updated:
test_an_external_resolution_keeps_a_panel_reply_until_it_is_senttest_render_drafts.pytest_a_remote_resolve_disarms_the_open_reply_list_it_takes_awaytest_the_thread_follows_the_decision_that_still_standstest_a_thread_says_what_the_agent_is_doing_about_it, whose title loses its "Working" status while the resolution waitstest_chrome_contracts.pytest_a_website_turn_posts_its_answer_when_the_move_is_settled_first, whoserand Enter routes become one arrival, a click on the title: arriving at the thread already shows the held answer, after whichrresolves the thread and Enter goes to the reply box. Itselsewherecase folds the card, which then holds nothingtest_an_arriving_reply_cannot_move_resolve_out_from_under_a_presstest_walking_to_a_thread_shows_the_replies_it_heldtest_a_card_moved_on_a_board_in_a_reply_reports_delivery_on_that_reply.New tests:
test_a_settlement_from_elsewhere_moves_nothing_in_a_short_panel_threadandtest_a_resolution_from_elsewhere_moves_nothing_after_a_diff_threadfail on main through the shift watch.test_taking_back_a_resolve_is_the_users_own_gesturecoverszafter the user's own Resolve.Not covered here: an agent's progress summary still moves an open card, on main as here.