Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[BUG]: Analytics page keeps the previous organization's pull request data after exploring a new org

Abierto Apto para principiantes
#272 5 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 3 días

@amanbn8 ya está trabajando en esto.

Desde el 1/10/2026.

  • #279 de @amanbn8 — abierto

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
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 hasPullsData is 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
  1. With no PAT configured, explore AOSSIE-Org from the Quick explore buttons.
  2. Open Analytics and click "Collect Advanced Metrics". Wait for the merge time and acceptance rate cards to appear.
  3. Go back to Home and explore DjedAlliance.
  4. 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
  • main at 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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de AOSSIE-Org/OrgExplorer

Todos los issues de AOSSIE-Org/OrgExplorer

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.