Skip to content

Wrap a seat's comment box's words where its message will, and stand it a gap under the cards above - #6831

Merged
max-sixty merged 3 commits into
mainfrom
seat-comment-box-measure
Nov 23, 2026
Merged

max-sixty merged 3 commits into
mainfrom
seat-comment-box-measure

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Closes #6714.

#6773 answered #6714's question: a seated thread card's reply box runs to the card's sides, and its words still wrap where they will once sent. The comment box a seat opens (a diff line's or file's Comment, a visual-review case, a command hub row) didn't follow that rule. It keeps the row's width, as the card its comment becomes will, but its words wrapped at the row's width: 827.5px under a diff line and 683px in the command hub, where the seat's messages and reply box wrap at 562px. Any comment long enough to wrap rewrapped at Send. This applies #6773's stated rule to that box (the first commit), stands the box a gap under the cards above it (the second), and makes a card's reply box keep the rule under a finger too (the third).

Words. The box's words now end where the message they become will, --lf-comment-text-end inside the seat's column: 562px wide under a mouse and 517px under a finger, the same as the sent message in both (827.5px and 782.5px before, under a diff line). Widening #6773's selector to cover this box would have left its words 10px past the column, at 572px: the box's field stands at the card's padding rather than running to the card's sides, so the reply box's formula doesn't fit its geometry. Its own rule keeps, past its end inset, the room by which its field is wider than the seat's column, so it holds with or without the command hub's Send & pause beside the field.

Gap. The box stood flush under the card above it in a diff and a visual case, so that card's reply box and the comment box read as one conversation's two fields. Only the command hub's theme kept a gap there (examples/command-hub.page/theme.css), for that reason, which holds for every seat. Core now keeps the gap beside the one between a seat's cards, and the hub's copy goes. It's the cards' gap, --lf-sp-2, not the hub's --lf-sp-3: the card a comment becomes lands that far under the card above it, so the box now stands where its card will. On the diff gallery's long line conversation and the hub's goal row, the box's top and the sent card's top are the same pixel. The hub's gap narrows from 10px to 6px, and the diff's opens from 0 to 8px.

A reply under a finger. Under a finger a card's reply box keeps Send's room at the end of every line (--lf-field-end-room, text-field.js), and it reckoned that room from where Send stands. Since #6803 stood Send centred inside the box's own border, that room has been a pixel short of the one a message keeps, so a reply's words ran 1px past the message they become: 976.27 against 975.27 in a seated card, and 1358 against 1357 in a margin card. A word ending in that pixel moved to the next line at Send. The room now comes from --lf-comment-text-end, the same statement of where a message's words end that the comment box's rule reads, so both boxes in a seat, and the margin card's reply, end their words where their message will under either pointer. Under a mouse nothing changes.

A diff line's comment box under the conversation the line holds (diff-line-comment, a new state), before and after:

Before: the comment box flush under the card, its words running to the row's end
After: the comment box a gap under the card, its words wrapping at the column the card's messages use

The same, under a finger (--touch):

Before, under a finger: the comment box flush under the card, its words running past the messages' column
After, under a finger: the comment box a gap under the card, its words wrapping at the messages' column

The command hub's goal row (hub-seat-comment), before and after:

Before: the comment box 10px under the card, its words running to the field's end
After: the comment box 6px under the card, its words wrapping at the messages' column

Crops from uv run leaf-dev stills --authored, with and without --touch, against main at 49007d7.

The reply states draw the same pixels under both pointers (plan-card-reply-large, diff-file-reply, hub-seat-held-news): the reply's pixel sits inside the field's closed shadow root, which stills don't read, and moves no line of those drafts. The test below measures it. Also unchanged under a mouse: the margin card's floating comment box (triage-composer-long), and two empty seat boxes with no card above them (walkthrough-diff-comment, diff-file-comment), where the room kept for Other responses still sets the end padding until the first word.

hub-seat-comment now types a draft long enough to wrap, and the new diff-line-comment state opens a line's comment box under the conversation that line holds. The new browser test, test_a_seat_s_boxes_break_their_lines_where_their_messages_will, covers the seat's comment box and its card's reply box, each under a mouse and under a finger: it sends a wrapping draft and checks both where the words may run to and the lines they break into. Against main, the comment box fails under both pointers and the reply box under a finger.

Tests run by node id, all passing: the four cases of the new test; test_the_user_s_words_end_where_the_agent_s_do[panel] and [seat]; every case of test_a_rewrite_is_the_reply_box_where_the_words_stood; test_a_rewrite_under_a_finger_keeps_its_message_head; test_a_rewrite_keeps_its_pair_while_its_head_sticks_beside_the_actions; test_contextual_messages_share_text_spacing_through_send_and_reopen[desktop] and [touch]; test_a_finger_opens_a_card_on_its_thread; test_command_goal_can_pause_after_an_ordinary_thread_started; test_atlas_send_and_pause_is_one_thread_fold; test_a_seat_send_at_the_window_foot_shows_the_thread_it_started; test_a_seat_box_grown_by_a_paste_keeps_its_send_above_the_panel; test_a_narrow_box_keeps_its_label_whole_and_drops_its_new_line_key; test_a_file_s_comment_opens_inline_where_the_file_ends_below_the_window; and test_a_widget_seats_the_thread_about_itself_and_none_inside_it.

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

The comment box a seat opens (a diff line's or file's Comment, a visual
case, a command hub row) keeps the row's width, as the card its comment
becomes will, but its words wrapped at the row's width: 827.5px under a
diff line, 683px in the command hub, against 562px for the messages and
the reply box in the same seat. A long comment broke its lines at the
row's end and rewrapped at Send.

The rule that #6773 stated for the seat's reply box, that its words wrap
where they will once sent, now covers the seat's comment box too. Its
field stands at the card's padding rather than running to the card's
sides, so the reply box's formula would put its words 10px past the
column. Its own rule keeps, past its end inset, the room by which its
field is wider than the seat's column, which ends its words
`--lf-comment-text-end` inside the column, where a message's words end:
562px wide under a mouse and 517px under a finger, against 827.5px and
782.5px before.

The `hub-seat-comment` state now types a draft long enough to wrap, and
`diff-line-comment` opens a line's comment box under the conversation
the line holds. The new browser test sends a wrapping comment from a
diff line's box and checks the message breaks its lines where the box
did; it fails on main.
A seat's comment box stood flush under the card above it in a diff and
a visual case, so that card's reply box and the comment box read as two
fields of one conversation. Only the command hub's theme kept a gap
there, for that reason, which holds for every seat, so core now keeps
it beside the gap between a seat's cards, and the hub's rule goes.

The gap is the cards' own (`--lf-sp-2`), not the hub's larger
`--lf-sp-3`: the card a comment becomes lands that gap under the card
above it, so the box now stands where its card will, and Send moves
nothing down or up. Measured on the diff gallery's long line
conversation and the command hub's goal row, the box's top and the sent
card's top are the same pixel (607.2 and 447.7). The hub's gap narrows
from 10px to 6px; the diff's opens from 0 to 8px.
leaf-agent
leaf-agent previously approved these changes Nov 23, 2026
Under a finger a card's reply box keeps Send's room at the end of every
line (`--lf-field-end-room`, text-field.js), and it reckoned that room
from where Send stands. Send stands centred inside the box's own border
(#6803), a pixel nearer the edge than the room a message keeps
(`--lf-comment-text-end`), so the reply's words ran a pixel past the
message they became: 976.27 against 975.27 in a seated card, 1358
against 1357 in a margin card. A word ending in that pixel moved to the
next line at Send.

The room now comes from `--lf-comment-text-end`, less the words' inset,
which the field's end padding already keeps past the band the box runs
over. Under a mouse the room stays Send's corner, and nothing changes.
In both cards, and in the seat's comment box, the words now end where
the message's do under either pointer.

The browser test now covers the seat's comment box and its card's reply
box, each under a mouse and under a finger, and checks both where the
words may run to and the lines they break into through Send. Against
main, the comment box fails under both pointers and the reply box under
a finger.
@max-sixty
max-sixty merged commit d3da863 into main Nov 23, 2026
5 of 6 checks passed
@max-sixty
max-sixty deleted the seat-comment-box-measure branch November 23, 2026 15:55
leaf-agent added a commit that referenced this pull request Nov 24, 2026
#7026)

`test_response_and_message_reading_keep_their_face_across_shadow_seating`
still expected a seated diff comment box's draft to end its words at the
floating box's end inset (15px under a mouse, 85px under a finger). That
expectation predates #6831, which ends a seated box's words where its
sent message's will, at `--lf-comment-text-end` inside the seat's card
column (`surfaces.css`, `[data-lf-thread-surface] > .lf-fab-bar
leaf-text.lf-fab-input`). In this test's 874px diff row that puts the
end 296.77px from the bar's edge. #6874 fixed the test's earlier
assertions, and that let it reach this one. The product does what #6831
intended: under a mouse, the seated draft and the message it sends both
end their words 296.766px from the card's edge.

The test now checks the seated draft's start and top against the
floating box, and its end against the sent message's words in the seated
card. The test's author override also had to cover the seat itself
(`[data-lf-thread-surface]`). Core declares `--lf-compose-action-inset`
and `--lf-comment-text-end` there (`response.css`), and the card
inherits them. Without that, under a finger the override reached the box
but not the card, and the two ended 26px apart only because of the
test's own styles.

Both parameters, `[False-light]` and `[True-dark]`, fail on `main` at
e80dd78 and pass with this change. This is a `journeys` test, so the
PR's CI doesn't run it. The next scheduled `ci` run on `main` is the
check after merge.

Closes #6871 — 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.

Seated thread cards: should the reply box fill the row or keep the margin card's width?

2 participants