Merging a block into a parent with children corrupts the child hierarchy (Missing direct-children parent)

Abierto
#1,542 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
1-2 días
Aptitud para principiantes
52/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Área
backend

Línea de trabajo

Start by reproducing the block structure A, B, with C nested under B, then merge A and B with Delete and inspect the failed operation for “Missing direct-children parent.” The payload does not name relevant files or tests, so trace the merge operation from that error to find where the child hierarchy is updated. Done means B remains editable after the merge.

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

Descripción

Search first
  • I searched and no similar issues were found
What Happened?

I noticed that some blocks become uneditable when editing them. Any changes appear for a short time, and then it goes back to the previous content. Creating new child blocks under the affected blocks also fails.

The issue occurs even when:
all plugins are disabled,
Logseq Sync reports a healthy/green state,
Logseq has been restarted.

In the browser developer tools, failed operations show this response:

{
    "ok": false,
    "error": {
        "code": "exception",
        "message": "Missing direct-children parent"
    }
}
Reproduce the Bug

Create the following structure:

Plain Text

A
B
    C

Place the cursor at the end of A and press Delete so that A and B are merged:

CA
    B

Now B becomes uneditable

Expected Behavior

After merging C and A, B stays editable

Screenshots

https://github.com/user-attachments/assets/9253cfb1-c3cf-4e27-a926-4935037d9201

Files

No response

Browser, Desktop or Mobile Platform Information

Linux (openSUSE), Appimage, Logseq Desktop 2.0.2 Beta

Additional Context

No response

Are you willing to submit a PR? If you know how to fix the bug.
  • I'm willing to submit a PR (Thank you!)
Lenguaje dominante
Sin datos de lenguaje
Estrellas
29
Forks
2
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 logseq/db-test

Todos los issues de logseq/db-test

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.