Repository navigation
Grow a typed-in comment box inside the window instead of scrolling the page - #1784
Merged
Merged
Conversation
…e page Typing in a floating comment box scrolled the page whenever the box stood under or over its passage and grew past the room shown on that side. On every content change, `floating-response.js` asked `makeRoom` to scroll the reading region until the whole box fit clear of the passage. A stack-logged probe at 900x700 measured it. With the box over its passage at mid-window, the first keystroke scrolled the page 162px. With the box under a passage near the top, the page scrolled 55px once the box reached the window's foot. The user's rule is that the box moves and the page stays. The comment box now takes the height Floating UI's size middleware gives it, the whole boundary, and growth never spends scroll travel. It grows from the edge that holds it. Once the window stops that edge, shift slides it over its passage, and once it fills the window it scrolls its own words. This is what a box beside its passage already did at the window's foot. Only a thread card opening under or over its target still scrolls to make room. The margin card's reply never scrolled the page while typing; the same probe confirmed that at both widths. Letting the box fill the window exposed a 2px mismatch at Send. The box reserved 2px less beneath its words than the card's reply row takes, so a card capped at the window's height shrank its transcript and shifted the sent words up 2px (`test_send_grows_thread_around_the_words` at 900x600). One token, `--lf-comment-reply-row`, now sizes both. Behavior changes the tests now protect: - `test_typing_moves_the_comment_box_and_leaves_the_page_still` (new) types line by line into a box under and over its passage and checks that the page never scrolls and the box stays in the window. Both cases fail on main. - `test_a_growing_text_comment_keeps_its_side_and_the_page_still` (was `..._keeps_its_passage_clear_without_changing_sides`) and `test_a_text_comment_chooses_above_when_the_page_has_more_room_there` asserted that typing scrolled the page and kept the passage clear. They now assert that the page stays put, and that a later scroll carries the grown box with its passage. The assets AGENTS.md "Stability" section now says a floating box grows inside the window and never scrolls the page for its growth. A field in flow, which cannot move apart from the page, still keeps its controls in view. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
previously approved these changes
Oct 5, 2026
Its pane cases relied on typing scrolling the pane to make room under the passage, which this branch removes; with six sentences the box slid over the passage and stood away from the spot the test expects. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
previously approved these changes
Oct 5, 2026
# Conflicts: # skills/leaf/packages/default/runtime/annotation-overlay/composing/floating-response.js
leaf-agent
previously approved these changes
Oct 5, 2026
This was referenced Oct 6, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 6, 2026
The phone banner change in #1900 moved Queue behind More and moved a passing notice from the foot to the banner's status words. Two nightly navigation tests still tapped the hidden footer Queue count and expected the hidden footer notice, so [main's CI run](https://github.com/max-sixty/leaf/actions/runs/37491468420) failed. These tests now follow the phone's visible controls and verify the notice in its visible seat. Both updated tests pass locally, and this PR's test, lint, and review checks are green after the test job's second attempt. The run's third failure, the growing comment box covering its passage, reproduces on this PR's base. Open PR #1784 owns the comment placement behavior and changes that same failing test, so this PR leaves that separate fix there. The [first test attempt](https://github.com/max-sixty/leaf/actions/runs/37507759534/attempts/1) failed in an unrelated scroll fallback test when the browser stability watcher saw a comment box move 30px after a wheel scroll. Main has since merged #1919, which changes the watcher and adds fault controls for that scroll attachment. All three versions of that test pass locally on the new main head. The successful second CI attempt ran on this PR's original head, before #1919 joined main. Co-authored-by: leaf-agent <[email protected]>
leaf-agent
added a commit
that referenced
this pull request
Oct 6, 2026
Opening held thread news now releases that thread in every live view. The panel notice previously released only its own seat, leaving an inline copy of an edited agent message at its old text. This fixes the browser regression exposed by the shared-view assertion added in #1824. The [failed main run](https://github.com/max-sixty/leaf/actions/runs/37521493366) reported five browser failures. The two phone failures were addressed by #1923, and the hidden-tab test passes on current main. The growing comment-box failure still reproduces on main and is covered by the open #1784; this PR changes only the message-edit failure. Verification: the message-edit test failed before this change and passes after it on the current main base; two adjacent held-news cases and all 225 runtime tests also pass. The PR retains the existing local release for newly arriving threads beside the clicked notice. Co-authored-by: leaf-agent <[email protected]>
leaf-agent
added a commit
that referenced
this pull request
Oct 7, 2026
The held-reply Tab test in [the failed main run](https://github.com/max-sixty/leaf/actions/runs/37536533741) expects focus to jump from the reopened thread title straight to Resolve. The current thread presents its first Add reaction control before Resolve. This updates the existing test to check that first keyboard stop, including that the delayed presentation does not steal focus and Shift+Tab/Tab returns to it. The targeted case failed before this change and passes afterward: `uv run pytest -q -n 0 'tests/test_render_threads.py::test_walking_to_a_thread_shows_the_replies_it_held[3-Tab-back]'`. The separate floating-composer failure is covered by the maintainer's open #1784, which changes that test and its behavior. Co-authored-by: leaf-agent <[email protected]>
# Conflicts: # skills/leaf/packages/default/runtime/annotation-overlay/composing/floating-response.js # tests/test_render_aim.py # tests/test_render_send_placement.py
leaf-agent
reviewed
Oct 9, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The comment box is still capped at the room on its chosen side, so it cannot grow across its passage as this PR intends.
Main's #1890 holds a landed comment box by its edge as it grows, so Floating UI's size gives only the room from that edge to the window. With the page no longer scrolled to make room, a box under or over its passage stopped at the window's edge instead of sliding. The box's height now reaches the whole boundary on every side, as it already did beside its passage, and shift slides it inside the window. test_where_a_comment_stands_before_and_after_send's phone case no longer requires the box to overlap its block only when the two cannot show together; it requires the box to stand at the window's edge. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 9, 2026
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.
Typing in a floating comment box scrolled the page whenever the box stood
under or over its passage and grew past the room shown on that side. On
every content change,
floating-response.jsaskedmakeRoomto scrollthe reading region until the whole box fit clear of the passage. A
stack-logged probe at 900x700 measured it. With the box over its passage
at mid-window, the first keystroke scrolled the page 162px. With the box
under a passage near the top, the page scrolled 55px once the box reached
the window's foot. The user's rule is that the box moves and the page
stays.
The comment box's height may now reach the whole boundary on every side,
as it already could beside its passage, and growth never spends scroll
travel. It grows from the edge that holds it (#1890 holds a landed box by
that edge). Once the window stops that edge, shift
slides it over its passage, and once it fills the window it scrolls its
own words. This is what a box beside its passage already did at the
window's foot. Only a thread card opening under or over its target still
scrolls to make room. The margin card's reply never scrolled the page
while typing; the same probe confirmed that at both widths.
Letting the box fill the window exposed a 2px mismatch at Send. The box
reserved 2px less beneath its words than the card's reply row takes, so a
card capped at the window's height shrank its transcript and shifted the
sent words up 2px (
test_send_grows_thread_around_the_wordsat 900x600).One token,
--lf-comment-reply-row, now sizes both.Behavior changes the tests now protect:
test_typing_moves_the_comment_box_and_leaves_the_page_still(new)types line by line into a box under and over its passage and checks
that the page never scrolls and the box stays in the window. Both cases
fail on main.
test_a_growing_text_comment_keeps_its_side_and_the_page_still(was..._keeps_its_passage_clear_without_changing_sides) andtest_a_text_comment_chooses_above_when_the_page_has_more_room_thereasserted that typing scrolled the page and kept the passage clear. They
now assert that the page stays put, and that a later scroll carries the
grown box with its passage.
test_a_wheel_return_attaches_the_comment_box_in_the_first_visible_frametypes a shorter draft. In its pane cases, typing used to scroll the pane
to make room under the passage, and the test expected the box there.
test_where_a_comment_stands_before_and_after_send's phone caserequired the box to overlap its block only when the two couldn't show
together, which only held while typing scrolled the page. It now
requires a box that overlaps to stand at the window's edge.
The assets AGENTS.md "Stability" section now says a floating box grows
inside the window and never scrolls the page for its growth. A field in
flow, which cannot move apart from the page, still keeps its controls in
view.
Add-on F: one shared reading of where the user works
The design review proposed one reading of the user's working point, shared
by the card's held edge (
holding, fed bydraftinginmargin-projection.js), the place keeper (recentPlaceInputinuser-place.js) and typing growth. This change doesn't add it. I sortedthe place- and landing-hold repairs since 2026-09-23 by the question each
answered:
Give the comment surfaces' held-edge policy one owner #1771. Keep the margin reply field in place as a turn joins #1552 and Keep the next answer below a sent margin reply #1574 fixed how the hold was keyed across a second
placement pass and across Send's admission, not which point the user
works at.
Land a walked-to thread on its latest message #1715, Keep focused thread title visible after panel resize #1735.
Keep the reading position when opening Comment #1571, Preserve reading position across focus, repaint, and deferred work #1602, Preserve reader state through edits and refreshes #1624, Keep sent margin replies visible through card fitting #1626, Give growing replies room before scrolling their text #1645.
None of these commits names a case where
draftingandrecentPlaceInputdisagreed, so a shared reading wouldn't have preventedthem. The two readings also differ by design.
draftingcounts words leftin the reply and a send still in flight, both of which outlast focus and
the pointer. The place keeper deliberately follows whichever of pointer
and focus came last. Their outputs differ in kind too: one is an edge of a
floating surface, the other a node in a scroller's list. The typing scroll
was a question of which thing moves, so it needed no working-point reading.
One rule does repeat: a focused control counts as the user's place only
while it is on screen.
holdBox(reply-landing.js), the place keeper's"begins in the band" filter, and #1735's resize landing each state it. It
is a candidate for a shared predicate, but not the primitive F described.
Overlap with work in other worktrees
leaf.shift-a-thread-jitterhas uncommitted changes tocomment-placement.js,floating.jsandfloating-response.js, based on#1705. Its
floating-response.jshunk is small. Itscomment-placement.jsheader rewrite overlaps the paragraph this change rewrites, so expect a
textual conflict there.
leaf.thread-card-margin-avoidanceis mid-merge incomment-placement.jsandmargin-projection.js. Neither touchesmakeRoom's call fromfloating-response.jsor the frame tokens.