Skip to content

Fold a settled thread in place, so news resolving the last one moves nothing - #1466

Merged
max-sixty merged 1 commit into
mainfrom
thread-compact-shift
Sep 30, 2026
Merged

max-sixty merged 1 commit into
mainfrom
thread-compact-shift

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

test_a_website_turn_posts_its_answer_when_the_move_is_settled_first failed on Linux CI now and then with details.lf-thread-compact.flash.lf-going moved without input by (0, 56)px and svg.lf-action-icon moved without input by (0, 36)px (run on #1462, run on mcp-app-settled-frame). Both moves happen on every run. Locally the test's resolve arrives within 500ms of its last key, so Chrome credits the frame to that key (hadRecentInput). Under 10x or 20x CDP CPU throttling it arrives later, and macOS reported the 56px move in every run I made.

Two causes, both measured with the Layout Instability API:

  • When the last shown thread is resolved, the list renders its "No open threads" row above the card while the card is still folding, which pushes the card down 56px. The list view now leaves out an empty row while any card is folding. The row appears once the fold has given back its room, where nothing else stands.
  • .lf-going pinned the card's actions 8px from its top edge. That rule came from the older card layout, where the actions sat on the card's bottom row and the pin kept them in place. In the compact card they sit on the root meta row, so the pin moved them up 36px when the fold started, under the pointer of a user who had just pressed Resolve, and back down when a reopened thread cancelled the fold. They now stay on their row and are clipped with the rest of the card as it folds.

Behavior that moved: test_a_resolved_thread_gives_its_room_back_as_motion asserted the outcome was still inside the clip half way through the fold, which only the pin gave. It now asserts the outcome stays where the user pressed it, at the fold's start and half way through. The outcome is now clipped before half way. test_a_coined_class_cannot_reach_the_chromes_rules no longer lists lf-thread-meta-actions, which the chrome's scoped rules no longer name.

test_news_that_settles_the_last_thread_and_takes_it_back_moves_nothing in test_chrome_contracts.py, which watches for shifts (test_render_threads.py is nightly and doesn't), resolves and reopens a thread by news, with no input in the last 500ms. Reverting either half of the fix fails it on the move that half caused.

This was written by Claude Code on behalf of max-sixty

🤖 Generated with Claude Code

…nothing

`test_a_website_turn_posts_its_answer_when_the_move_is_settled_first` failed on
Linux CI now and then with `details.lf-thread-compact.flash.lf-going moved
without input by (0, 56)px` and `svg.lf-action-icon moved without input by
(0, 36)px`. Both moves happen on every run. Locally the test's resolve arrives
within 500ms of its last key, so Chrome credits the frame to that key
(`hadRecentInput`). Under 10x or 20x CDP CPU throttling it arrives later, and
macOS reported the 56px move in every run I made.

Two causes, both measured with the Layout Instability API:

- When the last shown thread is resolved, the list renders its "No open
  threads" row above the card while the card is still folding, which pushes
  the card down 56px. The list view now leaves out an empty row while any card
  is folding. The row appears once the fold has given back its room, where
  nothing else stands.
- `.lf-going` pinned the card's actions 8px from its top edge. That rule came
  from the older card layout, where the actions sat on the card's bottom row
  and the pin kept them in place. In the compact card they sit on the root
  meta row, so the pin moved them up 36px when the fold started, under the
  pointer of a user who had just pressed Resolve, and back down when a
  reopened thread cancelled the fold. They now stay on their row and are
  clipped with the rest of the card as it folds.

Behavior that moved: `test_a_resolved_thread_gives_its_room_back_as_motion`
asserted the outcome was still inside the clip half way through the fold,
which only the pin gave. It now asserts the outcome stays where the user
pressed it, at the fold's start and half way through. The outcome is now
clipped before half way. `test_a_coined_class_cannot_reach_the_chromes_rules`
no longer lists `lf-thread-meta-actions`, which the chrome's scoped rules no
longer name.

`test_news_that_settles_the_last_thread_and_takes_it_back_moves_nothing` in
`test_chrome_contracts.py`, which watches for shifts (`test_render_threads.py`
is nightly and doesn't), resolves and reopens a thread by news, with no input
in the last 500ms. Reverting either half of the fix fails it on the move that
half caused.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit ea6d59c into main Sep 30, 2026
5 checks passed
@max-sixty
max-sixty deleted the thread-compact-shift branch September 30, 2026 08:27
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants