Skip to content

Give a thread card the room beside the floating panel's row - #4555

Merged
max-sixty merged 2 commits into
mainfrom
thread-card-foot-band
Oct 28, 2026
Merged

max-sixty merged 2 commits into
mainfrom
thread-card-foot-band

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

A thread card or comment box standing in the margin stopped 8px above the floating panel's row, though the row stands under the page column and not under the card. That left an empty band, the row's height plus its gaps (about 64px), at the window's foot under every margin card.

The cause was the boundary, not anything reserving the band. shownWindow already lets each piece of window chrome bound only the room it stands across, but commentBoundary asked for the room across every column the page shows, so the row bounded the whole width.

  • shownWindow takes across, the columns the asker stands in; chrome beside them takes none of its height.
  • commentBoundary offers across(columns), its room for a surface in those columns. The side is still chosen from the whole-width boundary.
  • The placement middleware (size, shift, the plane and fit's new room) reads that room at the surface's current columns. A card in the margin reaches the window's foot; a card or box reaching over the row's columns still stops above it, as at narrow widths and on phones.
  • The grip holds a carried surface the same way.

Checked in Chromium and Firefox with leaf-dev probe: at 1440×600 the margin card's foot moved from 534 to 592 (window foot less the 8px gap), and at 1100, 900 and 390 (touch) wide, where the card reaches over the row's columns, it still stops at the row's top less 8px. leaf-dev stills changed only ship-card-more-room and ship-card-short-window (the card now runs to the foot), plus caret noise on plan-page-comment-long. A new runtime test covers both cases.

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

The thread card and the comment box stopped 8px above the floating panel's row
even where they stood in the margin beside it, leaving an empty band the row's
height and gaps (about 64px) at the window's foot. Their boundary was the room
across every column the page shows, and `shownWindow` lets each piece of window
chrome bound only the room it stands across, so the row, under the page
column, bounded the whole width.

`shownWindow` now takes `across`, the columns the asker stands in, and
`commentBoundary` offers its room across a surface's columns. The placement
middleware reads that room at the surface's current columns, so the card in
the margin reaches the window's foot, while a card or box reaching over the
row's columns still stops above it, as at narrow widths and on phones. The
grip holds a carried surface the same way.
@max-sixty
max-sixty merged commit 9ee7614 into main Oct 28, 2026
4 checks passed
@max-sixty
max-sixty deleted the thread-card-foot-band branch October 28, 2026 05:31
leaf-agent added a commit that referenced this pull request Oct 28, 2026
…4579)

The margin-tracking test still expects its card to stop above the
floating panel, although #4555 deliberately lets a card beside the panel
use the window's full height. On current main the test fails with a card
bottom of 892px against an expected 834px; the captured page shows the
card beside the panel, with its bottom correctly 8px above the 900px
window foot.

Read the window foot and assert that the card stands horizontally clear
of the panel. This preserves the source-following and bottom-clamping
assertions without undoing #4555's layout. The targeted test fails
before this correction at 6× CPU slowdown and passes afterward at 6× and
20× slowdown.

This repairs the newer Linux diagnostic added to #4233. The original
macOS diagnostic, where the card had not risen to the boundary after two
animation frames, remains unresolved; this change leaves that wait and
the upward-movement assertion intact.

Refs #4233 — automated triage

Co-authored-by: leaf-agent <[email protected]>
leaf-agent added a commit that referenced this pull request Oct 28, 2026
The side-comment growth tests still used the floating panel's top as the
margin's bottom boundary after #4555 allowed surfaces beside the panel
to reach the window foot. This left the fixtures short of the actual
growth boundary: the six-line draft stopped at 879px against an expected
834px, and the animation test grew downward while expecting its top to
rise.

Position the low passage relative to the window foot and read the
available room across the composer's columns with
`shownWindow({across})`. Both tests retain their growth, scrolling, and
animation assertions. This changes only the tests and preserves #4555's
placement behavior.

Both focused tests reproduce their reported failures before correction
and pass afterward at normal speed. `git diff --check` passes.

Closes #4568
Closes #4569

---------

Co-authored-by: leaf-agent <[email protected]>
leaf-agent added a commit that referenced this pull request Oct 29, 2026
Match the column-aware boundary introduced by #4555. Native insertion can scroll the source, so shrink checks retain attachment distance rather than an obsolete viewport coordinate. Sending retains its control position subject to the visible window head, preserving the full wrap, tall draft, shrink, send and answer journey without changing product behavior.
leaf-agent added a commit that referenced this pull request Oct 29, 2026
The margin reply journey measured Send while its box was still moving
after wrapping. Wait for the card's finite animations before measuring
the completed wrap, retaining the per-input checks and the 30px growth
assertion.

The complete journey also contained stale geometry expectations. Read
the window boundary across the card's own columns, matching #4555's
margin space beside the floating panel. Compare a shrinking card with
its source after native insertion scrolls the page. After sending,
require the reply control to keep its pressed position subject to the
window's top boundary: the newly sent turn can need more room above that
control than the window provides. All caret, send, and arriving-answer
checks remain exercised. No product behavior changes.

Verification: the previous head's CI failed at the tall-card boundary
(892px versus 834px); correcting the probe exposed and reproduced the
shrink and constrained-send expectations locally. The full journey now
passes on Linux at normal speed and with Chromium slowed sixfold. Eight
related cases covering the probe's consumers, draft growth, paste, and
send/admission passed; Ruff and formatting checks passed. macOS
verification remains for CI.

Refs #4472 — 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