fix: rtc creates duplicated first blocks for new journal pages (#11913)

* fix: rtc creates duplicated first blocks for new journal pages

The root cause is that those blocks from different clients have
different ids. Instead of using persistent block id, this fix avoids
generating the first block until users really start editing it.

* fix: add button not displayed when the last block is not empty

* fix: e2e tests

* enhance: remove dummy block

* fix: open-last-block
This commit is contained in:
Tienson Qin
2025-06-02 14:19:19 +08:00
committed by GitHub
parent b68d08861c
commit 8eee397b45
31 changed files with 203 additions and 321 deletions

View File

@@ -542,8 +542,7 @@
(p/let [result (cond
create-class?
(db-page-handler/<create-class! class
{:redirect? false
:create-first-block? false})
{:redirect? false})
create-whiteboard? (whiteboard-handler/<create-new-whiteboard-and-redirect! @!input)
create-page? (page-handler/<create! @!input {:redirect? true}))]
(shui/dialog-close! :ls-dialog-cmdk)