Repository navigation
Keep a panel card news takes out of the view where it stands - #1549
Conversation
Under Open, another actor resolving the thread the user was reading folded its card away on screen, and every card after it rose: news moving what the reader reads. The list view now owns when a card leaves (`keepsShown`, replacing `keepsDraftVisible`). A change of view puts any card away; a draft keeps its card; the user's own gesture in the thread (a settlement, or a turn the ledger holds) takes the card in the turn it is drawn. Any other exclusion is news, and its card stays, drawn as the news left it, while its going would move something the user sees: while any of it shows, and, as the open card, while the panel shows. Leaving the window, or closing when the user opens another card, asks for the render that lets it go. A kept card keeps the shape it stood in (`threadReading`'s `kept`): the reply box the open card's floor rests on, the control row with Reopen drawn as Resolve's check, done, at Resolve's size, and the summary's status folded while open. `whenOffScreen` moves to geometry.js and `sentHere` to pending/model.js, shared with held-news.js. Behavior moved in tests: the website turn's resolved card now stays in Open Threads drawn resolved; the news-settles test in test_chrome_contracts.py becomes the behavior test (news >500ms after input, then scroll away and open another card); clearing a draft from a news-resolved open card leaves the card; a remote resolve removes the reply strip but keeps the card and the user on its title; the pointer-hold fold test folds a card scrolled past; the known_faults entry goes, and the known() unit test uses its own entry. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A kept card's summary said Resolved in a row the open card had folded or never drawn, which grew the summary 12px, and folding the status for every kept card took the row away from a thread that had asked the user. ThreadView now carries the row's presence and fold across a kept card's renders and changes only its words. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
left a comment
There was a problem hiding this comment.
The existing test_a_narrowing_that_hides_the_card_the_user_stands_in_lands_them_on_the_list still expects a remote answer to hide the card and move focus to the list. On this head it fails at expect(card).to_be_hidden() because the card is now kept visible. Its assertion needs to describe the new behavior before this PR can pass the browser suite.
Under "Waiting on you", an answer from another tab leaves the thread no status, and the kept card's summary dropped its row by 12px. The row's presence now carries apart from its words, drawn empty where the news left none. The narrowing focus test sends the user's own reply, since a remote answer no longer hides the card the user is in. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
left a comment
There was a problem hiding this comment.
The current test check fails in two fold tests changed by this PR; both failures reproduce locally.
test_a_folding_reference_hands_its_hold_to_the_next_cardnow usesroots[5]as the source while scrollingroots[16]to the center. The source midpoint lands at y=4.7, outside the panel, soelementFromPointcannot find the source card. The test needs a visible source at the pointer and a fold path consistent with the new retention rule.test_a_render_arriving_mid_fold_keeps_the_place_the_fold_is_holdingalso switches toroots[5], then appends a settlement from outside this page. Its final assertion waits for that card to become hidden, but the card remains shown under the new retention rule. The journey needs to produce a fold the user initiated here, or the expected outcome needs to describe the retained card.
CI failed: two modified fold tests fail on the reviewed head.
|
The main CI run at 87983c2d also fails A related unedited case, |
…tests it moved The gesture that takes a card out of the view is now any the ledger holds on the thread: a settlement, a reply or reaction, or the refusal that restores the state before one (`pendingForParent` over the thread's messages), so a refused reopen restores the Resolved view as before. An undo of a page action is no gesture on the thread, so its card stays. The Reopen face is selected by its icon, keeping lf-icon-action out of the authored-theme class surface, and sentHere goes back into held-news.js. Nightly tests moved: the fold-under-pointer tests resolve the card by the user's own gesture through threadActions (news no longer folds a card that shows), the mid-fold render test reverts to its original card under the pointer, a remote resolve leaves the card saying Resolved, and the suggestion undo leaves its card closed in place. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
On this PR's current head ( |
Answering an Ask frozen in a thread is the user's gesture on that thread, as a reply is, so the card it takes out of "Waiting on you" goes with it. `gesturedOn` reads the ledger once for settlements, replies and reactions on the thread's messages, and moves on widgets those messages hold. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
left a comment
There was a problem hiding this comment.
test_an_agent_reply_says_when_the_user_owes_an_answer still fails on this head at tests/test_render_threads.py:3737. During the held prose reply, the “You” count reaches zero, but the open card remains visible with its draft retained until delivery finishes. I ran the case on ac3f5067; changing the pending-state assertion to expect one visible card makes the full case pass, and its final assertion still confirms the card leaves after acceptance. Update that assertion to describe the retained draft.
# Conflicts: # skills/leaf/assets/AGENTS.md # skills/leaf/assets/runtime/thread/held-news.js
A reply the user sends under "Waiting on you" keeps its card while its words stand, and once acceptance clears them the card went on as news, since the ledger no longer held the reply. The list now reads the cause in the render that first excludes the card and the card carries it (`kept`: "news" or "draft"), so a card the user's own gesture took leaves when its words go, as main's retained-draft tests expect, and a card news took stays while it shows. `keepsShown` becomes `keeping`, which returns the cause. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The merge-base changed after approval.
leaf-agent
left a comment
There was a problem hiding this comment.
A news-retained card can disappear while the user is looking at it after its draft is cleared. The inline suggestion preserves the reason it was excluded until it can leave without moving visible content.
# Conflicts: # skills/leaf/assets/AGENTS.md # skills/leaf/assets/runtime/chrome.css # skills/leaf/assets/runtime/thread/held-news.js # skills/leaf/assets/runtime/thread/thread-card.js # tests/known_faults.py # tests/test_render_shift_watch.py # tests/test_website_server.py
Compact cards now share one row with their status, so sixteen no longer scroll the open card out of the list. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Keep the retained-card lifetime and editor contract while using main's one-row summary and layout-shift sensor. Remove the status-row latch the layout now makes unnecessary, and read the current status directly. Preserve main's removal of known shift waivers and narrow the website card locator. The retention test needs more closed rows to scroll the open card entirely off screen now summaries are compact. Increase its fixture, keep the offscreen precondition, and assert Resolved for both initial attention states. Validation: 10 focused browser cases, 190 runtime tests, all pre-commit checks.
…e row Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…t-a5722ac2e98a0271c
…the seat Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…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]>
Under Open, resolving a thread from the agent or another tab used to fold away the card the user was reading and move every card below it. The card now stays visible and resolved until removing it would move nothing the reader sees, or the user changes the filter, order, or search.
ThreadListView.keepingowns why an excluded card remains. News retains a visible card and the open card; an unfinished draft also retains its editor. A card retains that original cause while offscreen, so returning to a remotely resolved card and clearing its draft leaves the card and editor in place. The user's own settlement still folds the card away.Retained cards preserve their reply box and keep Reopen at Resolve's size and position. Summaries read current status directly: main's single title row holds their geometry without a separate status latch.
whenOffScreenhas one owner ingeometry.js, shared by retained cards and held command lists.Browser tests cover remote resolution and reversal, replies from another tab, draft recovery and clearing, local folds, focus handoff, and the hosted website turn. The offscreen-draft regression failed before the cause-retention repair and passes afterward. Fixtures provide enough collapsed rows to reach the offscreen state with main's compact summaries; the offscreen and stable-geometry assertions remain enforced. Layout-shift waivers remain removed as on main.
Validation on the integrated tree: 10 focused browser cases, 190 runtime tests, and all pre-commit checks pass.