Repository navigation
fix: toolbar no longer freezes the tab during an action that refreshes - #53
Merged
Merged
Conversation
terracotta 2.0.0 ships .jsx files. The build skipped everything under node_modules, so rolldown's default React transform compiled them and dist imported react/jsx-runtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117BoWNquaFeeLesV4k9P3K
The trackers wrote their list back after every flush record. While a pending action held the toolbar's signal, rewriting the same list still scheduled a flush, whose record ran the tracker again, and the tab froze (solidjs/solid#5038). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117BoWNquaFeeLesV4k9P3K
This was referenced Nov 19, 2026
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.
Requested-by: @ryansolid
Summary
Fixes solidjs/solid#5038. With
DevToolbarmounted, an action that calls a server function and then runsrefresh(data)froze the tab.The timeline and async trackers run on every runtime record, including every
flushrecord, and then write their list back on a microtask. The toolbar's write lands in the same tick in which the action's step resumes, so the action's transaction adopts it (D-7) and the signal is held. When a write goes to a held slot it joins the hold even if the value is equal (D-8), and so it schedules a flush. That flush is empty, but it still emits aflushrecord. The record runs the tracker, which writes the same list again, and the microtask queue never empties. The request's timer never runs, so the action never ends.The fix is to write a list only when the tracker returns a new one.
TimelineBuilder.snapshot()andAsyncHistory.recordsalready keep the same array while nothing changed, so an empty flush now writes nothing. This needs no change in Solid core.There is also a core-side fix, solidjs/solid#5045 by @brenelz. It stops an equal rewrite of a held slot from scheduling a flush. Its size gate currently fails, at +28 to +118 B brotli on the live and every-store pages. This PR keeps the toolbar from freezing whether or not that one lands.
A second commit fixes the build on
main. terracotta 2.0.0 ships.jsx, and the build skipped all ofnode_modules. Rolldown's default React transform compiled those files instead, sodistimportedreact/jsx-runtime. The Solid compiler now handlesterracotta/dist.How did you test this change?
keeps the page running while an action refreshes a load. The fixture renders it only on?refresh-action, so the other tests see the same app as before. The action yields a timer request that ends with acallrecord, the way the server function runtime sends one, and then refreshes an async memo. The test clicks twice and expectsserved 1and thenserved 2.pnpm typecheckis clean, andoxfmtis clean on the changed files.@solidjs/vite-plugin(start: { devtools: true }, a real'use server'function,action+refresh). It hangs on the first click with the published 1.0.0 and with a local build ofmain. With this branch it counts 0, 1, 2, 3 and timers keep running.Generated by Claude Code