Skip to content

Keep a floating-panel view that is fading out as it was drawn - #7367

Merged
max-sixty merged 2 commits into
mainfrom
threads-grow-flake
Nov 27, 2026
Merged

max-sixty merged 2 commits into
mainfrom
threads-grow-flake

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

test_threads_grow_in_place_and_hold_news_until_asked failed about two local runs in three, and once in two -k selections on main: its shift watch saw two Threads rows swap places, 30 px, with no input. Pressing a row opens its thread while Threads fades out for 60 ms. Every paint redrew the fading view, but transition had already given that view's opening, the record that holds Threads' rows behind its news notice, to the thread view. So an agent reply landing during the fade re-sorted the fading list, and a thread held behind the notice joined its head in the press's own frame. A per-frame log of the rows showed the swap at the frame the reply arrived.

The fading view now keeps its last drawing (lit's noChange) at the height it had, and each view's node is keyed by its opening. Three Codex reviews found more, fixed here: thread and On views, whose content the thread reader takes away as the next view arrives, faded out empty and now go at once, which removes four guards; On Me re-seats an answered card only on Back from a view opened over it, not after the user turns to another tab; and Back to the menu scrolls the row it focuses into view.

What the user sees differently: thread and On views no longer fade out; Back to the menu shows the row it lands on; On Me, left for another tab and opened again, drops a question answered meanwhile.

Tests: each new assertion fails without its fix; leaf-dev suite flake 48/48 for the reported test and the three changed ones under load; test:runtime, check, and a 96-test panel selection pass, apart from test_an_open_view_covers_the_page_beneath_it, which fails in some parallel selections on main too.

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

test_threads_grow_in_place_and_hold_news_until_asked failed about two
local runs in three, and once in two -k selections on main today. Its
shift watch saw two Threads rows swap places, 30 px, with no input.

Pressing a row opens its thread, and Threads fades out for 60 ms. Every
paint redrew the fading view, but `transition` had already given that
view's opening to the thread view. The opening is the record that holds
Threads' rows in place behind its news notice, so the fading list drew
without that hold. An agent reply landing during the fade re-sorted the
list newest first, and a thread waiting behind the notice joined the
list's head in the press's own frame. A per-frame log of the rows'
positions showed the swap at the frame the reply arrived.

The fading view now keeps its last drawing (lit's `noChange`) at the
height it had, absolutely positioned so the stage, sized for the
arriving view, doesn't cut it. Each view's node is keyed by its
opening, so a view opened again during the fade draws in a node of its
own. menuView's guard for a fading menu goes.

Three Codex reviews found more, fixed here:

- The thread reader draws a thread's messages and On's cards, and lets
  go of them as the next view arrives, so these views faded out empty.
  They now go at once while the next view fades in, and the four
  guards that kept the reader off a fading view go.
- On Me kept an answered card in its seat on Back only because the
  fading On view redrew and re-seated it. `transition` now re-seats On
  Me when a view opens over it, and only then, so turning to another
  tab and back seats only what still waits.
- Back to the menu put focus on the row that opened the list without
  scrolling to it. The menu draws afresh at its top, so in a short
  window that row sat out of view. It now scrolls into view.

What the user sees differently: thread and On views no longer fade out
when the user leaves them; Back to the menu shows the row it lands on;
On Me, turned away from and back to, no longer shows a question
answered meanwhile.

Tests: test_threads_fades_out_where_it_stood holds the motion and
checks that the fading rows stay as drawn through a press with a held
thread and through a reply, and that Back takes the thread view away at
once. The On test now answers in the thread before going back, and
answers a second question while on Threads. The menu's Back test checks
the row is in view in an 800×400 window. Each new assertion fails
without the fix it protects. `leaf-dev suite flake` (12 copies, 4
workers, load 2): 48 of 48 for the reported test and the three above,
and 12 of 12 earlier for the On tabs test. `pnpm run test:runtime`,
`pnpm run check`, pre-commit, and a -k selection of 96 floating-panel
and On tests pass; test_an_open_view_covers_the_page_beneath_it fails
in some parallel selections, on main too.
@max-sixty
max-sixty merged commit f5b4d79 into main Nov 27, 2026
6 checks passed
@max-sixty
max-sixty deleted the threads-grow-flake branch November 27, 2026 07:40
max-sixty added a commit that referenced this pull request Nov 27, 2026
…r left it on Back (#7420)

The panel faded a view out for 60 ms before the next faded in. #7367
fixed a flake in that fade by keeping the fading view as it last drew,
but drawn that way it stood past the edge of the box shrinking under
it: a still 20 ms into Threads → On Me shows Threads' rows over the
page's text. Thread and On views already skipped the fade, since the
thread reader empties them as the next view comes, and
test_a_resolve_s_notice_stands_for_that_resolve_alone accepted a move
of the Resolved heading inside the fading Threads as the one move a
refused Resolve makes without input.

A view now goes in the paint that draws the next, which still fades in
over 90 ms while the box takes its size. Removed: the `leaving` state,
the view's second keyed node, `data-lf-leaving` and its CSS rule,
`--lf-motion-view-out`, the rendering hold that kept the fade inside
the gesture, `playMotion`'s `delay` with Go-to's wait for a delayed
motion (`heldUnseen`), and `:not([data-lf-leaving])` from every view
selector in the tests and dev/leaf_dev. The resolve test no longer
expects a move, and the Go-to test reads its chips once on the
arriving view instead of slowing the page's animations.

Back drew the list afresh at its top, so in a list the user had
scrolled, the row Back focused often sat out of view; only the menu
revealed its row, since #7367. The panel now keeps where the user
stood in a list as a view opens over it (`placeOf`): the row focus is
on, or on a control of, where that row stood in the list, and how far
the list was scrolled. History's record of the entry (`listShown`)
reads the same place. Back (`returnTo`) stands the user on that row
and scrolls so it stands where it stood in the window, as far as the
list's ends allow, so a row a reply carried to the head of Threads
stays in sight. Where focus wasn't on a row, as after a press that
left it on the list, the list scrolls as far as they left it and they
stand on the row that leads to the view they leave, brought into view
where none of it shows; without either row the list holds focus
itself. Browser Back over a list takes the same path with history's
record, so it keeps the place after a reload, when the panel holds
none. An On line, which carries no key of its own, takes its item's.
A landing that focuses the row of the thread the user was in, as
`g T` from a thread does, now reveals that row rather than the list's
first thread.

What the user sees differently: the view being left no longer fades
out; the next one fades in as the box changes size. Back from a thread
returns Threads, On Me or the menu scrolled as the user left it, on
the row they opened. `g T` from a thread far down Threads shows that
thread's row.

Tests: test_back_returns_a_list_as_the_user_left_it is new and fails
on main (the list at 0 for 243 px); test_threads_fades_out_where_it_stood
goes with the fade. The menu's way-back test now scrolls to its row in
the short window, since Back returns the menu as the user left it
rather than revealing the row. `pnpm run test:runtime`, the runtime's
type check, pre-commit, and 108 panel, On, history and Go-to tests the
change reaches pass, apart from
test_an_open_view_covers_the_page_beneath_it, whose harness race #7404
fixes. Codex reviewed three rounds; its findings are fixed here, apart
from a mouse press on an On Agent item's Discuss in WebKit or Firefox,
which leaves focus on the list rather than the line, so Back stands on
the list, scrolled as left.

> _This was written by Claude Code on behalf of max-sixty_
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