Mapper: a project's saved log was reduced to one entry, possibly by a log write before the log had loaded

Abierto
#2,995 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
34/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
javascript, react
Área
backend, frontend

Línea de trabajo

Start in oclmap MapProject.jsx, reading fetchAndSetProject, projectLog and postProjectLogs and checking where projectLogsLoadedRef is set and read. Reproduce by delaying the logs/ response and taking a logged action before it returns. The fix also touches oclapi2 MapProjectLogsView.create. Done when a logged action taken before the load never removes saved project or row log entries, and its own entry survives the load.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

component/mapper decision/ai-ready signal/well-specified stage/triaged type/bug

On staging on 2026-11-02 (Mapper 1.0.44), after AutoMatch and decisions, a project that was reopened and downloaded as CSV about a second later had only the downloaded entry in its saved log. Seen once; a rerun kept its entries. Found by the weekly staging run (OpenConceptLab/ocl_online#445).

Suspected cause, from reading the code; not reproduced. Opening a project loads logs/ in the background, but projectLog() doesn't wait for it: it POSTs the whole log as it has it so far, and the API replaces what's stored. The same POST carries the row logs, so they would be lost too.

Acceptance criteria

  • Reproduce it by delaying the logs/ response and taking a logged action, or show the cause is something else.
  • A logged action taken before logs/ has loaded never removes saved project or row log entries.
  • That action's own entry is kept once the log has loaded.

Components: oclmap MapProject.jsx (fetchAndSetProject, projectLog, postProjectLogs; projectLogsLoadedRef already tracks the load) and oclapi2 MapProjectLogsView.create. Two ways to fix it: hold log writes until the load finishes, or have the API append.

Lenguaje dominante
Sin datos de lenguaje
Estrellas
4
Forks
2
Merge medio
2 h 12 min
PR fusionados (30 d)
1

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 OpenConceptLab/ocl_issues

Todos los issues de OpenConceptLab/ocl_issues

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.