solid-db useLiveQuery breaks with where + orderBy
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- typescript
- Área
- frontend
Línea de trabajo
Comienza con el repositorio de reproducción enlazado y ejecuta pnpm install && pnpm dev; después, reproduce el fallo usando cuatro componentes List y las acciones decrement all y change name. Lee la ruta de sincronización de useLiveQuery y compara el comportamiento con la actualización manual Array.from(collection.entries()) descrita en el issue. Se considera terminado cuando las consultas combinadas where y orderBy siguen siendo correctas en todos los componentes después de ambas acciones.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
- I've validated the bug against the latest version of DB packages
Describe the bug
When using the same useLiveQuery with a where and orderBy clause in multiple components, query logic tends to break.
To Reproduce
Steps to reproduce the behavior:
- Clone this repo
pnpm install && pnpm dev- Go to
localhost:3000 - Click the
decrement allbutton a few times, then click thechange namebutton a few times, UI should break unexpectedly.
Expected behavior
- The DB stores a list of items, each with an index, independent UUID (which is used as the key), and name.
- The UI contains 4 identical
<List>components, each one has auseLiveQuerythat views the list of items whose indices are between 1 and 4 inclusive. It then sorts the list items. - Clicking on
decrement allin the UI will decrement each item's index value and should update the list displays accordingly. - Clicking on
change namein the UI will add a+at the end of each item's name, it should update the list displays accordingly.
Screenshots
Initial state.
After clicking on
decrement allonce.
After clicking on
decrement allandchange namea few times.
Desktop (please complete the following information):
- OS: 25.11.20260113.2c3e5ec (Xantusia)
- Browser: Firefox
- Version: 146.0.1
Additional context
- I am not well-versed in the internals of Tanstack DB but I believe this is a
solid-dbspecific issue, as it seems like the collection itself is internally consistent,collection.subscribeChangesalso fires events correctly, and generally, everything outside ofuseLiveQueryworks appropriately. - I also have a more complex environment where I am using
@tanstack/solid-dband again, the failure seems to be concentrated within theuseLiveQuery, synchronization mechanism. If I replaceuseLiveQuerywith a manualsetState(Array.from(collection.entries())), everything updates correctly. orderByworks fine withoutwhere.whereworks withoutorderBy.- All logic works if I only have 1
<List>component.
- Lenguaje dominante
- TypeScript
- Estrellas
- 3.9k
- Forks
- 267
- Merge medio
- 1 d 5 h
- PR fusionados (30 d)
- 134
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TanStack/db
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
TanStack/db#1972 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
TanStack/db#1935 · 2 reacciones ·
Los mantenedores suelen responder en 1 día
Todos los issues de TanStack/db
Issues similares
-
area/core status/need-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
google-gemini/gemini-cli#29602 ·
Los mantenedores suelen responder en 1 día
-
area: backend enhancement priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
snapotter-hq/SnapOtter#1879 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Tencent/BrowserSkill#390 ·
Los mantenedores suelen responder en 1 día
-
good first issue status: needs triaging type: bug version: 2.0
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
medusajs/medusa#17094 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día