Repository navigation
Lay out a thread message's controls as one group at its head's end - #4717
Merged
Merged
Conversation
# Conflicts: # dist/kernel/runtime/bundle-data.js
# Conflicts: # browser/runtime/annotation-overlay/annotation-chrome.css # dist/kernel/runtime/bundle-data.js
# Conflicts: # dist/kernel/kernel.json # dist/kernel/runtime/bundle-data.js
…er its growth A primary reader's notice stood in the head unpositioned, so its reach (::after, inset 0) took the message as its box and covered every word: a double-click on the first message's words opened the news instead of a rewrite. It is positioned again, at no offset. The rewrite ring test focused Edit while the card's growth from the comment box still cut what stands past its edge, passing on main only by finishing a few milliseconds sooner. It now waits for that motion to end.
Main's #4652 fits a margin card's held notice of news to the room the heads leave beside each name and time, counting the Edit a head kept room for in its padding. Here a head's controls are a group in its row, so the fit counts the group, and the rule parting a first message's controls from the thread's stands past the head's end rather than the group's, which a card short of room lets run past the head. A head too narrow for what it holds now cuts it a gap past its end again, as main's clipping head did, but only at that end, so its controls' rings and a finger's reach still stand above and below it. A later message's head keeps to the first track while it sticks on the actions' line, with the cell beside it, so nothing it holds runs under a narrow card's actions. The progress-disclosure test now checks what each head on the actions' line shows rather than every head's box, since a later head below that line runs to the card's edge. Its 311px touch case fails on main too.
Main's #4661 lets a head's words run into its controls' room while the controls hide, and stands the controls over the words' end on the message's ground when they show (the user's pick, 28 October). It built the room as the head's ::after sized by --lf-msg-control, with a ::before ground, beside controls positioned on the head's anchor. Here the controls are one group, so the group now stands in a room of its own (.lf-msg-control-room), the head's last item: it is as wide as the group, gives up its width first, and keeps the group end-aligned, so a squeezed head's words run under the group and the group stands over them. The group paints the message's ground behind itself while it shows, and always while a rewrite's Discard and Save stand in it. The room stays whole beside a notice of news, under a finger, and, as before #4661, with one control's width while a progress disclosure waits for its answer's reaction trigger, which this branch had dropped. The news fit reads the group's width, and what part of it the room lends, rather than --lf-msg-control, whose @Property goes. The receipt test reads the controls inside the head.
The progress-disclosure test now reads the card's heads once the card's own motion has ended: at 311px under touch its entrance was still running, and the actions and the transcript stood at positions read from different frames, so a later message's head looked as if it shared the actions' line.
A seat's first message lost Save to its head's clip and the empty thread-controls box while Resolve was away; the head now takes Resolve's room and the box goes with Resolve. A later card message whose head sticks beside the card's actions keeps an open rewrite's pair, standing over the head's words rather than past its end into the actions. The margin-news test finds Edit in the head's group instead of accepting none. Under a coarse pointer a thread's controls drop the gap between their 44px boxes.
leaf-agent
previously approved these changes
Oct 30, 2026
# Conflicts: # dist/kernel/kernel.json
leaf-agent
approved these changes
Oct 30, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 1, 2026
#4717 made the controls' room an element (`.lf-msg-control-room`) with its own `flex: 0 1e12 auto`. The order block in surfaces.css now names that element first, and controls.css sets no weight on it. A primary reader's notice of news, which #4717 put in the head's flow, gives way with the metadata, as it shared shrinking with it on main. The phone arm of `test_a_card_s_head_stands_whole_beside_news` now writes its message 51 days back: under heavy load the run outlasted a minute, "just now" turned "1m ago", and the shorter time stood whole on the phone.
leaf-agent
added a commit
that referenced
this pull request
Nov 1, 2026
The native-layout readiness check and rewrite control actionability check supplied private 30-second and 2-second timeouts, overriding the suite's shared deadlines. Remove both overrides so readiness uses its shared handover deadline and trial clicks use the browser fixture's default. The assertions and the behavior exercised by #4724 and #4717 stay intact. The existing deadline audit fails with both calls before this change and passes afterward. All four rewrite surface cases pass. The native-layout startup case independently fails its geometry equality assertion on both unchanged current main and this candidate: the wide exhibit shrinks from 189.25px to 187.96875px after activation. That separate failure is tracked in #4985. Closes #4925 — automated triage Co-authored-by: leaf-agent <[email protected]>
leaf-agent
added a commit
that referenced
this pull request
Nov 1, 2026
The transparent message header was above the held-reply notice in the paint stack, so axe could not measure the notice’s “2 new replies” text. The `clip-path` introduced in #4717 makes the header a stacking context. Giving the later notice its own stacking context with `isolation: isolate` restores document paint order while keeping the header’s clipping and the notice’s existing allocation. The four held-seat reply cases reproduce the overlap before this change and pass after it. They preserve withheld replies, notice activation, reply order and stable reading height. The diff-thread keyboard cases and inline-thread surface check also pass (seven browser cases total), as do all 737 runtime tests and `pnpm run check`. The existing overlap assertion remains unchanged. <details><summary>Paint-stack evidence and visual comparison</summary> At the failing assertion, `axe.commons.dom.getTextElementStack` places `.lf-msg-head` before the span containing “2 new replies”. The notice’s text starts at x=468.94, beyond the retained header words’ edge at x=460.94; it is the transparent header box spanning x=257–920 that covers it, rather than overlapping author text. The one-rule fix changes stacking without changing these allocations. The `hub-seat-held-news`, `hub-seat-held-news-phone` and `plan-card-held-news` stills are unchanged. The seated-thread desktop pair is shown below: | Before | After | | --- | --- | |  |  | </details> Closes #4953 — automated triage Co-authored-by: leaf-agent <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Nov 2, 2026
A squeezed message head gives up its parts in one order: its hidden controls' room, then annotations such as the "Queued for Agent" receipt, then its time, then its name (the user's choice, 28 October). That order was three shrink weights spread over two stylesheets and scoped to margin cards, while the panel's, page threads' and the full thread reader's heads kept the name from shrinking and clipped the time with no ellipsis. The margin news fit also worked the order out again in script to decide when to hide a name. Now one block states it for every head. - **The order** (`browser/styles/components/surfaces.css`): one ordered block gives each part its weight: the controls' room (`.lf-msg-control-room`) `1e18`, the metadata's annotations `1e12`, the time and the metadata box `1e6`, the name `1`. Each weight is a million times the next, so a part gives up all its room before the next gives up any visible width. CSS can't take a weight from a rule's position, so moving a part swaps two weights. A primary reader's notice of news, which #4717 put in the head's flow, shares the metadata's weight, so the two give way together as they did before. `controls.css` and `annotation-chrome.css` set no weights. Every head now cuts a squeezed time and receipt with an ellipsis and caps a long name at 40% of the head or 5em, whichever is wider, as margin cards did. - **The news fit** (`#fitMarginNews`, `browser/runtime/thread/thread-card.js`): it reads how much of each name the notice leaves as drawn instead of recomputing the order. A name cut below an em still hides (`data-lf-nameless`), now with `clip-path`, keeping its box. Before, its room went to the time, which showed a sliver of itself ("5." of "51d ago" on a 160px card). A whole name narrower than an em, such as "A", is no longer hidden. - **The working head** (`browser/runtime/thread/transcript.js`): its condition ("Stopped") was bare text the order's rules couldn't reach; it is now a span among the annotations. Behavior changed in tests: - `test_a_squeezed_head_gives_up_one_part_at_a_time` is new. It narrows a queued message's head from 2000px to nothing and checks that the room, the receipt, the time and the name give way one at a time in that order, each giving all it can. - `test_a_card_s_head_stands_whole_beside_news` dates its message 51 days back. Under heavy load a run outlasted a minute, "just now" became "1m ago", and the shorter time stood whole on the phone. Checked in Chromium and Firefox. Before-and-after stills of 22 thread, card and panel states differed only in a reply field's caret, and so did 11 of them taken again after the merge with #4717. > _This was written by Claude Code on behalf of max-sixty_
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 message's controls — Edit, Add reaction, Copy, and an open rewrite's Discard and Save — are now one group at the end of the message's head, placed by the head's flex row. Before, each control was positioned absolutely against the head's anchor, Edit and the reaction trigger were offset past Copy, and the head reserved room for them with widths set per case (
--lf-msg-control,--lf-msg-head-room,--lf-msg-controls-width,--lf-msg-edit-width,--lf-thread-message-control-room). The browser code is +294 −317 lines againstmain(whitespace ignored, comments included).How the group is laid out
messages.jsrenders<span class="lf-msg-control-room"><span class="lf-msg-controls">…</span></span>as the head's last item (controls.css):flex: 0 1e12 auto; min-inline-size: 0), keeping the group end-aligned. So a squeezed head's words run under the hidden controls, and when the controls show they stand over the words' end, on the message's ground, with nothing moving. That is Let a message head's words use its hidden controls' room, and cut a squeezed head's time before its name #4661's behaviour, rebuilt on the group instead of a::afterbox sized per case.ReactionStripView.triggerinto the group and registers through a Litref, re-registering whenever Lit draws a new button. The strip below the words holds only the palette.message-edit.js), so the editor's Escape scope also covers them, and the floating panel's rewrite check asks whether a node stands in a message being rewritten rather than inside its editor. Beside a seat's first message, where Resolve leaves while a rewrite is open, the head takes Resolve's room, so the pair stands in Resolve's place by layout, as the margin card's head already did.clip-path), so focus rings and touch reach above and below it stand whole; the margin card's metadata clips its own rising labels.#fitMarginNews) and the held-news header slot inthread-card.jsmeasure the group rather than the head's padding.What looks or behaves differently
mainFirefox put it 18px below.data-lf-beside-actions), as every head did onmain, and its controls stand aside there, as Edit and Copy did onmain. An answer's reaction trigger now stands aside too; an open rewrite's Discard and Save stay.mainthe card rose 180px under the finger to show them: Edit leaves as the rewrite opens, socard-anchor.jsreads the press from the next element up, which onmainwas the message, moved by the transcript's scroll, and is now the controls group in the sticky head.Tests
reaction-strips.test.mjsadds a case for a trigger drawn again, which registered stale before.test_a_rewrite_is_the_reply_box_where_the_words_stoodnow checks that a pointer reaches Discard and Save on each surface, andtest_a_rewrite_keeps_its_pair_while_its_head_sticks_beside_the_actionscovers a later card message's rewrite whose head sticks on the actions' line. A reviewer found both cases broken on this branch before the fix.test_a_card_s_head_stands_whole_beside_newslooks Edit up in the head's group; it had accepted finding none.test_progress_disclosure_keeps_its_words_visible_beside_margin_pagingchecks what each head on the actions' line shows rather than every head's box, since a later head below that line now runs to the card's edge, and it reads the card after its entrance motion ends.test_a_rewrite_of_a_comment_just_sent_is_the_reply_boxreads Edit's ring after the card's growth from the comment box ends; it passed onmainonly by finishing a few milliseconds sooner.Checked locally:
pnpm run test:runtime,pnpm run check:browser, and about 190 targeted browser cases over rewrites, head layout, the controls' room, news fits, reactions, summaries, seated threads and touch; probes againstmainin Chromium, Firefox and a 390px touch viewport; a Codex review of the code, and a fresh agent's use of each surface on both versions.