Repository navigation
Stand the panel's ✕ for search, Draw mode and the picker beside its field - #4851
Merged
Merged
Conversation
The Leaf panel's row ends in one seat that the On me mark and a stance's way out (Close search, Exit Draw mode, Close picker) take in turn. The seat was as wide as On me with room for a two-digit count (50px at rest), and the ✕ filled it with its glyph at the far end, so a focused field stood 29px clear of its ✕. Each now takes its own width: On me keeps its count's room, so a count arriving still moves nothing, and the way out takes a mark's width (32px, the leaf's), so the ✕ stands as close to the field as the leaf does at the row's start. The field gains 18px while a stance stands. Behaviour changed: entering or leaving a stance changes the field's width by On me's count room. The field's contents change at those moments anyway (search takes the field; a stance names itself there), and a draft held through a stance's end rewraps by that much. `test_a_mode_entered_from_the_panel_offers_its_way_out_in_the_row` now holds the ✕ to the mark's end and to the leaf's distance from the field, where it held the ✕ to the mark's whole box. Checked in Firefox with `leaf-dev probe` against main, light and dark: search 441.6 → 460px field, Draw mode likewise; the On me mark at rest and a thread view's Resolve and Close (#4622) are unchanged.
Max asked on the panel's thread view whether ✓ and ✕ should move to the top, as a thread card has them. The answer follows from "The page holds still under the user's aim", but browser/AGENTS.md never drew the placement consequence, so the question had to be settled by measuring a resolve walk. The new Stability bullet says it once: the floating panel rests on the window's foot and grows upward, so a view's controls stand at its foot; a thread card can move, so a press chooses the edge it holds (CardAnchor.prepare) and its controls can stand at its head. The same control may therefore stand in different places on the two boxes. No behaviour changes.
leaf-agent
previously approved these changes
Oct 31, 2026
…laces The panel holds its row's last seat for a draft until the user's next posture change (`seatHeld`), so a stance that ends while a draft stands, as Done on a to-do or leaving Draw mode does, gives the draft's words no more room. The hold kept the field's width because the ✕ and the On me mark were one width. The previous commit narrowed the ✕ to the leaf's 32px, so the held seat grew 18px as the mark came back and the draft rewrapped. In Firefox, a draft through Done on a to-do went from a 460px field to 441.6px; on main it stays at 441.6px. While the field holds a draft, the ✕ now keeps the count's room, at the seat's end, so the field stands at main's width through the stance. Without a draft, the ✕ keeps the leaf's width. seatHeld's comment named a refused send closing a view as its case. That close is a posture change (`transition`), so the hold never applies there; the comment now names the stance case it serves. The Draw mode test now also enters the mode with a draft and holds the ✕ to the mark's box and the field's box through the ✕.
leaf-agent
reviewed
Oct 31, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The added browser guidance needs one ownership correction; the inline suggestion keeps the shared rule and leaves each component’s implementation in its module header.
…'s header The PR reviewer noted that the bullet's sentences on the floating panel and CardAnchor.prepare described how those modules work, a second copy of their headers. The bullet now states the shared rule and names the headers that say which edge each box holds.
… types 25c518d gave a stance's ✕ On me's 50px while the field held a draft, so the seat held for the draft after the stance ended (`seatHeld`) kept the field's width. But `drafted` turns on at the first keystroke, so typing into an empty field in Draw mode, the picker or Capture region widened the ✕ under that keystroke: in Firefox the field's box and Send moved 18.4px left (field 950 → 931.6), which the stance's ✕ at the leaf's width had never done. The hold itself saved no rewrap. A draft standing when a stance arrives already rewraps as the ✕ takes the seat (984 → 931.6 on main); the hold only kept On me beside the draft, at the narrower width, until some later posture change. So the seat now follows the stance alone: its ✕ stands, at the leaf's width, while the stance does, and once it ends a draft's Send takes the corner as at rest. A draft standing through a stance rewraps as the stance comes and as it goes, a rare path the user reads at a glance (browser/AGENTS.md, "Stability is owed to the common path"). The Draw mode test drops 25c518d's check that the ✕ takes On me's box with a draft and that the field keeps its box through the ✕, the behaviour this removes, and checks instead that typing in the mode moves neither the field nor its ✕; that check fails on 25c518d.
leaf-agent
previously approved these changes
Oct 31, 2026
leaf-agent
approved these changes
Oct 31, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 31, 2026
#4851 cited "Stability is owed to the common path", which this branch folded into "The page holds still under the user's aim".
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.
The Leaf panel's row ends in one slot that the On me mark and a mode's ✕ (Close search, Exit Draw mode, Close picker, and the other modes entered from the panel) take in turn. The slot was as wide as On me with room for a two-digit count (50px), and the ✕ sat at its far end, so a focused search field stood 29px clear of its ✕. Max questioned that gap on 31 October. #4622 already moved a thread view's Close beside Resolve; this covers the modes that still put their ✕ in that slot.
Each occupant now takes its own width. On me keeps its count's room, so a count arriving still moves nothing beside it. The ✕ takes the leaf's width (32px), so it stands as far from the field as the leaf does at the row's start, and the field's box ends 10px from it. The field gains 18px while a mode is active, at a moment the field's contents change anyway, and typing in the mode moves neither the field nor its ✕.
The slot now follows the mode alone: its ✕ stands while the mode does, and once the mode ends a draft's Send takes the corner as it does at rest. That removes
seatHeld, which held the slot for a draft until the user's next posture change. It saved no rewrap, since a mode's arrival already rewraps a standing draft (984 → 931.6px on main), and only kept On me beside the draft at the narrower width; its comment named a refused send closing a view, a case it never reached. A draft standing through a mode rewraps as the mode comes and as it goes, a rare path (browser/AGENTS.md, "Stability is owed to the common path").test_a_mode_entered_from_the_panel_offers_its_way_out_in_the_rownow holds the ✕ to the On me mark's right edge and to the leaf's distance from the field, where it held the ✕ to the mark's whole box, and checks that typing in Draw mode moves neither the field nor its ✕. Checked in Firefox withleaf-dev probeagainst main, light and dark. The On me mark at rest and a thread view's Resolve and Close are unchanged.Max also asked whether the panel's ✓ and ✕ should move to its top, where a thread card has them. They stay at its foot: the panel rests on the window's foot and grows upward, and over three Resolves in a row, ✓ held one spot while the panel's top edge moved 429px.
browser/AGENTS.md("Stability") now states the rule: a box's controls stand on an edge the box holds as its content changes. For the panel that is its foot; a thread card holds whichever edge keeps a pressed control still (CardAnchor.prepare), so its controls can stand at its head.