Skip to content

Let a card's reply field grow for words the user didn't type, without a hold - #4183

Merged
max-sixty merged 2 commits into
mainfrom
one-stability-rule
Oct 26, 2026
Merged

max-sixty merged 2 commits into
mainfrom
one-stability-rule

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

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.js loses its writing-room hold (+46/−193), and the --lf-reply-writing-room CSS 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 through Transcript.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_whole
  • test_a_draft_typed_in_another_tab_shows_whole
  • the mirrored cases of test_native_reply_edits_after_semantic_paint_keep_the_first_line

test_refused_reply_retains_its_live_foot still fails, only on the unchanged writes it fails on in main (#4127).

Closes #4129

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 2 commits October 25, 2026 18:21
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
@max-sixty
max-sixty merged commit e55c958 into main Oct 26, 2026
3 of 4 checks passed
@max-sixty
max-sixty deleted the one-stability-rule branch October 26, 2026 04:38
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decide whether one stability rule covers margin cards and refused edits

2 participants