[BUG]: Analytics page keeps the previous organization's pull request data after exploring a new org
Los mantenedores suelen responder en 3 días
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 90/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript
- Área
- frontend
Línea de trabajo
Comienza en src/context/AppContext.jsx e inspecciona el bloque de restablecimiento en explore(), donde se eliminan model, organizations e issuesData. Asegúrate de que el estado de pull request también se elimine al cambiar de organización. Verifícalo reproduciendo el flujo de AOSSIE-Org a DjedAlliance sin un PAT: Advanced Analytics debería estar vacío y ofrecer “Collect Advanced Metrics”, y los valores obsoletos no deberían volver a aparecer después de recargar.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug Description
When you explore a new organization, explore() in src/context/AppContext.jsx resets the model, the org list and issuesData, but it never resets pullsData. Whatever pull request data was collected for the previous organization stays in state and is shown under the new one.
On the Analytics page this means:
- The "Average PR Merge Time" and "Pull Request Acceptance Rate" cards show the previous org's numbers.
- The repository dropdown in the Advanced Analytics section still lists the previous org's repositories.
- Because
hasPullsDatais true, the "Collect Advanced Metrics" button is hidden. Without a PAT there is then no way to fetch pull data for the new org, since the banner's "Run Complete Analysis" needs a PAT.
The persist effect also writes the stale pullsData into the analysis cache together with the new org, so the wrong data comes back after a reload.
The reset block at the top of explore() is currently:
setLoading(true);
setError('');
setModel(null);
setOrgs([]);
setIssuesData({});
setLastOrgNames(orgNames);
setAuditComplete(false);
setAdvanceAnalyticsComplete(false);
There is no setPullsData({}). pullsData is only written by runAdvanceAnalytics, runFullAnalytics and the cache restore effect, so nothing else clears it either.
Steps to Reproduce
- With no PAT configured, explore AOSSIE-Org from the Quick explore buttons.
- Open Analytics and click "Collect Advanced Metrics". Wait for the merge time and acceptance rate cards to appear.
- Go back to Home and explore DjedAlliance.
- Open Analytics again.
Expected: the Advanced Analytics section is empty and offers "Collect Advanced Metrics" for DjedAlliance.
Actual: the Overview page correctly shows Djed Alliance with 35 repos, but the Analytics page still shows AOSSIE-Org's data. The repository dropdown lists Website, EduAid, Resonate, PictoPy, DebateAI, Agora-Blockchain, InPactAI, Devr.AI, Resonate-Website and BabyNest (all AOSSIE-Org repos), the cards read "14.2 Days" average merge time and "49.6 %" acceptance based on 273 merged / 277 rejected AOSSIE-Org pull requests, and the "Collect Advanced Metrics" button is gone. Reloading the page brings the same stale numbers back from the cache.
Logs and Screenshots
No console errors, the stale data just renders.
Environment Details
mainat 95a980d,npm run dev- Chromium on macOS, no PAT configured
Impact
High - Major feature is broken
Code of Conduct
- I have joined the Discord server and will post updates there
- I have searched existing issues to avoid duplicates
The fix looks like a one-liner: add setPullsData({}) to the reset block in explore(). I'd be happy to open a PR for it if this is confirmed.
- Lenguaje dominante
- JavaScript
- Estrellas
- 45
- Forks
- 148
- Merge medio
- 5 d 20 h
- PR fusionados (30 d)
- 27
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 AOSSIE-Org/OrgExplorer
-
[BUG]: Overview "Language Distribution" percentages are relative to the top-7 languages, not all reposPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
AOSSIE-Org/OrgExplorer#402 ·
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
AOSSIE-Org/OrgExplorer#401 ·
Los mantenedores suelen responder en 3 días
-
[BUG]: Overview wrongly lists a successfully-loaded org as "could not be loaded" (case / duplicate)Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
AOSSIE-Org/OrgExplorer#400 ·
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
AOSSIE-Org/OrgExplorer#399 ·
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
AOSSIE-Org/OrgExplorer#398 ·
Los mantenedores suelen responder en 3 días
Todos los issues de AOSSIE-Org/OrgExplorer
Issues similares
-
type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
Update to mocha 12.xAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
rescript-lang/rescript#8996 ·
Los mantenedores suelen responder en 1 día
-
Add: Ministerstvoidey.ruAbiertocheck:passed logos:add
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100