Repository navigation
Hold a margin card by the edge it is attached by, and by its foot while the user types in it - #5537
Merged
Merged
Conversation
…le the user types in it A margin card now holds, as it grows, the edge it is attached by: its foot above its passage, and its top beside or below it, rising beside it when it outgrows the room below. While a text field in the card has focus where the user is, a card beside its passage holds its foot instead, so the line being typed stays still as the conversation grows above it and a send rises as one piece; below its passage it keeps its top even then, so it never grows up over the words it is about. The user chose this on 5 November 2026 as the platform's rule: CSS scroll anchoring prefers a focused text field or the find match as the node it keeps still, and never a pressed control. Nothing else chooses the edge, so `thread/card-anchor.js`, which remembered each press and send, goes, and `heldEdge` in `annotation-overlay/thread-preview.js` reads the edge from where the user is (`focusPlace`) and whether that is a text field (`typesText`). News at the thread's end shows at once where the held edge keeps still what the user is on, and waits behind the card's notice otherwise (`endNewsMoves`): a card held by its foot waits unless the user is in its reply row, and a card held by its top waits only while the user writes a reply there (`replyIsEditing`), so under its passage the answer to a send, or to a card a click opened, still shows at once. The card declares `data-lf-rises` while its growth lifts its head, as the floating panel's thread view does, so the shift watch credits that growth. `thread-preview.js`'s header records the decision and its two rejected alternatives: keeping a pressed control under the pointer, and the attached edge with no exception for typing, under which a send pushed the reply box down 22px. `browser/AGENTS.md` states the press rule for every box: a pressed control between the edge its box holds and what the press changed stays where it was, and one past the change moves with it. Behavior changed (measured with `leaf-dev probe` at 1440×900 beside the passage and 1200×900 under it, the same in Chromium and Firefox, against `origin/main`): - A press that grows a card no longer keeps the pressed control still: opening "Show 2 progress messages" in a card beside its passage moves the disclosure down 160px, where the card's top used to rise 160px. - While the caret is in the reply box of a card beside its passage, whether the user typed there or a click's opening or a send left it, the card holds its foot. An answer arriving while they type shows at once and lifts the card's head 185px with the reply box still, where it used to wait behind "1 new reply". An answer after a send lifts the head 129px and the transcript scrolls the rest, where the reply box used to move down 185px. - A card beside its passage near the window's head, held by its foot, stands between the window's head and the reply's foot once it outgrows that room, and its transcript scrolls, though room shows below it. After a comment and a reply of five lines each, the card stands from 8px to 377px with 101px of its transcript scrolled away, where it used to grow down to 503px and scroll none. - With a draft in the box and focus on a message, an answer shows at once and moves the reply box down 185px; it used to wait behind the notice. - Above its passage, news at the thread's end shows at once while the user is in the reply box, the card rising from it; it used to wait. - Below its passage, a send moves the reply row down 80px by the sent turn and keeps the card's top, where the card used to keep the reply's foot and grow up 80px over the passage. An answer while the user types there still waits, and one after a send still moves the reply box down. - The `plan-card-held-news` and `plan-card-held-step` stills states open at 1200×900, where the card stands under its passage and still holds news while the user drafts. Tests: `tests/runtime/card-anchor.test.mjs` goes with the module it tested, and the journey test that a press keeps the pressed spot still goes with that behavior. The two tests of when a card's news waits are rewritten to the new rule (`test_news_at_a_card_s_end_shows_where_its_held_edge_keeps_the_reply_still`, beside and under the passage, and `test_news_under_a_card_s_words_waits_once_the_user_begins_in_the_box_a_send_left`). The test of a card crossing the window's foot as its held edge changes now crosses it by a press on its progress, since a line typed beside the passage no longer crosses it (`test_a_press_that_changes_the_edge_holding_a_card_moves_it_from_where_it_stood`). Others take the new edges: in `test_card_reply.py` the send, stream, draft-above and rail-move tests, and the reader and scroll-resize tests, which now stand the user on the thread; in `test_card_placement.py` the held-news head test and the above-the-passage test, which also checks that the shift watch credits the card's declared rise; and in `threads/test_composing.py` the spacing test, which now scrolls the transcript with the wheel, as a script's scroll left the send's landing hold in force. Each rewritten test fails under an anchored flip of what it protects (no declared rise; foot-held news always waiting or always showing; top-held news waiting for the caret alone or never; no typing exception; a typing exception under the passage; no rise beside; a card that holds no news; a placement read as the page carrying the card) and passes with the flip undone. Runtime `browser/runtime`: +160 −308 (net −148); tests: +257 −488 (net −231). > _This was written by Claude Code on behalf of max-sixty_
leaf-agent
approved these changes
Nov 5, 2026
This was referenced Nov 7, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 7, 2026
…ol (#5670) Since #5537, a card beside its passage holds its foot while the user types in it, so a send rises as one piece. That leaves the pointer from the Send click resting on the new message's Copy control: the message is `:hover`, Copy is `:hover`, and its hover face paints paper over that spot. `test_sending_flashes_only_the_new_message[card]` sampled the head two pixels from its right edge, which is now inside Copy, so it read `(244, 241, 232)` (paper) against the body's `(255, 248, 197)` (the flash's yellow). The flash itself is unchanged: it still covers the whole new message, head included, and nothing else. The test now samples the head's ground 12px before its controls, still clear of the words, and compares it with the body as before. #5537's intended behavior and the interface both stay as they are; only the sample point moved. Verification: on `a9db65439` (main) the `[card]` case fails with the assertion above. With this change all three parametrizations of the test pass locally. Closes #5649 — automated triage Co-authored-by: leaf-agent <[email protected]>
This was referenced Nov 7, 2026
Closed
leaf-agent
added a commit
that referenced
this pull request
Nov 7, 2026
…#5551, #5552 and #5566 chose (#5685) Ten of #5658's nightly journey cases still expected behavior that a recent change replaced on purpose. This PR updates those tests to what each change intended. One example page also changes: the feature gallery had lost a face that the server would draw. Each case was bisected locally to the first commit where it fails and checked against that commit's parent, which passes. Each fails on main `02a1e05cb` and passes on this branch. | Case | Since | What changed | | --- | --- | --- | | `test_render_widgets.py::test_notification_configuration_becomes_a_commentable_local_artifact` | #5508 | Every playground choice now has its own id. The receipt's comment anchors on the Banner choice that holds it (`format-banner`), not on `notification-simulator`. | | `test_render_gate.py::test_every_table_the_theme_sets_honestly_passes_the_gate` | #5566 | The fixture's available `<figure>` holds a question whose words start at the figure's edge, and #5566's new `words-off-column` advice flags exactly that. The journey checks tables, so it now leaves that question out. The browser test that measures the question's table inside the figure keeps it. | | `test_render_margin.py::test_margin_card_holds_its_top_as_a_turn_arrives_and_as_a_reply_wraps` | #5537 | Beside its passage, a card now holds its reply's foot while the user writes in it. The test now steps onto the thread with Escape before reading, as #5537's own tests do. It checks that each wrap, a long draft and the answer after a send grow the card upward. It is renamed `…holds_its_top_while_read_and_its_reply_while_written`. | | `test_thread_response_continuity.py::…keep_the_first_line[margin-delete-desktop]` | #5537 | Same rule: Backspace in a margin card's reply keeps the reply's foot still, so the margin case reads the foot. The seat cases are unchanged. | | `navigation/test_key_surfaces.py::test_user_news_interrupts_and_then_restores_background_news` | #5448 | The panel's key now stands with Comment after the field's words, so a notice reads `Agent replied — open Threads · Comment… c`. | | `test_page_holds_still.py::…[message-reply-below-chromium]`, `[…-firefox]` | #5551 | A thread's reply box under the floating panel now counts as unseen. A clicked message therefore stays still as an answer joins below it, the strict xfail passed, and its entries leave `MOVES_ON_MAIN`. | | `test_render_navigation.py::test_the_feature_gallery_exercises_its_core_journeys` | #5552 | `progressFace` reads a workflow's `at_work`, which the server stamps on every served workflow. The gallery's margin atlas builds its sample workflows from a stage alone, so its Working samples had lost the working face. The sample now carries `at_work` as the server would stamp it (`examples/developer/feature-gallery.page/widgets/lf-margin-entry-gallery.js`). | The other #5658 cases are handled elsewhere. #5684 (merged) fixed the fixture-resource case. A separate PR widens `--wide` for #5611's diff gutter. The `message-edit-above` cases of `test_page_holds_still.py` come from a runtime regression in #5551, which has its own cause issue. Refs #5658 — automated triage --------- Co-authored-by: leaf-agent <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Nov 25, 2026
…ling the page (#7082) A thread card beside its words now keeps the top of its reply box still while you write in it, where it kept its foot. The words you type grow the card down, and an answer arriving still grows it up, so neither moves the line the draft starts on or the turn it answers. Under the foot hold (#5537), each line a draft gained lifted the card's head and every turn, and a card at the window's head, standing there or waiting there beside a section scrolled part out of the window, scrolled the turn being answered out of its transcript while room showed below. The placement states that as one rule: a surface names the line it keeps still (`keeps`: its top, its foot, or a line of its own a stated distance above its foot), and `heldTop` in `comment-placement.js` stands it by one formula where each edge had its own. What stands over the line grows the surface up and what stands under it grows it down. It also stops a send from scrolling the page. On main, with a six-line draft and the card's head 45 px under the window's, Enter scrolled the page 178 px: the send's landing read the card after its new turn was laid out and before its placement stood it. A floating surface whose size has changed since its placement stood it is now judged when that placement lands. A card keeping its reply box's top is capped by a height that counts the reply box, so the cap changes as the draft does. A transcript that scrolls therefore carries its own share of that cap. Without it, the layout that took a line from the draft gave the line to the transcript before the placement lowered the cap, and in Firefox and WebKit that left the reader a line short of the transcript's end, with the next answer under the reply box. The third browser test below runs in Firefox for this, with the reader at the transcript's end. **To weigh:** the card's header records that on 5 November the maintainer chose its rule as the platform's, scroll anchoring keeping a focused text field still, and #5537 carried that out by holding the card's foot. This holds the top of the reply box instead, after his questions on 24 November about a card that kept its foot as he typed and about a canonical rule for it, and he chose to merge it on 25 November. The line being typed, and Send under it, now move down a line with each wrap, where they stayed at one height. Four catalogue states draw the card lower for the same reason: `plan-card-reply`, `plan-card-reply-long`, `plan-card-reply-photo` and `plan-card-reply-error`. **Tests:** a unit test stands a surface by its own line through a draft's lines, a turn joining, the window's head holding it in, and a card that fills its room. Three browser tests type a wrapping reply beside a section taller than the window: with the card at its own spot and a send after it, with the card waiting at the window's head, and in a card an answer has filled to the window's head, where a line and a picture come and go. Each fails on main at the first wrap, and with the fix it protects removed. Three tests that stated the foot hold take the new line. Runtime code: 118 lines added and 67 removed, comments aside. > _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 margin card now holds, as it grows, the edge it is attached by: its foot above its passage, and its top beside or below it, rising beside it when it outgrows the room below. While a text field in the card has focus where the user is, a card beside its passage holds its foot instead, so the line being typed stays still as the conversation grows above it and a send rises as one piece; below its passage it keeps its top even then, so it never grows up over the words it is about. The user chose this on 5 November 2026 as the platform's rule: CSS scroll anchoring prefers a focused text field or the find match as the node it keeps still, and never a pressed control. Nothing else chooses the edge, so
thread/card-anchor.js, which remembered each press and send, goes, andheldEdgeinannotation-overlay/thread-preview.jsreads the edge from where the user is (focusPlace) and whether that is a text field (typesText). News at the thread's end shows at once where the held edge keeps still what the user is on, and waits behind the card's notice otherwise (endNewsMoves): a card held by its foot waits unless the user is in its reply row, and a card held by its top waits only while the user writes a reply there (replyIsEditing), so under its passage the answer to a send, or to a card a click opened, still shows at once. The card declaresdata-lf-riseswhile its growth lifts its head, as the floating panel's thread view does, so the shift watch credits that growth.thread-preview.js's header records the decision and its two rejected alternatives: keeping a pressed control under the pointer, and the attached edge with no exception for typing, under which a send pushed the reply box down 22px.browser/AGENTS.mdstates the press rule for every box: a pressed control between the edge its box holds and what the press changed stays where it was, and one past the change moves with it.Behavior changed (measured with
leaf-dev probeat 1440×900 beside the passage and 1200×900 under it, the same in Chromium and Firefox, againstorigin/main):plan-card-held-newsandplan-card-held-stepstills states open at 1200×900, where the card stands under its passage and still holds news while the user drafts.Tests:
tests/runtime/card-anchor.test.mjsgoes with the module it tested, and the journey test that a press keeps the pressed spot still goes with that behavior. The two tests of when a card's news waits are rewritten to the new rule (test_news_at_a_card_s_end_shows_where_its_held_edge_keeps_the_reply_still, beside and under the passage, andtest_news_under_a_card_s_words_waits_once_the_user_begins_in_the_box_a_send_left). The test of a card crossing the window's foot as its held edge changes now crosses it by a press on its progress, since a line typed beside the passage no longer crosses it (test_a_press_that_changes_the_edge_holding_a_card_moves_it_from_where_it_stood). Others take the new edges: intest_card_reply.pythe send, stream, draft-above and rail-move tests, and the reader and scroll-resize tests, which now stand the user on the thread; intest_card_placement.pythe held-news head test and the above-the-passage test, which also checks that the shift watch credits the card's declared rise; and inthreads/test_composing.pythe spacing test, which now scrolls the transcript with the wheel, as a script's scroll left the send's landing hold in force. Each rewritten test fails under an anchored flip of what it protects (no declared rise; foot-held news always waiting or always showing; top-held news waiting for the caret alone or never; no typing exception; a typing exception under the passage; no rise beside; a card that holds no news; a placement read as the page carrying the card) and passes with the flip undone. Runtimebrowser/runtime: +160 −308 (net −148); tests: +257 −488 (net −231).