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

Aperta
#1,542 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Ambito
backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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!)
Lingua principale
Nessun dato sulla lingua
Stelle
29
Fork
2
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di logseq/db-test

Tutte le issue di logseq/db-test

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.