2.0.0-rc.21: isPending clears before a changed optimistic result is revealed
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, typescript
- Ambito
- frontend
Direzione di ricerca
Start by reading the isPending implementation and the optimistic memo handling that feeds it; the issue does not name files or tests, so trace those entry points from the reproduction. Reproduce with the linked playground and check how pending state changes when the memo resolves at 500 ms while its displayed value remains 0. Done means pending stays true until the changed value is revealed at 1000 ms, with a regression test covering this sequence.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
An async memo derived from an optimistic value can report isPending(left) === false while its changed result is still held and the UI displays the previous value.
In the repro, left and right feed a shared total memo. Left resolves to 10 after 500 ms, but its displayed value remains 0 until right resolves after 1000 ms. Pending clears at 500 ms, before that change is revealed.
Your Example Website or App
https://s.olid.uk/id/U6ma1avLRKuXWGhrzWMEkQ
Steps to Reproduce the Bug or Issue
- Open the repro and click Run.
- Initially, left shows
0, left pending istrue, and total is0. - After 500 ms, left pending becomes
false, but left and total still show0. - After 1000 ms, left changes to
10and total to30, even though left pending had already becomefalse.
The final values stay visible; reload to repeat.
Expected behavior
isPending(left) should stay true until the changed value 10 is revealed at 1000 ms.
Clearing pending early when the answer equals the displayed value is valid, but this answer is different: the displayed value is 0 and the ready answer is 10.
Screenshots or Videos
No response
Platform
- Solid: 2.0.0-rc.21 (pinned in the repro)
- OS: Debian GNU/Linux 13
- Browser: Chromium 154.0.8037.57
Additional context
The action intentionally waits on a never-resolving promise so the optimistic values do not revert after the demonstration. Both memo requests resolve normally, at 500 ms and 1000 ms.
Verified in the hosted playground. Tailwind is disabled.
- Lingua principale
- TypeScript
- Stelle
- 36.2k
- Fork
- 1.1k
- Merge medio
- 9h 56m
- PR unite (30g)
- 487
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di solidjs/solid
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 22/100
I maintainer di solito rispondono entro 1 giorno
-
What gets passed to the `when` prop of a `Show` still gets executed twice on SSRForse già presa @brenelz l’ha presa 5 giorni fa. Aperta1.x
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
solidjs/solid#4447 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di solidjs/solid
Issue simili
-
Report: &TV InternationalApertacheck:passed streams:remove
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
bug priority-p1
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
beginner blocked
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
hiero-ledger/hiero-sdk-js#4670 ·
I maintainer di solito rispondono entro 1 giorno
-
[Exploratory] Expense - 2 selected drop-down is shown twice when selecting hold from more option.ApertaMonthly Not a priority
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Expensify/App#106080 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno