Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
chore: bump collab (#6246)
Nathan.fooo5d42d03e15cf
diff --git a/frontend/appflowy_flutter/macos/Podfile.lock b/frontend/appflowy_flutter/macos/Podfile.lockindex 615bfca955..0fc6b09590 100644--- a/frontend/appflowy_flutter/macos/Podfile.lock+++ b/frontend/appflowy_flutter/macos/Podfile.lock@@ -142,7 +142,7 @@ SPEC CHECKSUMS:HotKey: e96d8a2ddbf4591131e2bb3f54e69554d90cdca6hotkey_manager: c32bf0bfe8f934b7bc17ab4ad5c4c142960b023cirondash_engine_context: da62996ee25616d2f01bbeb85dc115d813359478- local_notifier: e9506bc66fc70311e8bc7291fb70f743c081e4ff+ local_notifier: c6c371695f914641ab7bc8601944f7e358632d0bpackage_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0cpath_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147cReachabilitySwift: 7f151ff156cea1481a8411701195ac6a984f4979diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.lock b/frontend/appflowy_tauri/src-tauri/Cargo.lockindex f6d17280be..47eced7291 100644--- a/frontend/appflowy_tauri/src-tauri/Cargo.lock+++ b/frontend/appflowy_tauri/src-tauri/Cargo.lock@@ -172,7 +172,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"[[package]]name = "app-error"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","bincode",@@ -192,7 +192,7 @@ dependencies = [[[package]]name = "appflowy-ai-client"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","bytes",@@ -837,7 +837,7 @@ dependencies = [[[package]]name = "client-api"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["again","anyhow",@@ -888,7 +888,7 @@ dependencies = [[[package]]name = "client-api-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["collab-entity","collab-rt-entity",@@ -901,7 +901,7 @@ dependencies = [[[package]]name = "client-websocket"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["futures-channel","futures-util",@@ -975,7 +975,7 @@ dependencies = [[[package]]name = "collab"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","arc-swap",@@ -1000,7 +1000,7 @@ dependencies = [[[package]]name = "collab-database"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","async-trait",@@ -1030,7 +1030,7 @@ dependencies = [[[package]]name = "collab-document"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","arc-swap",@@ -1050,7 +1050,7 @@ dependencies = [[[package]]name = "collab-entity"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","bytes",@@ -1069,7 +1069,7 @@ dependencies = [[[package]]name = "collab-folder"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","arc-swap",@@ -1112,7 +1112,7 @@ dependencies = [[[package]]name = "collab-plugins"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","async-stream",@@ -1150,7 +1150,7 @@ dependencies = [[[package]]name = "collab-rt-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","bincode",@@ -1175,7 +1175,7 @@ dependencies = [[[package]]name = "collab-rt-protocol"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","async-trait",@@ -1192,7 +1192,7 @@ dependencies = [[[package]]name = "collab-user"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","collab",@@ -1447,7 +1447,7 @@ dependencies = ["cssparser-macros","dtoa-short","itoa 1.0.6",- "phf 0.11.2",+ "phf 0.8.0","smallvec",]@@ -1572,12 +1572,13 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"[[package]]name = "database-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","app-error","appflowy-ai-client","bincode",+ "bytes","chrono","collab-entity","serde",@@ -3123,7 +3124,7 @@ dependencies = [[[package]]name = "gotrue"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","futures-util",@@ -3140,7 +3141,7 @@ dependencies = [[[package]]name = "gotrue-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","app-error",@@ -3572,7 +3573,7 @@ dependencies = [[[package]]name = "infra"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","bytes",@@ -6176,7 +6177,7 @@ dependencies = [[[package]]name = "shared-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","app-error",diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.toml b/frontend/appflowy_tauri/src-tauri/Cargo.tomlindex 1c13a247ed..b5530d1226 100644--- a/frontend/appflowy_tauri/src-tauri/Cargo.toml+++ b/frontend/appflowy_tauri/src-tauri/Cargo.toml@@ -58,7 +58,7 @@ collab-user = { version = "0.2" }# Run the script:# scripts/tool/update_client_api_rev.sh new_rev_id# ⚠️⚠️⚠️️-client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "886376e8bd95ef633aa4b3d7a8377f1003764748" }+client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "3f59c650f4fb38171310607d709f57836418ee7f" }[dependencies]serde_json.workspace = true@@ -119,13 +119,13 @@ custom-protocol = ["tauri/custom-protocol"]# To switch to the local path, run:# scripts/tool/update_collab_source.sh# ⚠️⚠️⚠️️-collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }-collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }-collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }-collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }-collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }-collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }-collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }+collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }+collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }+collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }+collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }+collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }+collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }+collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }# Working directory: frontend# To update the commit ID, run:diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.lock b/frontend/appflowy_web_app/src-tauri/Cargo.lockindex 69d7f05ca4..f278698844 100644--- a/frontend/appflowy_web_app/src-tauri/Cargo.lock+++ b/frontend/appflowy_web_app/src-tauri/Cargo.lock@@ -163,7 +163,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"[[package]]name = "app-error"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","bincode",@@ -183,7 +183,7 @@ dependencies = [[[package]]name = "appflowy-ai-client"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","bytes",@@ -811,7 +811,7 @@ dependencies = [[[package]]name = "client-api"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["again","anyhow",@@ -862,7 +862,7 @@ dependencies = [[[package]]name = "client-api-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["collab-entity","collab-rt-entity",@@ -875,7 +875,7 @@ dependencies = [[[package]]name = "client-websocket"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["futures-channel","futures-util",@@ -958,7 +958,7 @@ dependencies = [[[package]]name = "collab"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","arc-swap",@@ -983,7 +983,7 @@ dependencies = [[[package]]name = "collab-database"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","async-trait",@@ -1013,7 +1013,7 @@ dependencies = [[[package]]name = "collab-document"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","arc-swap",@@ -1033,7 +1033,7 @@ dependencies = [[[package]]name = "collab-entity"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","bytes",@@ -1052,7 +1052,7 @@ dependencies = [[[package]]name = "collab-folder"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","arc-swap",@@ -1095,7 +1095,7 @@ dependencies = [[[package]]name = "collab-plugins"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","async-stream",@@ -1133,7 +1133,7 @@ dependencies = [[[package]]name = "collab-rt-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","bincode",@@ -1158,7 +1158,7 @@ dependencies = [[[package]]name = "collab-rt-protocol"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","async-trait",@@ -1175,7 +1175,7 @@ dependencies = [[[package]]name = "collab-user"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","collab",@@ -1437,7 +1437,7 @@ dependencies = ["cssparser-macros","dtoa-short","itoa 1.0.10",- "phf 0.8.0",+ "phf 0.11.2","smallvec",]@@ -1562,12 +1562,13 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5"[[package]]name = "database-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","app-error","appflowy-ai-client","bincode",+ "bytes","chrono","collab-entity","serde",@@ -3190,7 +3191,7 @@ dependencies = [[[package]]name = "gotrue"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","futures-util",@@ -3207,7 +3208,7 @@ dependencies = [[[package]]name = "gotrue-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","app-error",@@ -3644,7 +3645,7 @@ dependencies = [[[package]]name = "infra"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","bytes",@@ -6240,7 +6241,7 @@ dependencies = [[[package]]name = "shared-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","app-error",diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.toml b/frontend/appflowy_web_app/src-tauri/Cargo.tomlindex f5ff8ed8c4..d6b4421908 100644--- a/frontend/appflowy_web_app/src-tauri/Cargo.toml+++ b/frontend/appflowy_web_app/src-tauri/Cargo.toml@@ -57,7 +57,7 @@ collab-user = { version = "0.2" }# Run the script:# scripts/tool/update_client_api_rev.sh new_rev_id# ⚠️⚠️⚠️️-client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "886376e8bd95ef633aa4b3d7a8377f1003764748" }+client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "3f59c650f4fb38171310607d709f57836418ee7f" }[dependencies]serde_json.workspace = true@@ -117,13 +117,13 @@ custom-protocol = ["tauri/custom-protocol"]# To switch to the local path, run:# scripts/tool/update_collab_source.sh# ⚠️⚠️⚠️️-collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }-collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }-collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }-collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }-collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }-collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }-collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }+collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }+collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }+collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }+collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }+collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }+collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }+collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }# Working directory: frontend# To update the commit ID, run:diff --git a/frontend/rust-lib/Cargo.lock b/frontend/rust-lib/Cargo.lockindex 35b4ddc5d2..76713383b0 100644--- a/frontend/rust-lib/Cargo.lock+++ b/frontend/rust-lib/Cargo.lock@@ -163,7 +163,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"[[package]]name = "app-error"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","bincode",@@ -183,7 +183,7 @@ dependencies = [[[package]]name = "appflowy-ai-client"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","bytes",@@ -729,7 +729,7 @@ dependencies = [[[package]]name = "client-api"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["again","anyhow",@@ -780,7 +780,7 @@ dependencies = [[[package]]name = "client-api-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["collab-entity","collab-rt-entity",@@ -793,7 +793,7 @@ dependencies = [[[package]]name = "client-websocket"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["futures-channel","futures-util",@@ -836,7 +836,7 @@ dependencies = [[[package]]name = "collab"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","arc-swap",@@ -861,7 +861,7 @@ dependencies = [[[package]]name = "collab-database"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","async-trait",@@ -891,7 +891,7 @@ dependencies = [[[package]]name = "collab-document"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","arc-swap",@@ -911,7 +911,7 @@ dependencies = [[[package]]name = "collab-entity"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","bytes",@@ -930,7 +930,7 @@ dependencies = [[[package]]name = "collab-folder"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","arc-swap",@@ -973,7 +973,7 @@ dependencies = [[[package]]name = "collab-plugins"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","async-stream",@@ -1011,7 +1011,7 @@ dependencies = [[[package]]name = "collab-rt-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","bincode",@@ -1036,7 +1036,7 @@ dependencies = [[[package]]name = "collab-rt-protocol"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","async-trait",@@ -1053,7 +1053,7 @@ dependencies = [[[package]]name = "collab-user"version = "0.2.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ee6028e4ed0b45294f27fe89bda241b770bf5625#ee6028e4ed0b45294f27fe89bda241b770bf5625"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5f3e7163e3a408a08423d079eb41068fb86e562b#5f3e7163e3a408a08423d079eb41068fb86e562b"dependencies = ["anyhow","collab",@@ -1396,12 +1396,13 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"[[package]]name = "database-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","app-error","appflowy-ai-client","bincode",+ "bytes","chrono","collab-entity","serde",@@ -2802,7 +2803,7 @@ dependencies = [[[package]]name = "gotrue"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","futures-util",@@ -2819,7 +2820,7 @@ dependencies = [[[package]]name = "gotrue-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","app-error",@@ -3184,7 +3185,7 @@ dependencies = [[[package]]name = "infra"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","bytes",@@ -5399,7 +5400,7 @@ dependencies = [[[package]]name = "shared-entity"version = "0.1.0"-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=886376e8bd95ef633aa4b3d7a8377f1003764748#886376e8bd95ef633aa4b3d7a8377f1003764748"+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"dependencies = ["anyhow","app-error",diff --git a/frontend/rust-lib/Cargo.toml b/frontend/rust-lib/Cargo.tomlindex 8aaed42f60..83727ebc17 100644--- a/frontend/rust-lib/Cargo.toml+++ b/frontend/rust-lib/Cargo.toml@@ -105,8 +105,8 @@ dashmap = "6.0.1"# Run the script.add_workspace_members:# scripts/tool/update_client_api_rev.sh new_rev_id# ⚠️⚠️⚠️️-client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "886376e8bd95ef633aa4b3d7a8377f1003764748" }-client-api-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "886376e8bd95ef633aa4b3d7a8377f1003764748" }+client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "3f59c650f4fb38171310607d709f57836418ee7f" }+client-api-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "3f59c650f4fb38171310607d709f57836418ee7f" }[profile.dev]opt-level = 0@@ -141,13 +141,13 @@ rocksdb = { git = "https://github.com/rust-rocksdb/rust-rocksdb", rev = "1710120# To switch to the local path, run:# scripts/tool/update_collab_source.sh# ⚠️⚠️⚠️️-collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }-collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }-collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }-collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }-collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }-collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }-collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ee6028e4ed0b45294f27fe89bda241b770bf5625" }+collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }+collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }+collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }+collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }+collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }+collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }+collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5f3e7163e3a408a08423d079eb41068fb86e562b" }# Working directory: frontend# To update the commit ID, run:diff --git a/frontend/rust-lib/collab-integrate/src/collab_builder.rs b/frontend/rust-lib/collab-integrate/src/collab_builder.rsindex dc18fcbed3..55abed6e00 100644--- a/frontend/rust-lib/collab-integrate/src/collab_builder.rs+++ b/frontend/rust-lib/collab-integrate/src/collab_builder.rs@@ -186,7 +186,10 @@ impl AppFlowyCollabBuilder {let expected_collab_type = CollabType::Folder;assert_eq!(object.collab_type, expected_collab_type);let collab = self.build_collab(&object, &collab_db, doc_state)?;- let folder = Folder::open_with(object.uid, collab, folder_notifier, folder_data);+ let folder = match folder_data {+ None => Folder::open(object.uid, collab, folder_notifier)?,+ Some(data) => Folder::create(object.uid, collab, folder_notifier, data),+ };let folder = Arc::new(RwLock::new(folder));self.finalize(object, builder_config, folder)}@@ -207,7 +210,7 @@ impl AppFlowyCollabBuilder {let expected_collab_type = CollabType::UserAwareness;assert_eq!(object.collab_type, expected_collab_type);let collab = self.build_collab(&object, &collab_db, doc_state)?;- let user_awareness = UserAwareness::open(collab, notifier);+ let user_awareness = UserAwareness::create(collab, notifier)?;let user_awareness = Arc::new(RwLock::new(user_awareness));self.finalize(object, builder_config, user_awareness)}diff --git a/frontend/rust-lib/flowy-database2/src/event_handler.rs b/frontend/rust-lib/flowy-database2/src/event_handler.rsindex 1ed079e4c0..e369e090ea 100644--- a/frontend/rust-lib/flowy-database2/src/event_handler.rs+++ b/frontend/rust-lib/flowy-database2/src/event_handler.rs@@ -2,7 +2,7 @@ use collab_database::rows::{Cell, RowId};use lib_infra::box_any::BoxAny;use std::sync::{Arc, Weak};use tokio::sync::oneshot;-use tracing::{error, trace};+use tracing::{error, info, trace};use flowy_error::{FlowyError, FlowyResult};use lib_dispatch::prelude::{af_spawn, data_result_ok, AFPluginData, AFPluginState, DataResult};@@ -35,7 +35,7 @@ pub(crate) async fn get_database_data_handler(let database_id = manager.get_database_id_with_view_id(view_id.as_ref()).await?;- let database_editor = manager.get_database_editor(&database_id).await?;+ let database_editor = manager.get_or_init_database_editor(&database_id).await?;let data = database_editor.open_database_view(view_id.as_ref(), None).await?;@@ -58,7 +58,7 @@ pub(crate) async fn get_all_rows_handler(let database_id = manager.get_database_id_with_view_id(view_id.as_ref()).await?;- let database_editor = manager.get_database_editor(&database_id).await?;+ let database_editor = manager.get_or_init_database_editor(&database_id).await?;let row_details = database_editor.get_all_rows(view_id.as_ref()).await?;let rows = row_details.into_iter()@@ -1239,7 +1239,9 @@ pub(crate) async fn get_related_row_datas_handler() -> DataResult<RepeatedRelatedRowDataPB, FlowyError> {let manager = upgrade_manager(manager)?;let params: GetRelatedRowDataPB = data.into_inner();- let database_editor = manager.get_database_editor(¶ms.database_id).await?;+ let database_editor = manager+ .get_or_init_database_editor(¶ms.database_id)+ .await?;let row_datas = database_editor.get_related_rows(Some(¶ms.row_ids)).await?;@@ -1253,10 +1255,14 @@ pub(crate) async fn get_related_database_rows_handler() -> DataResult<RepeatedRelatedRowDataPB, FlowyError> {let manager = upgrade_manager(manager)?;let database_id = data.into_inner().value;- let database_editor = manager.get_database_editor(&database_id).await?;- let row_datas = database_editor.get_related_rows(None).await?;- data_result_ok(RepeatedRelatedRowDataPB { rows: row_datas })+ info!(+ "[Database]: get related database rows from database_id: {}",+ database_id+ );+ let database_editor = manager.get_or_init_database_editor(&database_id).await?;+ let rows = database_editor.get_related_rows(None).await?;+ data_result_ok(RepeatedRelatedRowDataPB { rows })}pub(crate) async fn summarize_row_handler(diff --git a/frontend/rust-lib/flowy-database2/src/manager.rs b/frontend/rust-lib/flowy-database2/src/manager.rsindex 019be4a518..c90853a93c 100644--- a/frontend/rust-lib/flowy-database2/src/manager.rs+++ b/frontend/rust-lib/flowy-database2/src/manager.rs@@ -185,7 +185,12 @@ impl DatabaseManager {pub async fn get_database_id_with_view_id(&self, view_id: &str) -> FlowyResult<String> {let lock = self.workspace_database()?;let wdb = lock.read().await;- wdb.get_database_id_with_view_id(view_id).ok_or_else(|| {+ let database_id = wdb.get_database_id_with_view_id(view_id);+ info!(+ "[Database]: get database id:{:?} with view id:{}",+ database_id, view_id+ );+ database_id.ok_or_else(|| {FlowyError::record_not_found().with_context(format!("The database for view id: {} not found", view_id))})@@ -201,10 +206,13 @@ impl DatabaseManager {view_id: &str,) -> FlowyResult<Arc<DatabaseEditor>> {let database_id = self.get_database_id_with_view_id(view_id).await?;- self.get_database_editor(&database_id).await+ self.get_or_init_database_editor(&database_id).await}- pub async fn get_database_editor(&self, database_id: &str) -> FlowyResult<Arc<DatabaseEditor>> {+ pub async fn get_or_init_database_editor(+ &self,+ database_id: &str,+ ) -> FlowyResult<Arc<DatabaseEditor>> {if let Some(editor) = self.editors.lock().await.get(database_id).cloned() {return Ok(editor);}@@ -766,17 +774,17 @@ impl DatabaseCollabService for WorkspaceDatabaseCollabServiceImpl {}.into()} else {- trace!(- "build collab: fetch {}:{} from remote",- collab_type,- object_id+ info!(+ "build collab: fetch {}:{} from remote, is_new:{}",+ collab_type, object_id, is_new,);match self.get_encode_collab(object_id, collab_type.clone()).await {Ok(Some(encode_collab)) => {- trace!(- "build collab: {}:{} with remote encode collab",+ info!(+ "build collab: {}:{} with remote encode collab, {} bytes",collab_type,- object_id+ object_id,+ encode_collab.doc_state.len());DataSource::from(encode_collab)},diff --git a/frontend/rust-lib/flowy-database2/src/services/database/database_observe.rs b/frontend/rust-lib/flowy-database2/src/services/database/database_observe.rsindex 7a1a9d22b2..4d3a011ed5 100644--- a/frontend/rust-lib/flowy-database2/src/services/database/database_observe.rs+++ b/frontend/rust-lib/flowy-database2/src/services/database/database_observe.rs@@ -43,113 +43,120 @@ pub(crate) async fn observe_rows_change(let notification_sender = notification_sender.clone();let database_id = database_id.to_string();let weak_database = Arc::downgrade(database);- let mut row_change = database.read().await.subscribe_row_change();- af_spawn(async move {- while let Ok(row_change) = row_change.recv().await {- if let Some(database) = weak_database.upgrade() {- trace!(- "[Database Observe]: {} row change:{:?}",- database_id,- row_change- );- match row_change {- RowChange::DidUpdateCell {- field_id,- row_id,- value: _,- } => {- let cell_id = format!("{}:{}", row_id, field_id);- notify_cell(¬ification_sender, &cell_id);+ let sub = database.read().await.subscribe_row_change();+ if let Some(mut row_change) = sub {+ af_spawn(async move {+ while let Ok(row_change) = row_change.recv().await {+ if let Some(database) = weak_database.upgrade() {+ trace!(+ "[Database Observe]: {} row change:{:?}",+ database_id,+ row_change+ );+ match row_change {+ RowChange::DidUpdateCell {+ field_id,+ row_id,+ value: _,+ } => {+ let cell_id = format!("{}:{}", row_id, field_id);+ notify_cell(¬ification_sender, &cell_id);- let views = database.read().await.get_all_database_views_meta();- for view in views {- notify_row(¬ification_sender, &view.id, &field_id, &row_id);- }- },- _ => {- warn!("unhandled row change: {:?}", row_change);- },+ let views = database.read().await.get_all_database_views_meta();+ for view in views {+ notify_row(¬ification_sender, &view.id, &field_id, &row_id);+ }+ },+ _ => {+ warn!("unhandled row change: {:?}", row_change);+ },+ }+ } else {+ break;}- } else {- break;}- }- });+ });+ }}#[allow(dead_code)]pub(crate) async fn observe_field_change(database_id: &str, database: &Arc<RwLock<Database>>) {let database_id = database_id.to_string();let weak_database = Arc::downgrade(database);- let mut field_change = database.read().await.subscribe_field_change();- af_spawn(async move {- while let Ok(field_change) = field_change.recv().await {- if weak_database.upgrade().is_none() {- break;- }+ let sub = database.read().await.subscribe_field_change();+ if let Some(mut field_change) = sub {+ af_spawn(async move {+ while let Ok(field_change) = field_change.recv().await {+ if weak_database.upgrade().is_none() {+ break;+ }- trace!(- "[Database Observe]: {} field change:{:?}",- database_id,- field_change- );- match field_change {- FieldChange::DidUpdateField { .. } => {},- FieldChange::DidCreateField { .. } => {},- FieldChange::DidDeleteField { .. } => {},+ trace!(+ "[Database Observe]: {} field change:{:?}",+ database_id,+ field_change+ );+ match field_change {+ FieldChange::DidUpdateField { .. } => {},+ FieldChange::DidCreateField { .. } => {},+ FieldChange::DidDeleteField { .. } => {},+ }}- }- });+ });+ }}#[allow(dead_code)]pub(crate) async fn observe_view_change(database_id: &str, database_editor: &Arc<DatabaseEditor>) {let database_id = database_id.to_string();let weak_database_editor = Arc::downgrade(database_editor);- let mut view_change = database_editor+ let view_change = database_editor.database.read().await.subscribe_view_change();- af_spawn(async move {- while let Ok(view_change) = view_change.recv().await {- trace!(- "[Database View Observe]: {} view change:{:?}",- database_id,- view_change- );- match weak_database_editor.upgrade() {- None => break,- Some(database_editor) => match view_change {- DatabaseViewChange::DidCreateView { .. } => {},- DatabaseViewChange::DidUpdateView { .. } => {},- DatabaseViewChange::DidDeleteView { .. } => {},- DatabaseViewChange::LayoutSettingChanged { .. } => {},- DatabaseViewChange::DidUpdateRowOrders {- database_view_id: _,- is_local_change,- insert_row_orders,- delete_row_indexes,- } => {- handle_did_update_row_orders(- database_editor,++ if let Some(mut view_change) = view_change {+ af_spawn(async move {+ while let Ok(view_change) = view_change.recv().await {+ trace!(+ "[Database View Observe]: {} view change:{:?}",+ database_id,+ view_change+ );+ match weak_database_editor.upgrade() {+ None => break,+ Some(database_editor) => match view_change {+ DatabaseViewChange::DidCreateView { .. } => {},+ DatabaseViewChange::DidUpdateView { .. } => {},+ DatabaseViewChange::DidDeleteView { .. } => {},+ DatabaseViewChange::LayoutSettingChanged { .. } => {},+ DatabaseViewChange::DidUpdateRowOrders {+ database_view_id: _,is_local_change,insert_row_orders,delete_row_indexes,- )- .await;+ } => {+ handle_did_update_row_orders(+ database_editor,+ is_local_change,+ insert_row_orders,+ delete_row_indexes,+ )+ .await;+ },+ DatabaseViewChange::DidCreateFilters { .. } => {},+ DatabaseViewChange::DidUpdateFilter { .. } => {},+ DatabaseViewChange::DidCreateGroupSettings { .. } => {},+ DatabaseViewChange::DidUpdateGroupSetting { .. } => {},+ DatabaseViewChange::DidCreateSorts { .. } => {},+ DatabaseViewChange::DidUpdateSort { .. } => {},+ DatabaseViewChange::DidCreateFieldOrder { .. } => {},+ DatabaseViewChange::DidDeleteFieldOrder { .. } => {},},- DatabaseViewChange::DidCreateFilters { .. } => {},- DatabaseViewChange::DidUpdateFilter { .. } => {},- DatabaseViewChange::DidCreateGroupSettings { .. } => {},- DatabaseViewChange::DidUpdateGroupSetting { .. } => {},- DatabaseViewChange::DidCreateSorts { .. } => {},- DatabaseViewChange::DidUpdateSort { .. } => {},- DatabaseViewChange::DidCreateFieldOrder { .. } => {},- DatabaseViewChange::DidDeleteFieldOrder { .. } => {},- },+ }}- }- });+ });+ }}async fn handle_did_update_row_orders(diff --git a/frontend/rust-lib/flowy-database2/tests/database/database_editor.rs b/frontend/rust-lib/flowy-database2/tests/database/database_editor.rsindex a5a78ae99f..a1dc67beae 100644--- a/frontend/rust-lib/flowy-database2/tests/database/database_editor.rs+++ b/frontend/rust-lib/flowy-database2/tests/database/database_editor.rs@@ -284,7 +284,7 @@ impl DatabaseEditorTest {self.sdk.database_manager- .get_database_editor(database_id)+ .get_or_init_database_editor(database_id).await.ok()}