Repository navigation
Conversation
A distant sidebar reorder fades the moving rows out and applies the new order only after every one of them reports its fade complete. A single missing report left the whole batch at opacity 0 until a membership change, collapse or drag reset it, which shows up as a block of blank rows in a section. Give the batch a deadline well past the 100ms fade, so it always applies the new order and fades the rows back in. Co-authored-by: Jitter <2b2e6415e748c35180847a37aadae06a11e30dddc76b784e7fd9354c4eb42e7a@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Matt Toohey <contact@matttoohey.com>
The distant-jump journey pauses the fade-out while it inspects it, then calls finish() to release it. finish() completed every paused animation. Now that a held fade has a deadline, the app can apply the new order by itself while the test is still inspecting, so finish() also completed the fade-in the test was about to observe and the journey failed on WebKit with no partial frame at the new position. Make finish() release only the animations a seek has already stepped; release() still finishes everything. Poll for the animation at short intervals so a seek finds the fade-out well inside the deadline rather than after the default backoff has grown past it. No assertion changes, and the deadline is unchanged. Signed-off-by: Matt Toohey <contact@matttoohey.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The distant-jump journey found the fade-out by polling from the test runner, then stepped it. The app now applies the new order by itself 500ms after a fade starts, so a runner that took longer than that to look found the fade-in instead and the journey failed with no partial frame at the old position. That happened once in a WebKit flake-check shard. Move the wait into the page. A seek now registers with the animate hook, which steps the animations as soon as enough of them exist, in the same task that created them. Add arm(), which starts a seek before the test triggers the motion, and use it for the fade-out. The time the runner takes to notice the fade no longer matters. seek() keeps its meaning for the other callers, and still fails after 10s if the animation never appears. No assertion changes, and the deadline is unchanged. Signed-off-by: Matt Toohey <contact@matttoohey.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The distant-jump journey samples the moving row once per rendering update, and the hold steps the paused fade-out to 0, 25%, 50% and 75% with a frame between steps. A partial reading at the old slot therefore needed two rendering updates after the fade-out existed. WebKit on Linux can take longer than the app's 500ms fade deadline to deliver those first updates after an opacity animation starts, so the app applied the new order before the sampler saw a partial frame and the journey failed with oldFade false. Show every step once in the task that starts the seek, then again for a frame each as before, and announce each step with an event. The distant-jump sampler also takes a reading on that event, so the readings no longer depend on when a frame arrives. Each one is still the computed style and geometry of the browser's own animation, and goes through the same checks as the per-frame readings. This changes what oldFade proves. It now proves the fade-out leaves the row partially transparent at the old slot, read at each held step. It no longer proves that a rendering update happened during the hold. No assertion changes, and the deadline is unchanged. Signed-off-by: Matt Toohey <contact@matttoohey.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This branch has not been deployed
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.
Problem
When activity reorders a sidebar section by more than two places,
ChannelSidebarRowsfades the moving rows out and applies the new order only after every faded row reports that its fade completed (applyOrder). Nothing else ends the batch. If a single completion never arrives, the whole batch stays atopacity: 0until a membership change, a collapse or a drag resets it. A section then shows a block of blank rows: in the desktop dev build, eight Team rows stayed blank for about 9 seconds before the reorder landed.Change
src/features/channel-navigation/ChannelSidebarRows.tsx: while a batch is fading, a 500ms deadline applies the prepared order and clears the fade. That is five times the 100ms fade, so a normal fade always finishes first. Completion and deadline sharefinishBatch, and a new batch or cancellation clears the timer through the effect cleanup.Demo
On-screen captions show elapsed time and how many rows are invisible. This is a standalone WebKit page that mounts the real
ChannelSidebarRows. To reproduce the stall on demand, each fade-out is held one millisecond short of its end, so its completion never fires. I couldn't trigger that cause naturally (see Validation).sidebar-fade-before-after.mp4
Validation
shows distant rows in their new order when a fade never finishes: fails on main (the order never applies), passes here. All 417 tests insrc/features/channel-navigation/pass.navigation-sorting.spec.mjson WebKit: 14/14 pass.biome checkandtsc --noEmitare clean.🤖 Generated with Claude Code