Repository navigation
Let a card's reply field grow for words the user didn't type, without a hold - #4183
Merged
Merged
Conversation
The user chose one stability rule for every thread surface (25 October 2026): words a refused send hands back, and a draft typed in another tab, grow the reply field as typing does, in a margin card or page thread as in the floating panel (#4124), and the refused turn gives its room back as it folds. Product change: in a card, a refused reply's words came back into the field's height from before Send while a spacer kept the departed turn's room, so a gap stood above the box. A draft mirrored from another tab stayed in the box of the last native edit, clipped mid-glyph. Now the field takes its words' size from its top, and what stands below it (Send, the seat's comment box, the page after the card) moves with its foot. reply-continuity.js drops the writing-room hold (`#writing`, `#allocateWriting`, `#retainWriting`, `#releaseWriting`, `#cutWriting`, `#returningWriting`, the `returning` deduction, `#holdThrough` and the size observer) and its `--lf-reply-writing-room` rule. It keeps the passive spacer for publications, such as an agent's rewrite or a summary folding turns, since those are news rather than the refused path. The refused turn is separable there: the card passes the messages a presentation drops (`Transcript.leaving`) as boxes whose own room changes, so their room, margins included, never becomes passive space, with or without the fold. Tests: - test_a_refused_reply_folds_away_while_its_card_holds_still becomes test_a_refused_reply_folds_away_and_its_words_return_whole: no spacer through the fold or after it, and the field at least its words' height. - test_passive_reply_room_ends_at_native_edit_and_new_inline_measure becomes test_a_draft_typed_in_another_tab_shows_whole; the canceled input and widening steps tested only the hold's release and go. - The mirrored cases of test_native_reply_edits_after_semantic_paint_keep_the_first_line expect the field to take the mirrored words' size from its top, and consume the seat box's moves narrowly. - test_refused_reply_retains_its_live_foot keeps the panel's pose check; its card cases now expect no spacer, whole words, and consume the card's and tail's moves narrowly. All four cases still fail on the base's unchanged writes (#4127), which this leaves alone. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # dist/kernel/kernel.json # tests/browser/threads/test_composing.py
leaf-agent
approved these changes
Oct 26, 2026
This was referenced Oct 29, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 29, 2026
The refused-reply test now recognizes the margin card's ground surface in shift diagnostics. #4183 deliberately let a refused turn give its room back; the shared box motion in #4379 reports that movement beside `div.lf-box-ground.lf-margin-preview-ground`, while this test still matched the enclosing `aside`. This updates that reference without changing the runtime or adding another accepted surface. The margin case fails before the change and passes after it, including whole draft text, card bounds, retry identity and exactly one admitted reply. The panel case also passes. Ruff check and format check pass. The outlet and nested-end cases fail on both unchanged main (`cf15e623131b432e234cf80c6d9ed0e1c3ba367f`) and the candidate: `pose()` cannot find a visible action button and dereferences `undefined`; teardown also reports shifts. Those failures are separate from the margin diagnostic repaired here. Closes #4460 — automated triage 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.
Margin and page thread cards now follow the stability rule #4124 set for the floating panel. When a refused send hands its words back, or a draft typed in another tab arrives, the reply field grows to show them as typing does. A refused turn gives its room back as it folds.
Before. After a refusal, the card held still by growing the field up into a spacer. A draft mirrored from another tab stayed one line tall, so its words were cut mid-line and two lines were hidden until the user typed there.
After. A refusal moves the card: its top rises 22 px and Send drops 38 px. A mirrored draft shows whole, and the card's foot drops 60 px.
What goes and what stays.
reply-continuity.jsloses its writing-room hold (+46/−193), and the--lf-reply-writing-roomCSS rule goes. The passive spacer stays for content a new page version removes above the reply, such as a summary folding turns. The messages a refusal drops reach it throughTranscript.leaving, so their room isn't kept.browser/AGENTS.md's "Stability is owed to the common path" now covers cards as well as the panel. A refused edit has no hold either, so the rule has no exceptions (the user's choice, 25 October 2026).Tests. Three tests assert the new behaviour in place of the hold, and each fails on main:
test_a_refused_reply_folds_away_and_its_words_return_wholetest_a_draft_typed_in_another_tab_shows_wholetest_native_reply_edits_after_semantic_paint_keep_the_first_linetest_refused_reply_retains_its_live_footstill fails, only on the unchanged writes it fails on in main (#4127).Closes #4129