Repository navigation
Stand an open panel card's reply box at the list's foot - #1480
Merged
Merged
Conversation
An open Threads-panel card now fills the list's landing band. Under its title the thread is a column with the free room between the last message and the reply box, so the box stands at the list's foot and later cards wait below the fold. Where the card runs past the fold, the box pins there (sticky, the margin card's mechanism) over the list's foot padding. A reply grows the thread above the box: into the free room first, then past it with the list following, so the newest words end at the box's top. Neither the box nor the caret in it moves for news; before, a reply carried the box down by as much as the reply's height. - thread-list.js: following keeps the card's end and brings the newest words out from under a pinned box. - reply-landing.js: a pinned row's keystroke growth is paid for only where it covers words, measured from the row's height, so growth into the free room scrolls nothing and a scroll or reply between keys is never undone. - landing.js: a direct arrival at a long thread with a pinned row aims at the thread's end, starting on a clean content block. - chrome-layout.js writes the live status's reservation as one custom property that the list's foot padding, its landing inset and the pinned box all read, so a notice over a covering panel does not move the box. - folding.js folds the card's min-height with its height; a folding card hides its reply box instead of letting it ride the fold's edge. - The list pads its content by the ring room, as it lands, so a filling card fits the band exactly. Tests: the free-room follow test is replaced by one that delivers replies past Chrome's 500ms recent-input window and asserts the box, field and caret stand still, across a card alone, below and above other cards, and scrolled. Tests whose arrangement assumed short open cards now scroll to the card, wait for the disclosure hold, or search the full scroll range; the Send assertion moved from "moves down as the field grows" to "stays at the field's foot"; the walk-status test checks the walked title, not the whole card, against the status. The ring checker now treats a z-indexed grid item as a stacking context. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ne's width Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # dev/leaf_dev/stills.py
A shrink under a scroll clamp moved the words the row had not covered. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
reviewed
Sep 30, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The new long-thread regression case is red on this head. Both scrolled and scrolled-below-cards fail at now["box"] == pytest.approx(standing["box"], abs=0.5) after an arriving reply: the box moves from 829.296875px to 830.171875px (0.875px). The test's own comment expects scroll rounding, but the asserted limit is below the movement this layout produces. Please reconcile the layout and the intended movement bound so the claimed long-thread path passes.
A scroller that keeps only whole pixels truncated the fractional follow, leaving the reply box up to a pixel below where it stood on Linux. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…margin rule by class A fractional scroll write landed short in CI's Chrome, leaving the reply box 0.875px lower after a follow. The column's margin reset named every child, which test_no_has_rule_restyles_the_whole_document refuses. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Rounding the follow's target changed nothing in CI: the box still landed 0.875px lower after a long reply, with every scroll offset whole. The list scrolls by whole pixels and a reply's height need not be one, so the test holds the box, field and caret within a pixel. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Sep 30, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 1, 2026
Since #999 the list always shows one thread open, and since #1480 that card fills the list, so the list's own focus ring outlined the card while its keys answered for the whole panel: `c` wrote in the page box, and Escape, `r`, Enter and the shading treated the stop as no thread at all. Focus given to the list now goes on to its open thread's title, whatever gave it (`g T`, Escape from the general box, Tab, a fold). The list holds focus itself only while it shows no thread. A panel thread has no let-go floor of its own any more: Escape from it is the panel's rungs, which clear narrowing and then close. This replaces the previous commit's reading of the list as standing for its card, which only `c` and `e` shared. Behavior that moved: `g T` lands on the open thread's title, so `c` replies and `r` resolves from there; Escape from a reply box takes two presses to close the panel rather than three; Escape from the general box lands on the open thread. The keyboard contract's two-level Threads selection and its TODO about page `t` exiting through whole-panel selection are gone. `test_the_threads_list_hands_focus_to_the_thread_it_shows_open` replaces the list-route test. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 1, 2026
…eadEnd's comment (#1525) #1480 made the open card in the Threads panel fill a list too short to scroll, with its reply box at the list's foot. That settles both news-driven shifts left over from #1466, which showed only with the CPU slowed 20x: - A reply arriving in the open thread takes the free room above its reply box, so the box no longer drops 32px. - A resolved thread returning above the open card makes the list scrollable, and the place hold scrolls the newcomer out of view rather than pushing the card being read down 46px (measured: list scrollTop 46, the read card at the list's top). `test_a_website_turn_posts_its_answer_when_the_move_is_settled_first` passed 4 of 4 runs per case at 20x on main. Since #1494 the shift watch judges news right after a press as without input, so that test now guards both cases at CI speed too. This TODO entry records why it is the best tradeoff rather than a perfect one, and what was rejected. `followThreadEnd`'s comment still said a short list's end grows into the room below, which #1480 made untrue. > _This was written by Claude Code on behalf of max-sixty_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 1, 2026
On the Threads list, focus now always stands on the thread the list shows open, so the ring the user sees, the box `c` writes in, and the keys the line offers all name the same thread. ## Why Two rules were written while the list showed only titles: `c` on the list wrote on the page (Aug 25), and Escape from a thread returned to a "whole panel" stop that `g T` also landed on (#921). Then #999 kept one thread open whenever the list shows any, and #1480 made that card fill the list. The list's own focus ring therefore outlined the open card exactly, while `c` from there wrote in the page box and Escape, `r`, Enter and the shading treated the stop as no thread at all. A user saw a selected thread and `c` went somewhere else. ## What changes for the user - Focus given to the list (`g T`, Escape from the panel's general box, a fold of the focused card) goes on to the open thread's title. There `c` writes its reply, `r` resolves, and the line offers `r resolve` and `esc close threads`. The list keeps focus itself only while it shows no thread. - Focus on a collapsed title opens its thread, however it arrives, so focus, selection and the open card never part. A pointer press still opens on its click. - Escape from a panel thread is the panel's own rungs: clear the narrowing, then close. Leaving a reply takes two Escapes rather than three. - In a narrow window, where the panel covers the page, `c` and `e` on a panel thread work; both were dead there. `comment.create` and `reaction.open` now declare `covering`, replacing the panel's own copy of `c`, which knew only the page box. - The expanded shortcut bar gives back the rows that fit once a wider row is trimmed. ## Where to look - `runtime/thread/thread-list-view.js`: the list passes its focus to the open title, and a title taking focus becomes the choice. - `runtime/keyboard/page.js`: a panel thread has no let-go floor of its own. - `runtime/user-intent.js`: focus a container passed on, before any newer input, counts as displaced, so a resolve's landing still carries the user to the next thread. - `runtime/thread/thread-list.js`: the place hold is taken when a closed title's focus opens it. - `runtime/composing/surface.js`, `runtime/reactions.js`, `runtime/thread/panel.js`: one `c` row for page and panel. - `runtime/keyboard/AGENTS.md`: the Threads selection contract. ## Tests About 60 browser tests walked through the old whole-panel stop; they now assert where the user lands. Renamed where the name stated the old stop: `test_go_to_threads_lands_on_the_open_thread_from_a_page_thread`, `test_a_panel_thread_closes_with_the_panel_as_go_to_threads_does`, `test_a_note_walked_on_inside_the_panel_is_left_by_the_panel_holding_it`, `test_the_line_offers_the_thread_g_t_lands_on_its_own_keys`, `test_an_empty_thread_list_wears_its_ring_whole`. New: `test_the_threads_list_hands_focus_to_the_thread_it_shows_open` (1600 and 420px) and `test_a_title_taking_focus_opens_its_thread`. Tab walks down the list now cross each thread's controls, since each title Tab reaches opens, and a reader who stood on a later thread by scripted focus walks there with `t`. The 26 browser files touching Threads pass apart from tests that fail the same way on main and load flakes whose rate matches main's in paired runs. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This was referenced Oct 5, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 5, 2026
… now (#1780) Records decisions from the held-news case study where the next change will read them. - `AGENTS.md`, "Where instructions live": a module's header records the product decisions it embodies and the alternatives they rejected; a change that reverses one rewrites that record and says so in its commit. (#1525 kept its rejected alternative in `TODO.md`; #1694 adopted it without noting the reversal.) - `held-news.js`: the first such record. A panel card holds news behind its notice (the user's decision), rejecting filling the list (#1480) and letting the list move. Arrival stays the `showHeld` call sites, since deriving it from focus events missed focus moves inside one shadow tree and took a dialog's hand-back for an arrival. - `tests/AGENTS.md`: the narrow pull-request gate is the user's choice, so a red main is no reason to widen a change, its gate, or its test selection. The branch also carries that focus-derived arrival attempt and its revert, for reference; the net diff is the three records above. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 9, 2026
…e page (#1784) 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'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_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. - `test_a_wheel_return_attaches_the_comment_box_in_the_first_visible_frame` types 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 case required 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 by `drafting` in `margin-projection.js`), the place keeper (`recentPlaceInput` in `user-place.js`) and typing growth. This change doesn't add it. I sorted the place- and landing-hold repairs since 2026-09-23 by the question each answered: - Which edge of the card stays still: #1429, #1536, #1552, #1574, #1587, #1771. #1552 and #1574 fixed how the hold was keyed across a second placement pass and across Send's admission, not which point the user works at. - Which item in a scroller stays still: #1045, #1464, #1480, #1549, #1694, #1715, #1735. - What waits behind a notice: #1473, #1493, #1725, #1738, #1742. - What a landing reveals on entering, sending or typing: #1303, #1364, #1571, #1602, #1624, #1626, #1645. - Whether the box or the page moves as the box grows: #1453 and this one. None of these commits names a case where `drafting` and `recentPlaceInput` disagreed, so a shared reading wouldn't have prevented them. The two readings also differ by design. `drafting` counts words left in 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-jitter` has uncommitted changes to `comment-placement.js`, `floating.js` and `floating-response.js`, based on #1705. Its `floating-response.js` hunk is small. Its `comment-placement.js` header rewrite overlaps the paragraph this change rewrites, so expect a textual conflict there. `leaf.thread-card-margin-avoidance` is mid-merge in `comment-placement.js` and `margin-projection.js`. Neither touches `makeRoom`'s call from `floating-response.js` or the frame tokens. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.
An open card in the Threads panel now stands its reply box at the list's foot, and a reply arriving grows the thread above it. Before, the box was the card's last in-flow child, so a reply carried it (and the caret in it) down the panel, measured at 422px.
What the user sees: the open card fills the list's height, with the free room between its last message and the reply box, and later cards wait below the fold. A short reply lands in that room; a long one fills it and the list follows, so the newest words end at the box's top. Neither the box nor the caret moves for news. Typing grows the box up into the free room without scrolling anything.
How:
chrome.css: the open card is a column (its::details-content, so the box never pins over the title) with amin-heightof the list's landing band; the reply box takesmargin-top: autoand pins at the list's foot withposition: sticky, the margin card's mechanism, whichreply-landing.jsalready reads as a pinned row. The list pads its content by the ring room, the same room it lands by, so a filling card fits the band exactly.thread-list.js: following keeps the card's end where it stood and brings the newest words out from under a pinned box.reply-landing.js: a pinned row's keystroke growth scrolls only by the part that covers words, measured from the row's height, so growth into free room scrolls nothing and a scroll or reply between keys is never paid for; a shrink moves nothing.landing.js: a direct arrival at a long thread with a pinned row aims at the thread's end, starting on a clean content block.chrome-layout.jswrites the live status's reservation as one custom property (--lf-threads-foot) that the list's foot padding, its landing inset and the pinned box all read, so a notice over a covering panel does not move the box.folding.jsfolds the card'smin-heightwith its height; a folding card hides its reply box rather than letting it ride the fold's edge.Tests:
test_incoming_reply_follows_when_the_panel_has_unfilled_roompassed only because its reply landed within Chrome's 500ms recent-input window, which hid the shift fromshift_watch.js. It is replaced bytest_a_reply_lands_above_an_open_cards_reply_box_and_moves_neither_it_nor_its_caret, which delivers replies past that window and asserts the box, field and caret stand still (within a pixel, since the list scrolls by whole pixels and a reply's height need not be one; CI's Linux Chrome measured 0.875px after a long reply, macOS nothing): card alone, below and above other cards, pinned with its end below the fold, and scrolled.test_typing_grows_an_open_cards_reply_box_up_into_its_free_roomcovers typing. Behavior that moved in older tests: Send now stays at the field's foot as it grows rather than moving down; the walk-status test checks the walked title against the status rather than the whole card, whose free room reaches under it; tests whose arrangement assumed short open cards now scroll to the card, wait for the disclosure hold, or search the full scroll range. The ring checker (render_cases_layout.py) now treats a z-indexed grid item as a stacking context: the list's own ring is a::afterat z-index 1 over the list at 0, which an open card filling the list reached.leaf-dev stillsgains a phone-width panel state.skills/leaf/assets/AGENTS.md, "Stability", now says where a thread's reply box stands.known_shifts.pyhas no entry this resolves.🤖 Generated with Claude Code