Repository navigation
Decide withdrawn cards by the one keeping rule, in the list's reading - #2498
Merged
Merged
Conversation
#2387 held a withdrawn root's allocation with its own copy of `keeping`'s conditions. Both now go through `#keeping`: the same intent, reading continuity, shown-and-not-folding, gesture and seen-geometry tests, with the open card read from the row the list last showed open. A withdrawn root passes `words: false`, since its controls disconnect and nothing is left to hold for a draft. Behaviour: unchanged for the cases #2387 fixed. A card kept only for the user's words ("draft") that another actor withdraws now leaves at once rather than holding a Dismiss notice, as any card the user's own turn released does. The withdrawal test now asserts the frozen widget is gone from the page rather than a captured node's isConnected, and drops a node-identity check its position and focus assertions already cover. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…n source `#keeping` now refuses any row that is neither a thread card nor a withdrawn allocation by kind, rather than by system and empty rows happening to have no node. Between two uncommitted readings, a withdrawn allocation whose committed row is still the thread consults the user's gesture on that thread again, as the rule does for any card. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The model builder now asks the list, for each committed row whose root the log no longer has, whether it keeps the room (`withdrawal`, by the same `#keeping` rule), and places the allocation among its neighbours in the reading itself. A withdrawn allocation is therefore an ordinary row of the committed reading: `commit()` no longer rebuilds a parallel committed row list from the drawn rows, rollback repaints the committed reading as is, and `willUpdate` paints `model.rows` without splicing. Behaviour: the withdrawal decision is made when the reading is built, as `keeping`'s always was, so a retry after a failed paint draws the reading it retries rather than deciding again mid-paint. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…op a dead folding read The thread list's eligibility read descriptor.folding, which threadReading always sets false; the header now records that choosing another card releases a withdrawn allocation outside the geometry rule, as #2387 chose. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 12, 2026
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.
Lit follow-up review, item 24: #2387 held a withdrawn thread's allocation in the panel with its own copy of
keeping's conditions (same intent, reading continuity, shown and not folding, no gesture of the user's, visible when open and growth seen otherwise), and spliced the allocation into each reading the list painted, socommit()had to rebuild a parallel committed row list from the drawn rows. Every later change to when a card may leave the list would have had to land twice.Now one rule,
#keepinginthread-list-view.js, decides when any card leaves, and the model builder asks it about both kinds of departure while it builds the reading (rowModelinthread-list.js):keeping(thread, intent)for a card the narrowing stops admitting, andwithdrawal(row, intent)for a committed card whose root the log no longer has. A kept withdrawal is placed among its neighbours in the reading itself, so it is an ordinary row of the committed model:#committedRows,#withWithdrawalsand the retaining branch inwillUpdateare gone, and rollback repaints the committed reading as it stands. The one condition that differs is a parameter: a withdrawn root passeswords: false, since its controls disconnect with it and there is no draft left to hold for. Whether a card is the open one is read from the row the list last showed open, one fact for cards and withdrawn allocations alike. The module header records the rule and the rejected copy.Behaviour that changed: none for the case #2387 fixed (another actor withdrawing the selected thread keeps its room, shows "Thread withdrawn" with Dismiss, and opens no fallback conversation). Three edges follow the shared rule:
drafts.jskeeps them underreply:<thread>for a return of the thread. Thescrolledcase oftest_an_external_withdrawal_keeps_the_readers_allocationasserts exactly that (the words-left-the-screen report, thenloadDraft('reply:first-thread')still returning the typed text), and it covers a selected card holding a draft, which the shared rule still keeps as a notice. (Keep withdrawn threads in place and preserve native state in Lit moves #2387's copy also skipped a card while the user's gesture on it stood, and a gesture is how a card comes to be kept for its words, so the two differ only once that gesture has passed.)descriptor.folding, which the model always sets false, so its folding test never fired.keeping's always was, so a retry after a failed paint draws the reading it retries rather than deciding again mid-paint.Choosing another card still releases a withdrawn allocation at once, as #2387 chose, outside the geometry rule; the header now says so rather than calling it a gesture on the withdrawn thread. The dead
descriptor.foldingread in the list's eligibility (always false in the reading) is gone.Source lines (hand-written, excluding tests): +94 −99.
Test lines: +2 −10.
test_an_external_withdrawal_keeps_the_readers_allocationnow asserts the frozen widget is gone from the page instead of reading a captured node'sisConnected, and drops a node-identity check that its position and focus assertions already cover.Focused browser runs: the withdrawal test (closed, selected, scrolled, scaled), the failed-candidate rollback test, and the held-news panel tests (
test_a_settlement_from_elsewhere_moves_nothing_in_a_short_panel_thread,test_an_external_resolution_keeps_a_panel_reply_until_it_is_sent,test_reaching_news_a_card_holds_keeps_the_view,test_a_rewrite_in_a_card_news_kept_goes_with_its_thread,test_resolving_an_early_thread_keeps_the_rest_in_place,test_a_thread_resolved_while_its_reply_is_written_keeps_the_user_on_it).