sveltejs / svelte · Issue No. 18649
I don't know if it's a bug or intentional, but the $effect.pending() rune is affected by promises created via fork(), even if it hasn't been committed.
This causes issues when using $effect.pending() to display a loading state.
I think $effect.pending() should not be affected by fork(), just like $state.eager().
https://svelte.dev/playground/cbfae12100cb456a8d466eb979e91957?version=5.56.9
Click "increment" to start loading the data asynchronously.
The UI is correctly updated to a loading state, thanks to $effect.pending(), and the DOM is updated when the promise resolve.
Click "fork" to start loading the data asynchronously without updating the DOM, using fork().
The DOM will not be updated until the fork is committed, except for $effect.pending() which will put the UI into an unwanted loading state.
REPL
REPL
annoyance
Relay reads this issue against the repository's contribution signals: the files it is likely to touch, how the maintainers triage work this size, and what the first contribution would exercise.
The full analysis for this issue is still being assembled. Until then, the description above and the thread on GitHub are the most reliable context.