Angular query: Optimistic updates are not synchronous
Mantenedores costumam responder em até 1 dia
@benjavicente já está trabalhando nisso.
Desde 2/10/2026.
- #9893 de @arnoud-dv — fechado sem integrar
Avaliação
Esta issue ainda não foi avaliada.
Descrição
Describe the bug
Here's a stackblitz that repro's the issue about 20% of the time (I think it's timing related): https://stackblitz.com/edit/stackblitz-starters-hn17w1mv?file=src%2Fmain.ts,src%2Findex.html
If you click "edit" and change the "whatever" to just "1", then tab out to trigger blur, you'll see the "whatever" show up for 1 frame. I think this is happening because the optimistic update (which should set the title to "1") is not happening until the next frame. So when I set the "isEditingTitle" signal to false, it flickers the old title for 1 frame. I would expect the optimistic update to be immediate and synchronous, like how normal signals behave, so this flicker never happens.
Generally speaking, this can happen whenever you have a UX that let's the user preview an edit before committing it. In this case, the preview is the input text box, and commiting it is blurring. It would be even more noticeable if the input field looked exactly like the non-editing text.
What are people's thoughts on this? Is this not a use case many encounter?
Your minimal, reproducible example
Steps to reproduce
- Click the "edit" button
- Change "whatever" to just "w"
- Press Tab to trigger blur and finish editing.
Expected behavior
20% of the time, you'll see "whatever" show up for 1 frame. Desired behavior: I would expect the optimistic update to immediately take effect, and the text immediately shows "w".
How often does this bug happen?
Sometimes
Screenshots or Videos
No response
Platform
- OS: macOS
- Browser: Google Chrome, Version 141.0.7390.54 (Official Build) (arm64)
Tanstack Query adapter
angular-query
TanStack Query version
^5.69.1
TypeScript version
^5.6.3
Additional context
No response
- Linguagem predominante
- TypeScript
- Estrelas
- 50.4k
- Forks
- 4.3k
- Merge médio
- 11h 37min
- PRs com merge (30d)
- 521
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de TanStack/query
-
QueryClient.isFetching and useIsFetching accept a fetchStatus filter and ignore itTalvez já em andamento @Apu-Emdad assumiu há 6 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
solid-query: STRICT_READ_UNTRACKED on Solid 2 — client()/options() read in component body (useMutation, useBaseQuery)Talvez livre de novo @LeonxLJX assumiu há 46 dias e não há nenhum pull request aberto. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
TanStack/query#11358 · 2 comentários · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
solid-query 6.0.0-rc.5: onCacheEvent throws NotReadyError during a Solid 2 (rc.14+) transition landingTalvez já em andamento @UzumakiODZ assumiu há 5 dias. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 28/100
TanStack/query#12031 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
Explicit gcTime schedules a GC timer during SSR, retaining the whole render in memoryTalvez já em andamento @AdzerKI assumiu há 6 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 25/100
TanStack/query#12025 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
restoreQueries and persisterGc throw on malformed persisted entriesTalvez já em andamento @VGontier-cmd assumiu há 14 dias. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
Todas as issues de TanStack/query
Issues semelhantes
-
Sequências em espanhol: «Atualizado em», a aba «Fila» e o valor 'pause' ainda saem em portuguêsAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
melgarafael/DeskcommCRM#3104 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
bug service: webapp
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Ocelot-Social-Community/Ocelot-Social#10684 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
nicobailon/pi-subagents#2978 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
getsentry/sentry-conventions#732 · 1 comentário ·
Mantenedores costumam responder em até 1 dia