Skip to content

Motion: stream a panel send, fold in Firefox and on refusal, fade dialogs, tint revisions - #4001

Merged
max-sixty merged 13 commits into
mainfrom
animation-survey
Oct 25, 2026
Merged

max-sixty merged 13 commits into
mainfrom
animation-survey

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Six motion changes from the animation survey, each one picked on the survey page.

A send from the floating panel moves as one stream. Before, a reply sent in the panel's thread stood for a frame where the previous message stood, and the previous message then reappeared under the thread's name. box-motion.js carried the name but showed a resized scroller's content at its new scroll at once. A page comment's view also faded in place while its outline grew.

Now the panel tells box-motion.js when a send begins: theirs() returns "send", and stream() reads where each scroller's content stands before the send draws. Until the send's rendering settles:

  • A scroller's content is carried from where it stood at the send, its scroll included. The new turn comes up at the scroller's foot, and every turn above it rides with the name. This also holds in a view already at its cap.
  • A part new to the box rises with the box's top edge, cut at the box's old outline, so a view a send opens slides up out of the field.

A send takes the panel's full 300 ms tween and skips the view's 90 ms fade. test_a_send_moves_the_panel_s_view_as_one_stream holds the first frame and checks that the name and every turn start the same distance below their rest. It fails without the stream.

Folds play in Firefox. foldBlock animated from calc-size(auto, size), which Firefox and WebKit lack, so there a resolved inline thread or a decided block suggestion retired in one frame. Firefox has no near plan for either feature (bugs 1896734 and 1945962 are unassigned). Outside Chromium, the effect now starts at auto, reads that height, and restarts from it in pixels before the next frame. An already-retired slot is drawn by an inline display that the effect's end removes. notes/browser-support.md records the evidence and when to delete the fallback, and the fold tests now also run in Firefox.

A refused reply folds away where it stood. transcript.js folds it in every thread surface. The card's hold for a refused turn's room grows as the message folds, so the card no longer shrinks 53 px mid-fold. test_a_refused_reply_folds_away_while_its_card_holds_still covers this.

The leaf's menu, Page Map, the shortcuts dialog, and a card opened from its pin fade in and out over 120 ms. The fade is opacity only, and each is pressable from its first frame.

  • The menu keeps its last rows, inert, while it fades out.
  • The dialogs use @starting-style and an allow-discrete display/overlay transition. Firefox can't transition display, so there they fade in but close at once.
  • tests/words_watch.js now treats a field inside a closed <dialog> as put away. The axe check on the small-screen map waits for the opening fade.

Each block a revision changed takes the arrival tint as it lands. It is the same 1.2 s tint a new message gets. selfComparison generalised into blocksNewSince(source), which this asks of the outgoing source, at the cost of one more Markdown format pass per revision.

The tabs' reveal cue uses the flash token. It asks flashDuration(), now exported and documented, instead of 650 ms. Corner marks fade in the disclosure time. The .lf-msg.flash rule, its keyframes, and openPageThread's flash option outlived the classic Threads panel that applied them (#3100), so they are deleted.

Also corrects notifications.js, which said a passing notice fades.

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

max-sixty and others added 12 commits October 25, 2026 09:01
A reply sent in the panel's thread used to land where the previous message
stood while that message reappeared behind the thread's name, because
box-motion shows a resized scroller's content where its new scroll puts
it. thread/sent-ride.js reads each message's place and the field's before
the send draws, and once the panel has landed the view plays a translation
from there to rest, on the panel's own tween. Margin cards are left out:
their sticky message heads would ride down over their own words.

Prototype for the animation survey, not for landing:
test_one_field_starts_a_thread_takes_its_reply_and_settles_it fails, as
the shift watch throws on an animation whose message node is detached
mid-ride. The intended build is a box-motion rule rather than a second
mechanism.

Also corrects notifications.js, which said a passing notice fades.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A send now tells box-motion it begins, before it draws ("send" from
theirs(), read with stream()). Until the send's rendering settles, a
scroller's content is carried from where it stood at the send, its scroll
included, so the new turn comes up at the scroller's foot while every turn
above rides with the thread's name; and a part new to the box, such as the
view a page comment opens, rises with the box's top edge out of its old
outline instead of fading in place. The panel takes its full tween for a
send. This replaces the per-message thread/sent-ride.js prototype, which
moved the new turn faster than the rest and left the header behind.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A decided block suggestion and a resolved inline thread now fold away in
Firefox (and any engine without intrinsic-size interpolation) instead of
retiring in one frame. foldBlock keeps Chromium on calc-size(); elsewhere it
starts the effect at `auto`, reads that height, and restarts the keyframes
from it in pixels before the next frame. Firefox also cannot animate
`display` (bug 1834877), so an already-retired suggestion slot is drawn by an
inline `display` the effect's end or cancellation removes.

Firefox has no near plan for calc-size()/interpolate-size (bugs 1896734 and
1945962 unassigned, no committed release as of 2026-10-25); the note in
browser-support.md records the evidence and what to recheck. lf-draft's return
from its editor still needs calc-size(), since its end height is only known
after the close lays out.

The suggestion fold test and the inline retirement test now run in Firefox as
well as Chromium; both Firefox cases fail on the previous foldBlock.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A thread message that leaves while drawn, which in practice is a reply the
log refuses, used to vanish in one frame. It now folds away with
`foldBlock` (`--lf-motion-fold`), as a resolved inline thread does, in every
reader of a whole thread: margin card, page thread and the floating panel's
thread view (transcript.js). The message leaves the transcript at once: the
folding node is inert and gives up `data-message`, `data-event` and
`data-attempt` until it is removed. Reduced motion, first presentation and
engines without calc-size interpolation (Firefox, WebKit) keep the
immediate removal through motion.js.

A card holds a refused turn's room for its reply box (reply-continuity.js).
Measured once at presentation, that hold saw the folding message still at
full size, so the margin card shrank 53px through the fold and its head
moved down, and a page thread's reply box moved up. The spacer now follows
the fold frame by frame and ends at the same room as before; the words a
refusal hands back grow the reply box only into room the fold has given
back. The panel's own hold after a refusal (`holdRefused`) needed no change:
its head and field stay put while the turn folds inside the held view.

The panel's send landing counts drawn messages by `data-message`, so a
folding node no longer counts as one.

`z` cannot take back a prose reply (the append door refuses `said-message`),
so a refusal is the case this reaches; a reaction a user takes back draws
as a strip, not a transcript message.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	dist/kernel/kernel.json
# Conflicts:
#	dist/kernel/kernel.json
Holds the panel's motion at its first frame and checks that the thread's
name and every turn start the same distance below their rest, both when a
page comment opens the view and when a reply grows it. Fails without the
stream (the view opens in place).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…d out

Prototype for the motion proposals. Surfaces that opened or closed in one
frame now fade, opacity only, in the disclosure time
(`--lf-motion-disclosure`, 120 ms); nothing moves and each is pressable
from its first frame.

- The leaf's menu already faded in; on close it now keeps its last rows,
  inert and passing presses through, while `playMotion` fades it out
  (`menuFade`, floating-panel.js). A menu reopened mid-fade draws afresh.
- Page Map and the command reference fade in with `@starting-style` and
  out by transitioning `display` and `overlay` (allow-discrete), taking
  no presses while closed. Their column direction moves to the base rule
  so a closing sheet keeps its layout after `[open]`/`.open` goes.
- A margin card opened from its pin or row fades in when its first
  placement lands and out where it stood: `close` keeps the placement
  until the opacity transition ends, then stops the driver and hides. A
  card Send opened still grows out of its comment box instead.

Test changes: the words watch counts a field inside a closed dialog as
put away, since the dialog closes semantically at the press while its
pixels fade; the small-screen Page Map test reads contrast after the
opening fade ends.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Prototype for the motion proposals. When an agent's revision installs
while the page is open, each block it changed takes the paint-only tint
a newly arrived message gets (`backgroundFlash` over `flashDuration()`,
1200 ms). Which blocks changed is the comparison's own reading:
`blocksNewSince` is the self-comparison generalized to any source, asked
of the source the revision replaced, so new and rewritten leaf blocks
tint and nothing moves.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…flash

lf-tabs tinted a tab a walk revealed for 650 ms while Leaf's own arrival
tint lasts --lf-motion-flash (1200 ms); it now asks flashDuration(), which
widget-api exports and module-scroll-and-motion.md documents. Corner marks
fade in the disclosure time instead of a literal 120 ms. The
.lf-msg.flash rule, its keyframes and openPageThread's flash option
outlived the classic Threads panel that applied them (#3100); nothing
added the class since, so they go, and the motion-inputs test no longer
reads a CSS consumer of the flash token. Durations used once with their
own reason, such as the comment box's 240 ms growth and the busy dim's
delay, stay literal.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty max-sixty changed the title Move a panel send as one stream, fold in Firefox, and fold a refused reply Motion: stream a panel send, fold in Firefox and on refusal, fade dialogs, tint revisions Oct 25, 2026
@max-sixty
max-sixty marked this pull request as ready for review October 25, 2026 18:44
# Conflicts:
#	dist/kernel/kernel.json
#	dist/kernel/runtime/widget-api.js
@max-sixty
max-sixty merged commit 46e0bd8 into main Oct 25, 2026
4 checks passed
@max-sixty
max-sixty deleted the animation-survey branch October 25, 2026 19:05
leaf-agent added a commit that referenced this pull request Oct 25, 2026
Forward could restore the second discussion's viewport while leaving
focus on the paragraph returned to by Back. #4001 made a closed margin
card remain painted but inert during its fade; history treated that
painted card as a usable focus destination and never tried its source
passage.

History now uses the shared presentation check for both saved focus and
its source fallback. A closing card therefore returns through its
passage without changing the closing animation. The existing regression
holds the native closing transition through Forward and checks focus
after traversal completes; both click and Tab cases fail with the old
runtime and pass with this change.

Validation: all six focused history checks and 562 runtime tests passed.
Browser bundles rebuilt successfully. A served comparison on
`root-parts` loaded 44 code requests before both upgrade and first state
presentation on each version, with 153 additional code bytes; the new
presentation checks run only on history return.

Closes #4120 — automated triage

---------

Co-authored-by: leaf-agent <[email protected]>
leaf-agent added a commit that referenced this pull request Oct 25, 2026
The menu's closing transition set `data-leaving` before asking whether
motion could play. Before first presentation, or with reduced motion,
the shared motion gate returned no animation and the same paint removed
the attribute again. The browser write detector correctly rejected that
round trip.

Check the existing `motionPlays()` gate before preparing the menu fade.
Ordinary closing fades retain their rows and inert state; startup and
reduced-motion closes remove the menu directly. This preserves #4001's
animation intent and the startup replay guarantee, without changing the
write detector.

The reported startup test failed on current main and passes with this
change. The menu keyboard journey now covers both motion preferences.
Copy-link coverage and all 562 runtime tests pass; the committed kernel
was rebuilt.

Closes #4121 — automated triage

Co-authored-by: leaf-agent <[email protected]>
leaf-agent added a commit that referenced this pull request Oct 25, 2026
A returning diff thread could leave keyboard focus on the body because
its margin card's Close button remained painted during the closing fade
added in #4001. The focus hold accepted that inert control as its
completed destination, before the browser blurred it.

The shared focus-place reading now excludes inert content through
composed ancestry. Its inertness reader moves to the dependency-free
tree module and remains shared with exposure and keyboard routing. The
card keeps its fade, and focus moves to the thread's new seat.

The reported Close case failed on current main; both Close and marker
now pass. A focused runtime regression fails with the old reading and
passes with this change. Eight browser cases covering thread and reply
transfers pass, as do all 563 runtime checks and the browser build.

A served `review-a-fix` comparison against the base completed document
arrival, widget upgrade and state presentation without console errors on
both arms. Before presentation each loaded 53 requests (47 code
requests); candidate code grew by 133 bytes, including 43 JavaScript
bytes. The added focus availability reading prevents retaining a retired
control.

Closes #4123 — automated triage

Co-authored-by: leaf-agent <[email protected]>
leaf-agent added a commit that referenced this pull request Oct 26, 2026
The command reference intentionally stays drawn during its closing fade
(#4001). Both keyboard-route tests used a page-wide `Apply operation`
button locator, which can match the reference command as well as the
widget control after focus has returned. Scope those assertions to
`#probe`, preserving the Tab focus and subsequent shortcut execution
checks without waiting for the fade.

Reproduced the reported strict-locator failure on current main. With
this change, the alias-collision test, contextual Escape test, and modal
reference Tab/return test all pass (3 passed). The preceding run's
artifact also confirms the reported test passed there, consistent with
the locator depending on whether the fade had finished.

Closes #4185 — automated triage

Co-authored-by: leaf-agent <[email protected]>
leaf-agent added a commit that referenced this pull request Oct 27, 2026
A margin card's closing fade hides its retained reply box after focus
has moved. Options inside the card therefore kept advertising Enter
until a later keyboard repaint. Refresh the card's command scopes on
opening and after hiding, preserving existing reply navigation and the
fade introduced in #4001.

The stale-key sweep now waits for finite motion before taking its
baseline: otherwise its two readings can straddle the hide and report a
legitimate state change. With that wait alone, the ship-review case
still fails; adding the scoped repaint makes it pass.

Validation: the ship-review stale-key sweep and the option
addition/clarification route test pass on the rebuilt kernel; all 673
runtime tests passed, and the browser build/type check passed. A served
base/candidate startup comparison loaded 35 requests in both arms
through upgrade and first server-state presentation, with 107 additional
JavaScript bytes for the visibility-triggered repaint calls. No geometry
or visible styling changes.

Closes #4246 — automated triage

Co-authored-by: leaf-agent <[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