Ignore stale responses in loadStatus when status reads overlap
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- electron, javascript, react
- Área
- frontend
Línea de trabajo
Start in src/renderer/hooks/use-site-status.jsx and read loadStatus to see where each response writes state, metaPatchRef and statusLoading. Then follow the callers: the focus reload in index.jsx, the build-end reload in use-site-scripts.jsx, and the site:status handler in main.js that reads meta before Git. Done means a counter in a ref lets only the latest call apply its result, and the setup chain in index.jsx no longer acts on a superseded response.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
loadStatus in src/renderer/hooks/use-site-status.jsx applies every response it gets, in the order they come back. Two calls can overlap, for example the window-focus reload (index.jsx) and the reload a build's end triggers (use-site-scripts.jsx). If the older one finishes last, it puts back the state it read before the newer one.
What that can show:
buildFailed,installFailedorhasBuiltfrom before a build or install ended, so the setup checklist reads a failed build as complete, or the other way round.statusLoadingcleared by the older call while the newer one is still running.
site:status in main.js reads the site's meta before its Git reads, so an older call can read the meta before the outcome is written and still finish after the newer call.
Found by CodeRabbit on #716, which made buildFailed come from loadStatus like installFailed already does. It was deferred there because the race exists on trunk for the other fields too.
A likely fix: a request counter in a ref, applying the state, metaPatchRef and statusLoading only for the latest call. The callers that use the returned status (the setup chain in index.jsx) need checking too, so they don't act on a response that has been superseded.
- Lenguaje dominante
- JavaScript
- Estrellas
- 66
- Forks
- 20
- Merge medio
- 1 d 18 h
- PR fusionados (30 d)
- 22
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 WordPress/contributor-toolkit
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
WordPress/contributor-toolkit#762 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
WordPress/contributor-toolkit#747 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
WordPress/contributor-toolkit#746 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
WordPress/contributor-toolkit#741 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
WordPress/contributor-toolkit#726 ·
Los mantenedores suelen responder en 1 día
Todos los issues de WordPress/contributor-toolkit
Issues similares
-
from-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
andromarces/agent-loops#1928 ·
Los mantenedores suelen responder en 1 día
-
enhancement help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
laaielichter/AgentHaven#79 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
microsoft/playwright#44109 ·
Los mantenedores suelen responder en 1 día
-
Intl spec updatesAbiertoContent:JS goal: up-to-date needs BCD update
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día