Repository navigation
fix: keep each floating-box part's carry until its own motion ends - #7385
Merged
Merged
Conversation
A box-motion tween restored every carried part's inline `translate` from the last animation's `finish` event. Parts begun in one reading can finish a frame apart, so a part still at progress 0.99999 lost its `translate: var(--lf-box-carry)` consumer a frame before its motion ended. The shift watch reads a registered-property translation only while that consumer stands, so a sample in that frame saw the part at rest with no animation credit, and on a slow frame the floating panel's head line (Back, Resolve, Close) read as moving its whole carry without input. Each part now restores its own declaration when its own motion finishes; the last animation's finish still ends the stream ride. Nothing changes on screen: the leftover carry was under a hundredth of a pixel. test_resolve_opens_the_next_thread_as_tall_as_it_holds, run alone unthrottled, failed 7 of 19 runs on main and passes 48 of 48 with the change. Closes #7381
This was referenced Nov 27, 2026
This was referenced Nov 27, 2026
max-sixty
pushed a commit
that referenced
this pull request
Nov 27, 2026
…tructurally (#7388) `lf-tally` hands its region element to its Effect UI component as a prop. When a revision replaces that region, Effect UI's `propsEqual` sees the field differ by reference and falls back to `Equal.equals`, which in Effect 4 compares two objects structurally, through every property they reach. On a DOM node that walk covers the document; on command-hub it reaches an SVG length whose `value` getter throws `NotSupportedError: Could not resolve relative length`, so the page's reading fails (`leaf: read failed` from `layer-client.js`). Both cases of `test_command_hub_an_absorbed_input_stays_fulfilled` fail this way on main since #7374, first in [ci run 45985477026](https://github.com/max-sixty/leaf/actions/runs/45985477026). The adapter (`runtime/lib/effect-widget.js`) now marks each DOM node an `inputs` function returns with `Equal.byReferenceUnsafe`, so a replaced node counts as a changed prop and an unchanged one as equal, with no walk. The fix sits in the adapter rather than in `lf-tally`, because any widget whose `inputs` returns an element would hit the same walk. `/vendor/effect-ui.js` now exports `Equal` for this (rebuilt with `pnpm run build:browser`); `leaf-dev interface --base` reports no name added. **Verification:** `test_command_hub_an_absorbed_input_stays_fulfilled` (both cases) fails on `db508e5b8` with the SVGLength error and passes with this change. `test_a_tally_counts_its_regions_obligations_and_walks_them`, the runtime tests `effect-widget` and `authored-capture`, `pnpm run check:browser` and `pnpm run test:browser` pass. The run's other failures are not touched here: the floating-panel teardown shift is #7381, fixed by #7385, and the heading-link copy-button shift has its own cause issue. Refs #7387 — automated triage Co-authored-by: leaf-agent <[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.
A floating box's tween restored every carried part's inline
translatefrom the last animation'sfinishevent (box-motion.js,last.onfinish). Parts begun in one reading can finish a frame apart. So a part whose own motion was still at progress 0.9999975 lost itstranslate: var(--lf-box-carry)consumer a frame before its motion ended. The shift watch reads a registered-property translation only while that consumer stands. A watch sample in that frame therefore saw the part at rest with its animation still running and credited none of the carry. On a starved frame, the floating panel's head line (Back, Resolve, Close) then read as moving its whole carry, 70 to 113 px, without input.Each part now restores its own declaration when its own motion finishes. The last animation's finish still ends the stream ride (
contentRides), on its old timing. Nothing changes on screen, because the leftover carry at the early restore was under a hundredth of a pixel. The module header already said a part's declaration is restored "when its part stops moving", and the code now does what it says.Verification.
tests/browser/test_render_floating_panel.py::test_resolve_opens_the_next_thread_as_tall_as_it_holds, run alone unthrottled (uv run pytest -n0), failed 7 of 19 runs onmainand passes 48 of 48 with the change. Focused browser tests over the panel, the margin card's reply, send placement and composing (-k "carry or ride or tween or ring or rise or grow or resolve or send or fold or motion", 139 tests),pnpm run test:runtime, eslint and the browser type check pass, with one exception described below.Diagnosis
I instrumented the watch and box-motion on a failing run. The head's carry began at 4375 ms. The watch sampled it at 4418 ms at its full start value, then again at 4686 ms with no translate value. The head's animation only finished at 4726 ms. In between,
last.onfinishcalledrestoreTranslations()while the head's animation stood at progress 0.9999975 (logged with a stack fromlast.onfinish). The watch's reading skips a boundtranslatewhose consumer is no longereffect.target.style.translate(shift_watch.js,readMotion), so the 4686 ms sample credited nothing. The issue'sended: nullwas accurate at comparison time, because the ending came 40 ms later.A first version that held every restore until all parts had settled (
Promise.allSettled) also fixed the target. It made the stream ride end a frame later too, so this version leaves the ride's end where it was.Not fixed here.
test_a_resolve_s_notice_stands_for_that_resolve_alonefails at itsconsume_browser_errors(line 524) onmainas well as on this branch. With--cpu-throttle 3it failed 10 of 10 runs on each, with the same extra findings: the Threads rows' text moves −10 px beyond the expected settled-row move. Unthrottled it failed 0 of 58 runs onmainand 4 of 98 on this branch's two versions. I take the unthrottled gap to be noise, given that the throttled failure is identical on both, but it's the one result here that leans the other way.Closes #7381 — automated triage