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

Đang mở
#1,542 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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!)
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
29
Fork
2
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của logseq/db-test

Tất cả issue của logseq/db-test

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.