Toggle open blocks on long page causes two bugs including a crash
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 45k
- Forks
- 2.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 105
Description
### What happened?
I tried toggling open blocks on https://docs.logseq.com/#/page/changelog to get an overview of the page. I encountered two bugs
### Reproduce the Bug
1. Go to https://docs.logseq.com/#/page/changelog page in docs graph
2. Run `Toggle open blocks` command to close blocks
3. First bug: Only first 3 top-level blocks are shown as collapsed and other top level blocks are not visible
4. Run `Toggle open blocks` command to open blocks
5. Encounter crash `Error caught by UI! Error: Assert failed: Each block should have a different left node (= (count blocks) (count (set (map :block/left blocks))))`
### Expected Behavior
I can close and expand blocks on a long page and see all top-level blocks correctly
### Screenshots
_No response_
### Desktop Platform Information
osx 12.0.1
### Mobile Platform Information
_No response_
### Additional Context
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue on the docs graph's long changelog page and inspect the implementation of the `Toggle open blocks` command alongside the reported UI assertion. Done means all top-level blocks remain visible when collapsed and expanded, with no crash or duplicate left-node assertion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100