Skip to content

fix: Keep a margin card's turns still when a growing draft caps a top-held card - #7617

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-7511
Nov 29, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-7511

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

In a margin card below its words, the keystroke that brought the card's foot to the window's moved the first message and the reply up by 5 to 15px. The card's grid gives the transcript and reply rows equal shares of whatever the cap takes away, so once the cap could no longer give the transcript its full height, both rows shrank. While the user writes in a card that keeps its top, measureThreadCard now holds the transcript's height as a min-height. That hold sits beside the existing max-height share that a card keeping its reply box's top uses. Lines the draft gains then come out of the reply, whose field scrolls, and the turns stay where they stood. The held height never exceeds what the cap leaves after the reply's own minimum, so a shrinking window can't push the reply out of the card. It clears on the next fit once the user stops writing: after Send, an emptied draft or a change of side. The module header now says that a card keeping its top is the exception to the transcript yielding writing room. A card over its words still yields, and its test is unchanged.

test_a_growing_draft_under_its_words_holds_the_editor_s_top now runs at 540, 550, 600 and 628px windows, without the strict xfail it had at 600. The 540, 550 and 600 cases fail on main (the first turn moves 17, 7 and 7px) and pass with this change. These also pass: the draft, editor and Send tests in test_card_reply.py (21), a selection of card growth and fit tests under tests/browser/margin (28), pnpm run test:runtime, and the browser type check.

Closes #7511 — automated triage

…-held card

While the user writes in a margin card that keeps its top, the card's
transcript now holds its height as a minimum, so the line the draft gains
comes out of the reply, whose field scrolls, instead of the grid sharing
the shortfall between both rows and moving the turns on the capping
keystroke. The minimum yields to the reply's own minimum and clears once
the user stops writing.

test_a_growing_draft_under_its_words_holds_the_editor_s_top now runs at
540, 550, 600 and 628px windows without the xfail; 540 to 600 fail on the
old code.

Closes #7511
@leaf-agent
leaf-agent merged commit ae2b6ce into main Nov 29, 2026
8 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-7511 branch November 29, 2026 10:01
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.

Margin card under its words moves its first message when a growing draft caps it in a short window

1 participant