Skip to content

Head a margin card with its thread's title, and let each message's name scroll with it - #7442

Merged
max-sixty merged 10 commits into
mainfrom
card-title
Nov 27, 2026
Merged

max-sixty merged 10 commits into
mainfrom
card-title

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

The margin thread card's top line now holds the thread's title beside its buttons, as the floating panel's thread view does, and each message's name scrolls with its message instead of pinning on that line. The card and the panel read the title through the same helpers (threadHeading, and the new titleShown), so both say the same thing for a titled, pending or untitled thread, and the line keeps its height through all three, so a title arriving moves nothing. The card's pinning machinery goes: the sticky heads and their cover, the heads' ::before row, the scroll-driven fade with data-lf-beside-actions, #fitLineNews, and the grid track that made the transcript and its messages subgrids.

Beside its passage, a card stands its first message, not its top line, level with the passage's first line. One length, --lf-card-line (surfaces.css), says how far that message stands below the card's top; the comment box's frame reserves it and placement takes it off the beside offset, so the box's field stands where it does on main and Send still moves no word. A head's height (--lf-msg-head-height) is now 28px or a line of the name face, whichever is taller, and the floating panel's head line keeps its padding over that height, so at a large default font size a view's head line, in the card or the panel, keeps one height before and after its title arrives, and the message heads fit the room the box reserves; at a 32px font, Send moved a comment's words 15px on main and 5px now, the rest from the reply field centring its line. The maintainer picked both the title line and this placement on the scroll-cue Leaf page.

To weigh: every card is 33px taller (34px on a touch screen), which in a window too narrow for the margin lets a card standing over or under its passage cover that much more of the column. Where a message's name line sits at the top of the messages, as Next unread leaves it, the jump to the thread's start covers its Copy button, as it already does in the panel's view.

Tests: focused card, panel, placement and comment-box browser tests, new ones following a comment from its box through Send, the placeholder and the title, and a card's messages at a 28px font, a bounded log's cut growing from nothing, the box and card probed against main in Chromium, Firefox and on a touch screen, pnpm run test:runtime and pnpm run check.

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

…me scroll with it

The card's top line held its presses beside the name of the message in
view: each message's head was sticky and pinned on that line while its
message stood under it. The maintainer chose the thread's title on that
line instead, with each name scrolling with its message, as in the
floating panel's view of a thread, so the card and the panel draw a
thread one way and the card keeps no code to pin names.

What the user sees differently:
- The card's top line holds the thread's title, cut with an ellipsis,
  starting where the messages' names start, in the face the panel's view
  names it in (600, `--lf-font-compact`), then the notice of held news,
  Next unread, Previous and Next, Open in panel, Resolve or Reopen, and
  Close. It says what the panel says, through the same helpers
  (`threadHeading`, and `titleShown`, new in messages.js, which the panel
  now asks too): the title, or "Generating thread name…" while one is on
  its way, read from the thread as it stands. An untitled thread's card
  shows only its presses on the line; the panel names such a thread to
  assistive tech alone, and the card's dialog label already names it.
- Every card is 33px taller: the 28px line, and the 5px ring room the
  transcript keeps above its first head now stands under it.
- Message heads scroll with their words. Partway through a long message
  its name is out of view; its ground says whose words they are (#7352).
- The words fade over 12px where they run on past the transcript's top,
  as in the panel, by a mask that focus in the transcript lifts.
- A quote of words a revision rewrote stands under the head line, as in
  the panel, rather than above the presses.
- Tab reaches the card's presses before its messages, as the line now
  comes first in the thread, in the order it is drawn.
- The comment box's unpainted frame reserves the card's new line, so the
  card Send opens still grows out of the box with no word moving. A box
  held by its top, as one beside a paragraph is, stands its field 33px
  lower: 57px under the paragraph's top instead of 24. One above what it
  is about, held by its foot, keeps its field where it stood.
- Next unread stays on the line while a rewrite is open.

Removed: the sticky heads with their cover shadow and
`--lf-thread-room-cover`; the transcript's sticky `::before` row and
`--lf-line-ground`; the overlay fade with `--lf-thread-fade-top` and
`--lf-thread-fade-height`, which thread-preview.js computed on every
scroll; `data-lf-beside-actions`; `data-lf-transcript-focus` and its
focus listener; `#fitLineNews`, `data-lf-nameless` and their size
observer; the view timeline that let a stuck head's annotations scroll
out; the body's `--lf-top` and `scroll-margin` under a stuck head; the
actions' grid track, with the transcript and messages as subgrids of it,
and so the transcript's stable scrollbar gutter, which only a subgrid
needed; the transcript's grid, whose end padding Firefox dropped beside
New reply, for a block whose padding every engine keeps, so the
`::after` row goes too; the summary's margin under the actions; the
card's half of the rule between a first head's controls and the
thread's. A reading region's `paintContinuation(above)` becomes
`onReach()`, which the card's scrollbar decision alone uses. New reply
sticks the room's depth lower, as the panel's does, since a block
sticks it at its content edge. `titlePending` is no longer exported.

Tests: test_a_stuck_card_head_keeps_the_name_and_lets_its_annotations_scroll_out,
test_a_rewrite_keeps_its_pair_while_its_head_sticks_beside_the_actions
and the journey test_words_scrolled_past_a_card_head_show_nowhere_above_it
go with the pinned heads. test_the_thread_card_opens_on_its_latest_message_under_its_own_name
becomes test_a_thread_card_opens_on_its_latest_message_and_fades_where_words_run_on.
The card's notice tests check the notice and presses on the head line
and the title cut before the notice; test_a_title_on_its_way_reads_as_one
checks the card's heading untitled and pending; others move their head
line and quote assertions to the new layout. The squeezed-head test
gives its message a day-old time, since a head spanning the card fits
"Me just now" and its controls.

Production code: CSS -177 code and -121 comment lines, JS -81 and -22;
tests -278 lines.
…w's findings

The card opens on, and Next unread lands, a reply's head at the
transcript's top, where the jump to the thread's start stands while turns
are scrolled away: its reach covered the head's Copy, and a press there
glided to the start. The panel's view did the same. A box scrolling a
thread now keeps the jump's room over its turns in its `scroll-padding`
(`--lf-thread-jump-room`, surfaces.css: the jump's inset, face and reach),
the card's transcript and the panel's view alike, and the line a box lands
a turn on is that padding (reply-landing.js, `headLine`, which read the
sticky-header slot, so `slotTop` goes). A landed head now stands 30px under
the card's top edge, not 5, and 40px under the panel view's, not 10.
New reply's glide of the user's own turn (thread-card.js, `#fitAnswer`)
still measures from the box's padding: reading the landing line there
changed which answers the card follows and broke its growth past a region
(test_a_card_grows_past_a_region_that_does_not_scroll_its_subject).

- The transcript's padding is logical again, so in `dir=rtl` the title and
  the names start on one edge.
- A send's ride compensates only boxes that stick to the riding scroller
  (box-motion.js, `stickers`), skipping what sticks inside a scroller a
  message holds, which it moved 45px. It still reads each element's style
  outside those scrollers: the panel's sticky boxes, its jumps and New
  reply, stand three levels under its view, so the view's own children
  don't reach them.
- The card's scrollbar decision reads three lengths on a reading of its
  reach that changes nothing, as every scroll's is, and counts its turns
  only when the width or overflow changes or the thread is read again.
  `onReach` stays: a picture loading in a turn changes overflow with no
  reading or fit, and only the reach's observers see it.
- The reading-region fade takes an opt-in top stop
  (`--lf-more-fade-above`, controls.css), which the card sets to 12px, in
  place of the card's own copy of the whole mask. The panel's view keeps its
  own mask: it fades both edges always, over its padding, rather than
  while turns run on past an edge.
- The transcript draws its focus ring inside its edge, clear of the title's
  descenders.
- The title's face is one rule in chrome.css, which both surfaces load, on
  `--lf-font-name`, so the font guard
  (test_every_rule_of_the_interface_names_a_declared_font) passes.
- Stale text about pinned heads and a grid transcript is gone from
  surfaces.css, presence.js, thread-preview.js and test docstrings; the
  journey test_firefox_paints_the_author_and_words_in_the_same_send_flash
  no longer steers its sample around actions beside a head.

Tests: test_a_reply_next_unread_lands_copies_from_under_the_start_jump is
new and fails on the previous commit (the press goes to the jump). The 40px
card scroll test checks a name and its words move together; the squeezed
head test checks the day stays whole while the clock wraps out; the card's
notice test again checks "Me" and its day whole and Edit clear of the time
under a finger. test_a_card_opens_on_its_first_unread_reply measures from
the landing line.
Main wrote the runtime in TypeScript (#7424, #7429, #7433), so nine modules
this branch changes now compile from a `.ts`: dom/geometry, dom/reach,
readings/reading-regions, records/thread/inline, messages, reply-landing,
thread-card, transcript and state/presence. Each of the branch's edits to
those `.js` files is carried into its `.ts`, and `node build/typescript.mjs`
wrote the `.js` again. inline.js merged without a conflict, but its edit
(the margin thread's drawn view drops `thread`) sat in the compiled file
only, so it is carried into inline.ts too. Nothing else overlapped: main
changed none of this branch's stylesheets, thread-preview.js, box-motion.js
or floating-panel.js.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found nothing to change in the diff. I'm holding the verdict only because the description says this waits on the maintainer's pick of where the comment box's field stands: 33px lower beside its target, as here, or the 18-line placement change that puts the first message level with the passage instead. Once that's settled, the rest is ready. The change removes the card's pinning machinery (the sticky heads, their fade and cover, #fitLineNews, the subgrid tracks), and the card and the panel now draw the title through one titleShown.

… day's full width

On Linux CI the time stood 0.5px short of the day's width at one step, which
the half-pixel bound counted as the day's room, so the day, cut by that half
pixel, failed the check. The bound is now the rounding error.
… panel

Landing a turn below the jump to the thread's start (88a08a3) left
30px in the card and 40px in the panel's view above the landed turn,
where a sliced piece of the message before it showed under the title,
unfaded after Next unread since focus lifts the fade; and a wheel scroll
could still stop a head in the jump's band. So a box scrolling a thread
lands a turn where it did before: the card at its transcript's padding,
the panel's view where its heads did on main (reply-landing.js,
`headLine`, reads `slotTop` again). `--lf-thread-jump-room` goes, and so
does test_a_reply_next_unread_lands_copies_from_under_the_start_jump: a
press on Copy at the end of a head landed under the start jump glides to
the start again, in the card as in the panel.
A message head clips what runs past its end a gap out, and nothing at its
start, where a card hangs an unread reply's dot outside the head's box.
`inset()` names physical sides, so in `dir=rtl` the clip cut the head's
start, the dot's outer half with it, and nothing at its end. A
right-to-left head now names its end on the left (surfaces.css), so its
dot stands whole, and a head too narrow for what it holds is cut at its
end, as a left-to-right one is.

test_a_card_opens_on_its_first_unread_reply runs in both directions and
checks a press at the dot's outer edge lands on it; the right-to-left case
fails without the rule. The shift watch's sticky-inset test says it covers
any box sticking in a ride's scroller, as a thread's jumps do, since no
message head sticks.
Beside its passage, a thread card now stands its first message a gap above the
passage's first line, with the card's title line above that, and a comment box,
whose frame reserves the same line, stands its field where it stood before the
title line came. Before this, the card's top line stood level with the passage,
which put the box's field 33px lower than on main, so beside a heading it read as a
comment on the paragraph under it. The maintainer picked the first message on the
scroll-cue page.

One length says how far a card's first message stands below its top,
`--lf-card-line` (surfaces.css): the head line and the room the transcript keeps
under it. The comment box's frame reserves it, and placement takes it off the
beside offset (comment-placement.js, `cardLine`). The transcript's edge room moves
beside it, so both read one definition. Under or over its passage nothing changes.

Probed against main at 1440x900 in Chromium and Firefox, and on a touch screen: the
box's field and the card's first message stand where main stands them, and Send
moves no word. A new test holds a card's messages still while its title goes from
none, to the placeholder while an agent names the thread, to the title. The
placement tests that read a surface beside its passage now read its first message.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description is out of date as of af4dff7. It still says the comment box's field "stands 33px lower beside its target" and that the PR "waits on that pick". But the push puts in place the other option: place-beside lifts the card and the box by --lf-card-line, so the first message and the field are level with the passage. The squash merge uses the description as main's commit message, so it should say what the change does now. It should also drop the hold, if the push is the maintainer's pick. I'm holding the verdict until the description changes. I found nothing else to change in what was pushed. The box's frame still reserves the same height (--lf-card-line + head + gap equals the old 2 * head + edge-room + gap), so Send still moves no word. tests/runtime/comment-placement.test.mjs passes at this head.

… font size

An independent review found three ways the first-message placement still read the
card's top where its words stand:

- A head's height was 28px whatever the type. Where the reader's default font size
  makes a line of the name face taller (about 25px and up), the card's head line grew
  when the "Generating thread name…" placeholder or the title arrived, and the
  messages under it moved, by 9.7px at a 32px font; the message heads outgrew the
  room the comment box keeps for them too, so Send moved the words, by 14.7px at
  32px on main as well. `--lf-msg-head-height` is now 28px or a line of the name face,
  whichever is taller, so the head line, the message heads and the room the box
  reserves stay one height. At 32px Send still moves the words 5px, from the reply
  field centring its line in its fixed row, as main does.
- A bounded log cut the card's top only once the passage's row crossed the log's top,
  though the card's top stands its head line higher, so a one-pixel scroll cut 34px
  off at once. The cut now starts as the card's own top crosses, and grows from
  nothing.
- The tests that read a card beside its passage added the root's `--lf-card-line`
  back to the card's top, so they passed whatever that length said. They now read
  the card's first message as the card draws it; a comment box, which draws no
  message, is still read at its frame plus the line it reserves.

The new tests follow a comment from its box through Send, the placeholder and the
title at the default font size, and a card's messages through the placeholder and
the title at a 28px font, which fails without the head height above. The log test
checks the cut is 0 with the card's top 4px under the log's and 4px once over.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description now matches the code, and the hold it carried is gone. One test read in the push can race. In test_a_card_on_a_log_row_stands_beside_the_log_and_leaves_with_its_row, the wait_for_function that stood after the last scroll now stands after the 8px step. That wait exists because "placement follows the scroll a frame or more behind it, more under load", which rendered() doesn't cover. After the final scroll, --lf-cut-top already holds the step's ~4px, so the read can take that stale cut and fail against the log's top on a loaded runner. Waiting for the cut to grow past the step's value fixes this. The suggestion is inline.

…here they're drawn

A second review round found the floating panel's thread view had the card's
defect: its head line was 36px whatever the type, so at a 32px default font a
title arriving grew it and moved Resolve 3px. Its least height is now its 8px
padding over `--lf-msg-head-height`, the same at default sizes, so the title takes
a line already kept for it.

The title test read the comment box's words through a range over the editor, which
the slotted placeholder answered, so it passed with the typed words moved. Where
Send stands the words is test_send_grows_thread_around_the_words's to read, from
the editor's glyphs; the title test now follows the card Send makes, and its
placement, through the placeholder and the title.

The log test waits for placement to catch up with its last scroll before reading
the cut, as the step before it does, and a comment names surfaces.css as the edge
room's home.
@max-sixty
max-sixty merged commit bfd1b7b into main Nov 27, 2026
8 checks passed
@max-sixty
max-sixty deleted the card-title branch November 27, 2026 23:32
max-sixty added a commit that referenced this pull request Nov 28, 2026
…d is (#7471)

`leaf-dev placement cards` opened each case's thread as the agent with
no title, which a real agent can't do: `leaf thread create` requires
`--title`, and a reply in an untitled thread is refused unless it names
it. Since #7442 a margin card's top line holds the thread's title, so
every gallery capture showed that line empty. The opening comment now
carries the title the gallery's replies already gave ("Card placement"),
from one constant.

The user asked for this on the review page after the gallery's 1000×700
capture showed a blank header.

Ran `--case paragraph`, `--case turns` and `--case comment-answered`:
each card is headed by its title, and sizes and placement are unchanged.

> _This was written by Claude Code on behalf of max-sixty_
leaf-agent added a commit that referenced this pull request Nov 28, 2026
#7442 put a head line holding the thread's title atop the margin card and reserved its room in the comment box's frame, so every card and box frame is 33px taller and a card's actions stand on the title line. Five tests read geometry or a line from the old head:

- the press that drops selected words lands on the heading, since the box under the paragraph now covers the figure's caption;
- the box beside a tall target is scrolled back off the window's head first, since `m` leaves the taller frame already at the window's top;
- a margin card's resolve action is checked against the thread's title line, where #7442 moved it;
- the chart comments by pointer before by keyboard, since the line's card now covers the dot the pointer reads;
- the growing-draft test uses a window that leaves the transcript its whole height at the cap. Before #7442 the same test fails at 530-550px windows the same way, the grid sharing the shortfall between transcript and reply.

Closes #7495
leaf-agent added a commit that referenced this pull request Nov 28, 2026
…7511

The test runs at 628px, where the cap still leaves the transcript its whole
height, and at 600px, the window it ran at before #7442's taller card. There
the capping keystroke moves the first turn 7px (322 to 315px), so that case is
marked xfail, strict, on AssertionError, and fails once #7511's fix holds the
turn.
leaf-agent added a commit that referenced this pull request Nov 28, 2026
#7442 added a head line with the thread's title to the top of the margin
card, and the comment box's frame reserves the same room. Since then
every card and box frame is 33px taller, and a card's actions sit on the
title line. All nine failures in #7495 come from tests that read
geometry or a line from the old head. None is a defect #7442 introduced,
so this PR changes only tests:

-
**`test_a_press_that_drops_the_selected_words_takes_c_from_their_field`**:
the box under the selected paragraph now covers the figure's caption
(field 257–301px, caption middle 276px), so the "press elsewhere" landed
on the box. It presses and drags on the heading instead.
-
**`test_the_box_beside_a_tall_target_waits_at_the_window_s_top_through_a_scroll`**
(4 cases): `m` brings the ask to y=22. The taller frame was then already
clamped at the window's top (8px), so the scroll had nowhere to take it
(`assert 8 < 8`). The test scrolls back 100px first.
-
**`test_pending_messages_stay_readable_through_admission[composer-panel]`**:
on a margin card the resolve action now sits on the title line rather
than beside the first message's name. That is #7442's intent, so the
check reads the title line there. The inline thread keeps the old check.
- **`test_a_comment_takes_the_point_a_chart_s_ring_is_on`** (Chromium,
Firefox): the card opened by the line's comment now covers the dot the
pointer has to read. The pointer comments come first and the keyboard
comment last, which keeps every step. I didn't close the card with
Escape: the chart then reports an unchanged `display` write on its ring
and aim, a separate chart defect that #7513 tracks.
- **`test_a_growing_draft_under_its_words_holds_the_editor_s_top`**: the
test now runs at two window heights. At 628px the cap still leaves the
transcript its whole height, and the reply holds. At 600px, the window
it ran at before, #7442's 33px-taller card makes the capping keystroke
move the first message 7px (322→315px), because the card's grid splits
the cap's shortfall between transcript and reply. That case is marked
`xfail(strict=True, raises=AssertionError)` on #7511, so it fails as
soon as a fix holds the turn there. The same shift shows at 540–550px
before #7442.

The nine failing cases fail on current `main`, and on this branch all
ten pass, with the 600px draft case as the expected failure (`uv run
pytest -n 3` over the five node ids). I also reran the placeholder,
chart and draft tests on either side of #7442: they pass at
`bfd1b7b75~1` and fail at `bfd1b7b75`.

Closes #7495 — automated triage

---------

Co-authored-by: leaf-agent <[email protected]>
leaf-agent added a commit that referenced this pull request Nov 28, 2026
…ller card (#7535)

Two margin-draft journeys from #7528 fail because #7442 made every
margin card 33px taller, which moved them into the short-window case
#7511 already tracks. This PR changes only the tests. Each journey runs
33px taller, which gives it back the room it had before #7442. Its old
window height stays as a strict `xfail` on #7511, as #7512 did for
`test_a_growing_draft_under_its_words_holds_the_editor_s_top`.

-
**`test_continued_margin_draft_grows_below_its_first_line_after_agent_reply`**
now runs at 633px. At 600px, the keystroke that brings the card's foot
to the window's foot moves the reply's first line from 426px to 419.3px.
- **`test_a_second_margin_reply_grows_below_the_first_line`** now runs
at 673px. At 640px, the first Shift+Enter already caps the card and
moves the editor's top from 514px to 509px.

In both, the card's grid splits the cap's shortfall between the
transcript and the reply, which is the mechanism #7511 describes. It
shows at shorter windows before #7442 too. When I swept the window
height on current `main`, the continued draft passed at 620px and above,
and the second reply at 660px and above. Each `xfail` is strict, so it
fails once a fix for #7511 holds the reply at the old height.

Verification by node id on Linux Chromium: both journeys fail on `main`
at `6313a6f59`. On this branch the 633px and 673px cases pass, and the
600px and 640px cases xfail with the same `AssertionError`.

The rest of #7528 is not covered here: card placement, the
responsive-layout draft, the thread walk and the long text document.

Part of #7528 — automated triage

Co-authored-by: leaf-agent <[email protected]>
leaf-agent added a commit that referenced this pull request Nov 28, 2026
…a block's top (#7536)

This fixes four of the eight journeys #7528 tracks: both `column` cases
of the placement sweep, and both cases of the responsive-draft aim
journey.

**Placement sweep, product fix.** #7442 moved where a bounded block's
top starts cutting a margin card. The cut now starts a head line
(`--lf-card-line`, 33px) and a gap above the row's line, so a card
beside its row, whose top now stands that far above the line, is cut
from nothing. `commentBoundary` applied that lead to every side. A card
over or under its row has no head line level with the row, so the
block's top cut it while the row still showed whole. At 1000px the sweep
opened a card above `#in-4`, a row 39px inside the `#inner` log, and
379px of the card's 402 were cut away. The boundary's `cut` is now asked
with the side (`thread-preview.js`). A card beside its row keeps #7442's
lead, and a card over or under it is cut once the row's line comes
within a gap of the edge, as before #7442.

**Placement sweep, test update.** At 1440px the card stands beside the
row, held up by the window's foot, and is cut 35.7px while the row shows
whole. That is #7442's intended lead. The sweep's `uncut-while-shown`
allowance assumed a beside card's top stood a gap above the line. It now
allows a gap and a head line for a card beside its row, and still allows
only a gap for a card over or under it.

**Aim journey, test update.**
`test_open_draft_retains_words_when_responsive_layout_hides_its_target`
aimed at the first `#bg-contents a`. Since #7473 that is the outline's
hidden title link, which Tab never reaches. #7473 landed after #7442, so
this pair is a #7473 casualty, the same one #7502 repaired in five
browser tests. The journey now aims at `#bg-contents a[href='#first']`,
as #7502 did.

Evidence, by node id on Linux Chromium:
- `test_every_card_keeps_the_placement_rules[column-1000]` and
`[column-1440]` fail on `6313a6f59`, and pass with this change.
`[column-1000]` still fails with the test update alone, which shows the
product fix is needed.
-
`test_open_draft_retains_words_when_responsive_layout_hides_its_target[False]`
and `[True]` fail on `6313a6f59` and pass with this change.
- The other four sweep cases still pass, and so does
`test_a_card_on_a_log_row_stands_beside_the_log_and_leaves_with_its_row`,
#7442's test of a beside card's cut growing from nothing.
`tests/runtime/comment-placement.test.mjs` passes.

The other four journeys in #7528 (two margin-draft journeys, the thread
walk and the long text document) are not touched here.

Refs #7528 — automated triage

---------

Co-authored-by: leaf-agent <[email protected]>
leaf-agent added a commit that referenced this pull request Nov 28, 2026
…OS (#7539)

Two `test_render_anchors` tests have failed on every macOS copy since
#7442 made the comment box's frame 33px taller. On Linux they still pass
only because Linux's fonts wrap these pages' lines differently. This PR
changes only the tests' arrangements, so #7442's intent and the
placement rules stay as they are:

-
**`test_a_comment_box_follows_its_passage_and_resume_returns_the_writer`**:
once its passage's foot passes the window's top, the box leaves with the
passage, and its own foot hangs 77px below it (`scroll-held-in` in
`placement-rules.json`). In a 1280×500 window the page can't scroll far
enough on macOS to take that foot out of view. The box ended at `y:
-150.5` with height 167, so its foot showed 16px into the window. On
Linux it cleared by 2.5px. A 400px window gives the page room to scroll
the box fully away. The test still asserts the box has left and that
Resume (`g i`) brings it back focused with its words.
- **`test_the_comment_button_stands_on_no_control`**: the box opens
under its passage over whatever stands there, and placement no longer
moves it past controls. On macOS the second paragraph fits on one line,
so the board card's grip sat under the field. On Linux that paragraph
wraps and the board stands 27px lower. A paragraph before the board
keeps the board's controls out of the field's room on either platform.
The test still hit-tests every control's corners and centre, then makes
the press.

**Verification on the macOS runner** (`flake` dispatches of `ci`):

| Commit | comment box | comment button |
|---|---|---|
| `bfd1b7b75^` (#7442's parent),
[46169803397](https://github.com/max-sixty/leaf/actions/runs/46169803397)
| 8/8 pass | 8/8 pass |
| `bfd1b7b75` (#7442),
[46169805674](https://github.com/max-sixty/leaf/actions/runs/46169805674)
| 0/8 | 0/8 |
| main `6313a6f59`,
[46168668757](https://github.com/max-sixty/leaf/actions/runs/46168668757)
| 0/12 | 0/12 |
| this branch,
[46170921449](https://github.com/max-sixty/leaf/actions/runs/46170921449)
| 18/18 | 18/18 |

Both also pass on Linux.

#7532's other four tests are untouched here: the Go-to menu hint, the
two teardown shifts and the motion float comparison. That issue carries
their diagnosis.

Refs #7532 — automated triage

Co-authored-by: leaf-agent <[email protected]>
max-sixty pushed a commit that referenced this pull request Nov 28, 2026
…efore its click (#7537)

`test_a_thread_walk_card_leaves_and_returns_with_its_anchor` timed out
after 120 s on main because its last step never started. The step
scrolls the margin card's Reply box up 2 px at a time until the box's
top passes the window's top, clicks it, and types. It then waits for the
card to come back, as a browser brings a field back for its caret.
Off-flow counts a box within a pixel of the edge as shown
([`unseen`](https://github.com/max-sixty/leaf/blob/ec5a6e787f2643ace604ee60077d0ecbb5e2ccbc/browser/runtime/readings/off-flow.ts#L65-L75)),
so a box the loop stops between 0 and −1 px is never brought back. #7442
made every margin card 33 px taller, and since then the loop stops at
−0.86 px. The loop now scrolls past −1 px, as #6394 made the test's
other loop do, and the assertion on where the press lands checks the
same bound. Product behaviour is unchanged.

By node id on Linux, the journey fails on `6313a6f59` (main), with the
box's top at −0.86 px before and after typing, and passes twice on this
branch.

Refs #7528 — automated triage

Co-authored-by: leaf-agent <[email protected]>
leaf-agent added a commit that referenced this pull request Nov 29, 2026
… its line (#7601)

A thread walk opens its card before its landing scrolls the card's words
into view. `commentPlacement`'s `choose` reopened the card only for
moves Leaf started in the boundary's scroller, which is the page. In a
long text document the walk scrolls the document's own `<pre>`, so the
card never reopened. It kept the spot it took while line 840 was clipped
(`held.top = -35438` from the line), and limitShift stood it at −35,067
px. A second `t` in the same frame found focus out of sight, and the
walk returned to line 840 instead of moving on to 880. #7442's taller
card exposed the defect: with the card 20 px shorter, limitShift's lower
bound happened to win, so the card landed in view by luck.

`choose` now counts moves Leaf started in every box that carries the
subject, out to the boundary's scroller (`startsUnder`, built on
`scrollersOf`). When the walk's landing reopens the card, the card drops
its held spot and is placed again where the landing left its words. It
keeps the side it chose, as the module header already said it should. A
scroll from `makeRoom` still resets the count through `scrolled()`, so
the card's own room-making never reopens it.

Verification, by node id on Linux:
-
`tests/journeys/widgets/test_code_and_documents.py::test_a_long_text_document_draws_the_lines_in_view_and_keeps_the_rest_whole[browser]`
and `[firefox_browser]` fail on `6e1977ac0` (`assert 1 == 2` on `steps`)
and pass on this branch.
- The placement sweep `tests/journeys/margin/test_card_placement.py`,
the thread-walk and pane-walk browser tests,
`test_a_thread_walk_card_leaves_and_returns_with_its_anchor`, and
`tests/runtime/{comment,floating,margin,scroll}-placement.test.mjs`
pass.
- The `browser/types` type check and eslint are clean.

This was the last of the eight journeys #7528 tracks. #7535, #7536 and
#7537 fixed the other seven.

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

2 participants