Skip to content

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.

chore: adjust num of preload rows (#6280)

Nathan.fooof59772756af4
diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/row/row_controller.dart b/frontend/appflowy_flutter/lib/plugins/database/application/row/row_controller.dart
index 4dd42d9200..0d2bf4985d 100644
--- a/frontend/appflowy_flutter/lib/plugins/database/application/row/row_controller.dart
+++ b/frontend/appflowy_flutter/lib/plugins/database/application/row/row_controller.dart
@@ -32,7 +32,7 @@ class RowController {
final RowBackendService _rowBackendSvc;
bool _isDisposed = false;
- String get rowId => rowMeta.id;
+ String get rowId => _rowMeta.id;
RowMetaPB get rowMeta => _rowMeta;
CellMemCache get cellCache => _rowCache.cellCache;
diff --git a/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/grid_page.dart b/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/grid_page.dart
index 601c41db63..18b633e23f 100755
--- a/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/grid_page.dart
+++ b/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/grid_page.dart
@@ -349,7 +349,7 @@ class _GridRowsState extends State<_GridRows> {
child: ReorderableListView.builder(
/// This is a workaround related to
/// https://github.com/flutter/flutter/issues/25652
- cacheExtent: max(layoutConstraints.maxHeight * 2, 500),
+ cacheExtent: max(layoutConstraints.maxHeight, 500),
scrollController: widget.scrollController.verticalController,
physics: const ClampingScrollPhysics(),
buildDefaultDragHandles: false,
diff --git a/frontend/appflowy_flutter/macos/Podfile.lock b/frontend/appflowy_flutter/macos/Podfile.lock
index f47e41d141..525eb1e347 100644
--- a/frontend/appflowy_flutter/macos/Podfile.lock
+++ b/frontend/appflowy_flutter/macos/Podfile.lock
@@ -142,7 +142,7 @@ SPEC CHECKSUMS:
HotKey: e96d8a2ddbf4591131e2bb3f54e69554d90cdca6
hotkey_manager: c32bf0bfe8f934b7bc17ab4ad5c4c142960b023c
irondash_engine_context: da62996ee25616d2f01bbeb85dc115d813359478
- local_notifier: e9506bc66fc70311e8bc7291fb70f743c081e4ff
+ local_notifier: c6c371695f914641ab7bc8601944f7e358632d0b
package_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0c
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
ReachabilitySwift: 7f151ff156cea1481a8411701195ac6a984f4979
diff --git a/frontend/appflowy_flutter/pubspec.lock b/frontend/appflowy_flutter/pubspec.lock
index b297a55092..9866a0db3f 100644
--- a/frontend/appflowy_flutter/pubspec.lock
+++ b/frontend/appflowy_flutter/pubspec.lock
@@ -1559,10 +1559,10 @@ packages:
dependency: transitive
description:
name: platform
- sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65"
+ sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
url: "https://pub.dev"
source: hosted
- version: "3.1.5"
+ version: "3.1.4"
plugin_platform_interface:
dependency: "direct dev"
description:
@@ -1997,10 +1997,10 @@ packages:
dependency: transitive
description:
name: string_scanner
- sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
+ sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
url: "https://pub.dev"
source: hosted
- version: "1.3.0"
+ version: "1.2.0"
string_validator:
dependency: "direct main"
description:
@@ -2319,10 +2319,10 @@ packages:
dependency: transitive
description:
name: vm_service
- sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
+ sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
url: "https://pub.dev"
source: hosted
- version: "14.2.5"
+ version: "14.2.1"
watcher:
dependency: transitive
description:
diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.lock b/frontend/appflowy_tauri/src-tauri/Cargo.lock
index 10c6396aa0..57035986b3 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=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
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=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
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=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"again",
"anyhow",
@@ -865,6 +865,7 @@ dependencies = [
"percent-encoding",
"pin-project",
"prost",
+ "rayon",
"reqwest",
"scraper 0.17.1",
"semver",
@@ -888,7 +889,7 @@ dependencies = [
[[package]]
name = "client-api-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"collab-entity",
"collab-rt-entity",
@@ -901,7 +902,7 @@ dependencies = [
[[package]]
name = "client-websocket"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"futures-channel",
"futures-util",
@@ -975,7 +976,7 @@ dependencies = [
[[package]]
name = "collab"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5c3622d7c45cc9707971c5db8120d94a12c089fe#5c3622d7c45cc9707971c5db8120d94a12c089fe"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"arc-swap",
@@ -1000,7 +1001,7 @@ dependencies = [
[[package]]
name = "collab-database"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5c3622d7c45cc9707971c5db8120d94a12c089fe#5c3622d7c45cc9707971c5db8120d94a12c089fe"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"async-trait",
@@ -1030,7 +1031,7 @@ dependencies = [
[[package]]
name = "collab-document"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5c3622d7c45cc9707971c5db8120d94a12c089fe#5c3622d7c45cc9707971c5db8120d94a12c089fe"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"arc-swap",
@@ -1050,7 +1051,7 @@ dependencies = [
[[package]]
name = "collab-entity"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5c3622d7c45cc9707971c5db8120d94a12c089fe#5c3622d7c45cc9707971c5db8120d94a12c089fe"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"bytes",
@@ -1069,7 +1070,7 @@ dependencies = [
[[package]]
name = "collab-folder"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5c3622d7c45cc9707971c5db8120d94a12c089fe#5c3622d7c45cc9707971c5db8120d94a12c089fe"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"arc-swap",
@@ -1112,7 +1113,7 @@ dependencies = [
[[package]]
name = "collab-plugins"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5c3622d7c45cc9707971c5db8120d94a12c089fe#5c3622d7c45cc9707971c5db8120d94a12c089fe"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"async-stream",
@@ -1150,7 +1151,7 @@ dependencies = [
[[package]]
name = "collab-rt-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"bincode",
@@ -1175,7 +1176,7 @@ dependencies = [
[[package]]
name = "collab-rt-protocol"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"async-trait",
@@ -1192,7 +1193,7 @@ dependencies = [
[[package]]
name = "collab-user"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5c3622d7c45cc9707971c5db8120d94a12c089fe#5c3622d7c45cc9707971c5db8120d94a12c089fe"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"collab",
@@ -1572,7 +1573,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
[[package]]
name = "database-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"app-error",
@@ -2397,6 +2398,7 @@ dependencies = [
"collab-folder",
"lib-infra",
"serde",
+ "serde_json",
"uuid",
]
@@ -3125,7 +3127,7 @@ dependencies = [
[[package]]
name = "gotrue"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"futures-util",
@@ -3142,7 +3144,7 @@ dependencies = [
[[package]]
name = "gotrue-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"app-error",
@@ -3574,7 +3576,7 @@ dependencies = [
[[package]]
name = "infra"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"bytes",
@@ -5464,9 +5466,9 @@ checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9"
[[package]]
name = "rayon"
-version = "1.9.0"
+version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd"
+checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
dependencies = [
"either",
"rayon-core",
@@ -6178,7 +6180,7 @@ dependencies = [
[[package]]
name = "shared-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"app-error",
diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.toml b/frontend/appflowy_tauri/src-tauri/Cargo.toml
index 8dfe9bc308..1c162e27e7 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 = "3f59c650f4fb38171310607d709f57836418ee7f" }
+client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "96896101d476426a8c41deceeec63cb4f2b09a1d" }
[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 = "28c439274c222bbc298dc6753200ee492d7e8509" }
-collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "28c439274c222bbc298dc6753200ee492d7e8509" }
-collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "28c439274c222bbc298dc6753200ee492d7e8509" }
-collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "28c439274c222bbc298dc6753200ee492d7e8509" }
-collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "28c439274c222bbc298dc6753200ee492d7e8509" }
-collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "28c439274c222bbc298dc6753200ee492d7e8509" }
-collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "28c439274c222bbc298dc6753200ee492d7e8509" }
+collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
+collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
+collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
+collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
+collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
+collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
+collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
# 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.lock
index 7cf725ded0..1f2d405daa 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=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
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=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
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=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"again",
"anyhow",
@@ -839,6 +839,7 @@ dependencies = [
"percent-encoding",
"pin-project",
"prost",
+ "rayon",
"reqwest",
"scraper 0.17.1",
"semver",
@@ -862,7 +863,7 @@ dependencies = [
[[package]]
name = "client-api-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"collab-entity",
"collab-rt-entity",
@@ -875,7 +876,7 @@ dependencies = [
[[package]]
name = "client-websocket"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"futures-channel",
"futures-util",
@@ -958,7 +959,7 @@ dependencies = [
[[package]]
name = "collab"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5c3622d7c45cc9707971c5db8120d94a12c089fe#5c3622d7c45cc9707971c5db8120d94a12c089fe"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"arc-swap",
@@ -983,7 +984,7 @@ dependencies = [
[[package]]
name = "collab-database"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5c3622d7c45cc9707971c5db8120d94a12c089fe#5c3622d7c45cc9707971c5db8120d94a12c089fe"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"async-trait",
@@ -1013,7 +1014,7 @@ dependencies = [
[[package]]
name = "collab-document"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5c3622d7c45cc9707971c5db8120d94a12c089fe#5c3622d7c45cc9707971c5db8120d94a12c089fe"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"arc-swap",
@@ -1033,7 +1034,7 @@ dependencies = [
[[package]]
name = "collab-entity"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5c3622d7c45cc9707971c5db8120d94a12c089fe#5c3622d7c45cc9707971c5db8120d94a12c089fe"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"bytes",
@@ -1052,7 +1053,7 @@ dependencies = [
[[package]]
name = "collab-folder"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5c3622d7c45cc9707971c5db8120d94a12c089fe#5c3622d7c45cc9707971c5db8120d94a12c089fe"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"arc-swap",
@@ -1095,7 +1096,7 @@ dependencies = [
[[package]]
name = "collab-plugins"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5c3622d7c45cc9707971c5db8120d94a12c089fe#5c3622d7c45cc9707971c5db8120d94a12c089fe"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"async-stream",
@@ -1133,7 +1134,7 @@ dependencies = [
[[package]]
name = "collab-rt-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"bincode",
@@ -1158,7 +1159,7 @@ dependencies = [
[[package]]
name = "collab-rt-protocol"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"async-trait",
@@ -1175,7 +1176,7 @@ dependencies = [
[[package]]
name = "collab-user"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=5c3622d7c45cc9707971c5db8120d94a12c089fe#5c3622d7c45cc9707971c5db8120d94a12c089fe"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"collab",
@@ -1562,7 +1563,7 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5"
[[package]]
name = "database-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"app-error",
@@ -2427,6 +2428,7 @@ dependencies = [
"collab-folder",
"lib-infra",
"serde",
+ "serde_json",
"uuid",
]
@@ -3192,7 +3194,7 @@ dependencies = [
[[package]]
name = "gotrue"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"futures-util",
@@ -3209,7 +3211,7 @@ dependencies = [
[[package]]
name = "gotrue-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"app-error",
@@ -3646,7 +3648,7 @@ dependencies = [
[[package]]
name = "infra"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"bytes",
@@ -6242,7 +6244,7 @@ dependencies = [
[[package]]
name = "shared-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"app-error",
diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.toml b/frontend/appflowy_web_app/src-tauri/Cargo.toml
index 8dff7fa2a3..bfe89ee9b2 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 = "3f59c650f4fb38171310607d709f57836418ee7f" }
+client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "96896101d476426a8c41deceeec63cb4f2b09a1d" }
[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 = "5c3622d7c45cc9707971c5db8120d94a12c089fe" }
-collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5c3622d7c45cc9707971c5db8120d94a12c089fe" }
-collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5c3622d7c45cc9707971c5db8120d94a12c089fe" }
-collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5c3622d7c45cc9707971c5db8120d94a12c089fe" }
-collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5c3622d7c45cc9707971c5db8120d94a12c089fe" }
-collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5c3622d7c45cc9707971c5db8120d94a12c089fe" }
-collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "5c3622d7c45cc9707971c5db8120d94a12c089fe" }
+collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
+collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
+collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
+collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
+collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
+collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
+collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
# Working directory: frontend
# To update the commit ID, run:
diff --git a/frontend/rust-lib/Cargo.lock b/frontend/rust-lib/Cargo.lock
index 3660a17a93..b827e795a9 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=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
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=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
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=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"again",
"anyhow",
@@ -757,6 +757,7 @@ dependencies = [
"percent-encoding",
"pin-project",
"prost",
+ "rayon",
"reqwest",
"scraper 0.17.1",
"semver",
@@ -780,7 +781,7 @@ dependencies = [
[[package]]
name = "client-api-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"collab-entity",
"collab-rt-entity",
@@ -793,7 +794,7 @@ dependencies = [
[[package]]
name = "client-websocket"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"futures-channel",
"futures-util",
@@ -836,7 +837,7 @@ dependencies = [
[[package]]
name = "collab"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=28c439274c222bbc298dc6753200ee492d7e8509#28c439274c222bbc298dc6753200ee492d7e8509"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"arc-swap",
@@ -861,7 +862,7 @@ dependencies = [
[[package]]
name = "collab-database"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=28c439274c222bbc298dc6753200ee492d7e8509#28c439274c222bbc298dc6753200ee492d7e8509"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"async-trait",
@@ -891,7 +892,7 @@ dependencies = [
[[package]]
name = "collab-document"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=28c439274c222bbc298dc6753200ee492d7e8509#28c439274c222bbc298dc6753200ee492d7e8509"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"arc-swap",
@@ -911,7 +912,7 @@ dependencies = [
[[package]]
name = "collab-entity"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=28c439274c222bbc298dc6753200ee492d7e8509#28c439274c222bbc298dc6753200ee492d7e8509"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"bytes",
@@ -930,7 +931,7 @@ dependencies = [
[[package]]
name = "collab-folder"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=28c439274c222bbc298dc6753200ee492d7e8509#28c439274c222bbc298dc6753200ee492d7e8509"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"arc-swap",
@@ -973,7 +974,7 @@ dependencies = [
[[package]]
name = "collab-plugins"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=28c439274c222bbc298dc6753200ee492d7e8509#28c439274c222bbc298dc6753200ee492d7e8509"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"async-stream",
@@ -1011,7 +1012,7 @@ dependencies = [
[[package]]
name = "collab-rt-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"bincode",
@@ -1036,7 +1037,7 @@ dependencies = [
[[package]]
name = "collab-rt-protocol"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"async-trait",
@@ -1053,7 +1054,7 @@ dependencies = [
[[package]]
name = "collab-user"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=28c439274c222bbc298dc6753200ee492d7e8509#28c439274c222bbc298dc6753200ee492d7e8509"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354#71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354"
dependencies = [
"anyhow",
"collab",
@@ -1396,7 +1397,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
[[package]]
name = "database-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"app-error",
@@ -2805,7 +2806,7 @@ dependencies = [
[[package]]
name = "gotrue"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"futures-util",
@@ -2822,7 +2823,7 @@ dependencies = [
[[package]]
name = "gotrue-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"app-error",
@@ -3187,7 +3188,7 @@ dependencies = [
[[package]]
name = "infra"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"bytes",
@@ -4787,9 +4788,9 @@ dependencies = [
[[package]]
name = "rayon"
-version = "1.9.0"
+version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd"
+checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
dependencies = [
"either",
"rayon-core",
@@ -5402,7 +5403,7 @@ dependencies = [
[[package]]
name = "shared-entity"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=3f59c650f4fb38171310607d709f57836418ee7f#3f59c650f4fb38171310607d709f57836418ee7f"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=96896101d476426a8c41deceeec63cb4f2b09a1d#96896101d476426a8c41deceeec63cb4f2b09a1d"
dependencies = [
"anyhow",
"app-error",
diff --git a/frontend/rust-lib/Cargo.toml b/frontend/rust-lib/Cargo.toml
index 97d782965a..e842d32f98 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 = "3f59c650f4fb38171310607d709f57836418ee7f" }
-client-api-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "3f59c650f4fb38171310607d709f57836418ee7f" }
+client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "96896101d476426a8c41deceeec63cb4f2b09a1d" }
+client-api-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "96896101d476426a8c41deceeec63cb4f2b09a1d" }
[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 = "28c439274c222bbc298dc6753200ee492d7e8509" }
-collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "28c439274c222bbc298dc6753200ee492d7e8509" }
-collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "28c439274c222bbc298dc6753200ee492d7e8509" }
-collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "28c439274c222bbc298dc6753200ee492d7e8509" }
-collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "28c439274c222bbc298dc6753200ee492d7e8509" }
-collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "28c439274c222bbc298dc6753200ee492d7e8509" }
-collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "28c439274c222bbc298dc6753200ee492d7e8509" }
+collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
+collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
+collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
+collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
+collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
+collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
+collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "71c5bd32ddb72252e8f8eddfd4f5ce75ecd31354" }
# 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.rs
index 1ca88a931e..da04bbcaa5 100644
--- a/frontend/rust-lib/collab-integrate/src/collab_builder.rs
+++ b/frontend/rust-lib/collab-integrate/src/collab_builder.rs
@@ -294,6 +294,12 @@ impl AppFlowyCollabBuilder {
T: BorrowMut<Collab> + Send + Sync + 'static,
{
let mut write_collab = collab.try_write()?;
+ let has_cloud_plugin = write_collab.borrow().has_cloud_plugin();
+ if has_cloud_plugin {
+ drop(write_collab);
+ return Ok(collab);
+ }
+
if build_config.sync_enable {
trace!("🚀finalize collab:{}", object);
let plugin_provider = self.plugin_provider.load_full();
diff --git a/frontend/rust-lib/flowy-database2/src/entities/row_entities.rs b/frontend/rust-lib/flowy-database2/src/entities/row_entities.rs
index 9bcd53256b..9384503fb5 100644
--- a/frontend/rust-lib/flowy-database2/src/entities/row_entities.rs
+++ b/frontend/rust-lib/flowy-database2/src/entities/row_entities.rs
@@ -1,6 +1,6 @@
use std::collections::HashMap;
-use collab_database::rows::{Row, RowDetail, RowId};
+use collab_database::rows::{Row, RowCover, RowDetail, RowId};
use collab_database::views::RowOrder;
use flowy_derive::ProtoBuf;
@@ -161,7 +161,7 @@ pub struct UpdateRowMetaParams {
pub id: String,
pub view_id: String,
pub icon_url: Option<String>,
- pub cover_url: Option<String>,
+ pub cover: Option<RowCover>,
pub is_document_empty: Option<bool>,
pub attachment_count: Option<i64>,
}
@@ -181,7 +181,7 @@ impl TryInto<UpdateRowMetaParams> for UpdateRowMetaChangesetPB {
id: row_id,
view_id,
icon_url: self.icon_url,
- cover_url: self.cover_url,
+ cover: None,
is_document_empty: self.is_document_empty,
attachment_count: self.attachment_count,
})
diff --git a/frontend/rust-lib/flowy-database2/src/event_handler.rs b/frontend/rust-lib/flowy-database2/src/event_handler.rs
index e369e090ea..4d15310629 100644
--- a/frontend/rust-lib/flowy-database2/src/event_handler.rs
+++ b/frontend/rust-lib/flowy-database2/src/event_handler.rs
@@ -35,7 +35,9 @@ 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_or_init_database_editor(&database_id).await?;
+ let database_editor = manager
+ .get_or_init_database_editor(&database_id, Some(view_id.as_ref()))
+ .await?;
let data = database_editor
.open_database_view(view_id.as_ref(), None)
.await?;
@@ -58,7 +60,9 @@ 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_or_init_database_editor(&database_id).await?;
+ let database_editor = manager
+ .get_or_init_database_editor(&database_id, Some(view_id.as_ref()))
+ .await?;
let row_details = database_editor.get_all_rows(view_id.as_ref()).await?;
let rows = row_details
.into_iter()
@@ -76,7 +80,8 @@ pub(crate) async fn open_database_handler(
let database_id = manager
.get_database_id_with_view_id(view_id.as_ref())
.await?;
- let _ = manager.open_database(&database_id).await?;
+ let mut editors = manager.editors.lock().await;
+ let _ = manager.open_database(&database_id, &mut editors).await?;
Ok(())
}
@@ -1240,7 +1245,7 @@ pub(crate) async fn get_related_row_datas_handler(
let manager = upgrade_manager(manager)?;
let params: GetRelatedRowDataPB = data.into_inner();
let database_editor = manager
- .get_or_init_database_editor(&params.database_id)
+ .get_or_init_database_editor(&params.database_id, None)
.await?;
let row_datas = database_editor
.get_related_rows(Some(&params.row_ids))
@@ -1260,7 +1265,9 @@ pub(crate) async fn get_related_database_rows_handler(
"[Database]: get related database rows from database_id: {}",
database_id
);
- let database_editor = manager.get_or_init_database_editor(&database_id).await?;
+ let database_editor = manager
+ .get_or_init_database_editor(&database_id, None)
+ .await?;
let rows = database_editor.get_related_rows(None).await?;
data_result_ok(RepeatedRelatedRowDataPB { rows })
}
diff --git a/frontend/rust-lib/flowy-database2/src/manager.rs b/frontend/rust-lib/flowy-database2/src/manager.rs
index 6141247cd4..5d56c88148 100644
--- a/frontend/rust-lib/flowy-database2/src/manager.rs
+++ b/frontend/rust-lib/flowy-database2/src/manager.rs
@@ -49,11 +49,12 @@ pub trait DatabaseUser: Send + Sync {
fn workspace_database_object_id(&self) -> Result<String, FlowyError>;
}
+pub(crate) type DatabaseEditorMap = HashMap<String, Arc<DatabaseEditor>>;
pub struct DatabaseManager {
user: Arc<dyn DatabaseUser>,
workspace_database: ArcSwapOption<RwLock<WorkspaceDatabase>>,
task_scheduler: Arc<TokioRwLock<TaskDispatcher>>,
- editors: Mutex<HashMap<String, Arc<DatabaseEditor>>>,
+ pub(crate) editors: Mutex<DatabaseEditorMap>,
removing_editor: Arc<Mutex<HashMap<String, Arc<DatabaseEditor>>>>,
collab_builder: Arc<AppFlowyCollabBuilder>,
cloud_service: Arc<dyn DatabaseCloudService>,
@@ -183,10 +184,6 @@ impl DatabaseManager {
let lock = self.workspace_database()?;
let wdb = lock.read().await;
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))
@@ -219,28 +216,35 @@ impl DatabaseManager {
view_id: &str,
) -> FlowyResult<Arc<DatabaseEditor>> {
let database_id = self.get_database_id_with_view_id(view_id).await?;
- self.get_or_init_database_editor(&database_id).await
+ self
+ .get_or_init_database_editor(&database_id, Some(view_id))
+ .await
}
pub async fn get_or_init_database_editor(
&self,
database_id: &str,
+ _database_view_id: Option<&str>,
) -> FlowyResult<Arc<DatabaseEditor>> {
- if let Some(editor) = self.editors.lock().await.get(database_id).cloned() {
+ let mut editors = self.editors.lock().await;
+ if let Some(editor) = editors.get(database_id).cloned() {
return Ok(editor);
}
- self.open_database(database_id).await
+
+ let editor = self.open_database(database_id, &mut editors).await?;
+ drop(editors);
+ Ok(editor)
}
#[instrument(level = "trace", skip_all, err)]
- pub async fn open_database(&self, database_id: &str) -> FlowyResult<Arc<DatabaseEditor>> {
+ pub async fn open_database(
+ &self,
+ database_id: &str,
+ editors: &mut DatabaseEditorMap,
+ ) -> FlowyResult<Arc<DatabaseEditor>> {
let workspace_database = self.workspace_database()?;
if let Some(database_editor) = self.removing_editor.lock().await.remove(database_id) {
- self
- .editors
- .lock()
- .await
- .insert(database_id.to_string(), database_editor.clone());
+ editors.insert(database_id.to_string(), database_editor.clone());
return Ok(database_editor);
}
@@ -271,11 +275,7 @@ impl DatabaseManager {
)
.await?;
- self
- .editors
- .lock()
- .await
- .insert(database_id.to_string(), editor.clone());
+ editors.insert(database_id.to_string(), editor.clone());
Ok(editor)
}
@@ -285,9 +285,10 @@ impl DatabaseManager {
let lock = self.workspace_database()?;
let workspace_database = lock.read().await;
if let Some(database_id) = workspace_database.get_database_id_with_view_id(view_id) {
- if self.editors.lock().await.get(&database_id).is_none() {
- let database = self.open_database(&database_id).await?;
- database.as_ref().open_database_view(view_id, None).await?;
+ let mut editors = self.editors.lock().await;
+ if editors.get(&database_id).is_none() {
+ let _ = self.open_database(&database_id, &mut editors).await?;
+ drop(editors);
}
}
Ok(())
diff --git a/frontend/rust-lib/flowy-database2/src/services/database/database_editor.rs b/frontend/rust-lib/flowy-database2/src/services/database/database_editor.rs
index b0eed0e711..ad12983938 100644
--- a/frontend/rust-lib/flowy-database2/src/services/database/database_editor.rs
+++ b/frontend/rust-lib/flowy-database2/src/services/database/database_editor.rs
@@ -33,9 +33,9 @@ use collab_database::views::{
};
use collab_entity::CollabType;
use collab_integrate::collab_builder::{AppFlowyCollabBuilder, CollabBuilderConfig};
-use dashmap::DashMap;
use flowy_error::{internal_error, ErrorCode, FlowyError, FlowyResult};
use flowy_notification::DebounceNotificationSender;
+use futures::future::join_all;
use lib_infra::box_any::BoxAny;
use lib_infra::priority_task::TaskDispatcher;
use lib_infra::util::timestamp;
@@ -61,7 +61,6 @@ pub struct DatabaseEditor {
is_opening: ArcSwap<bool>,
opening_ret_txs: Arc<RwLock<Vec<OpenDatabaseResult>>>,
database_cancellation: Arc<RwLock<Option<CancellationToken>>>,
- finalized_rows: Arc<DashMap<RowId, bool>>,
}
impl DatabaseEditor {
@@ -122,7 +121,6 @@ impl DatabaseEditor {
is_opening: Default::default(),
opening_ret_txs: Arc::new(Default::default()),
database_cancellation,
- finalized_rows: Arc::new(Default::default()),
});
observe_block_event(&database_id, &this).await;
observe_view_change(&database_id, &this).await;
@@ -761,29 +759,12 @@ impl DatabaseEditor {
}
pub async fn init_database_row(&self, row_id: &RowId) -> FlowyResult<Arc<RwLock<DatabaseRow>>> {
- if let Some(entry) = self.finalized_rows.get(row_id) {
- if *entry.value() {
- let database_row = self
- .database
- .read()
- .await
- .get_database_row(row_id)
- .await
- .ok_or_else(|| {
- FlowyError::record_not_found()
- .with_context(format!("The row:{} in database not found", row_id))
- })?;
- return Ok(database_row);
- }
- }
-
- self.finalized_rows.insert(row_id.clone(), true);
debug!("Init database row: {}", row_id);
let database_row = self
.database
.read()
.await
- .init_database_row(row_id)
+ .get_or_init_database_row(row_id)
.await
.ok_or_else(|| {
FlowyError::record_not_found()
@@ -840,7 +821,7 @@ impl DatabaseEditor {
database
.update_row_meta(row_id, |meta_update| {
meta_update
- .insert_cover_if_not_none(changeset.cover_url)
+ .insert_cover_if_not_none(changeset.cover)
.insert_icon_if_not_none(changeset.icon_url)
.update_is_document_empty_if_not_none(changeset.is_document_empty)
.update_attachment_count_if_not_none(changeset.attachment_count);
@@ -1096,7 +1077,7 @@ impl DatabaseEditor {
UpdateRowMetaParams {
id: row_id.clone().into_inner(),
view_id: view_id.to_string(),
- cover_url: None,
+ cover: None,
icon_url: None,
is_document_empty: None,
attachment_count: Some(new_attachment_count),
@@ -1454,10 +1435,7 @@ impl DatabaseEditor {
);
let view_editor = self.database_views.get_or_init_view_editor(view_id).await?;
- // Load rows asynchronously
- // if the number of rows is less than 100 or notify_finish is not None, it will wait until all
- // rows are loaded
- let should_wait = notify_finish.is_some() || row_metas.len() < 100;
+ let should_wait = notify_finish.is_some() || row_metas.len() < 10;
let (tx, rx) = oneshot::channel();
self.async_load_rows(view_editor, Some(tx), new_token);
if should_wait {
@@ -1509,7 +1487,6 @@ impl DatabaseEditor {
trace!("[Database]: start loading rows");
let cloned_database = Arc::downgrade(&self.database);
tokio::spawn(async move {
- const CHUNK_SIZE: usize = 5;
let apply_filter_and_sort =
|mut loaded_rows: Vec<Arc<Row>>, view_editor: Arc<DatabaseViewEditor>| async move {
for loaded_row in loaded_rows.iter() {
@@ -1532,28 +1509,51 @@ impl DatabaseEditor {
};
let mut loaded_rows = vec![];
- for chunk_row_orders in view_editor.row_orders.read().await.chunks(CHUNK_SIZE) {
- match cloned_database.upgrade() {
- None => break,
- Some(database) => {
- for lazy_row in chunk_row_orders {
- if let Some(database_row) =
- database.read().await.init_database_row(&lazy_row.id).await
- {
- if let Some(row) = database_row.read().await.get_row() {
- loaded_rows.push(Arc::new(row));
- }
+ const CHUNK_SIZE: usize = 10;
+ let row_orders = view_editor.row_orders.read().await;
+ let row_orders_chunks = row_orders.chunks(CHUNK_SIZE).collect::<Vec<_>>();
+
+ // Iterate over chunks and load rows concurrently
+ for chunk_row_orders in row_orders_chunks {
+ // Check if the database is still available
+ let database = match cloned_database.upgrade() {
+ None => break, // If the database is dropped, stop the operation
+ Some(database) => database,
+ };
+
+ // Process the chunk of rows concurrently using async tasks
+ let tasks: Vec<_> = chunk_row_orders
+ .iter()
+ .map(|row_order| {
+ let db_clone = database.clone();
+ async move {
+ // Initialize the database row
+ let database_row = db_clone
+ .read()
+ .await
+ .get_or_init_database_row(&row_order.id)
+ .await;
+ if let Some(database_row) = database_row {
+ let row = database_row.read().await.get_row();
+ row.map(Arc::new)
+ } else {
+ None
}
}
- // stop init database rows
- if new_token.is_cancelled() {
- info!("[Database]: stop loading database rows");
- return;
- }
- },
+ })
+ .collect();
+
+ let results = join_all(tasks).await;
+ for row in results.into_iter().flatten() {
+ loaded_rows.push(row);
+ }
+ // Check for cancellation after each chunk
+ if new_token.is_cancelled() {
+ info!("[Database]: stop loading database rows");
+ return;
}
- tokio::task::yield_now().await;
}
+ drop(row_orders);
info!("[Database]: Finish loading all rows: {}", loaded_rows.len());
let loaded_rows = apply_filter_and_sort(loaded_rows, view_editor).await;
diff --git a/frontend/rust-lib/flowy-database2/tests/database/database_editor.rs b/frontend/rust-lib/flowy-database2/tests/database/database_editor.rs
index a1dc67beae..618e1f5fa9 100644
--- a/frontend/rust-lib/flowy-database2/tests/database/database_editor.rs
+++ b/frontend/rust-lib/flowy-database2/tests/database/database_editor.rs
@@ -10,7 +10,7 @@ use strum::EnumCount;
use event_integration_test::folder_event::ViewTest;
use event_integration_test::EventIntegrationTest;
-use flowy_database2::entities::{FieldType, FilterPB, RowMetaPB};
+use flowy_database2::entities::{DatabasePB, FieldType, FilterPB, RowMetaPB};
use flowy_database2::services::database::DatabaseEditor;
use flowy_database2::services::field::checklist_type_option::{
@@ -93,15 +93,21 @@ impl DatabaseEditorTest {
.collect();
let view_id = test.child_view.id;
- Self {
+ let this = Self {
sdk,
- view_id,
+ view_id: view_id.clone(),
editor,
fields,
rows,
field_count: FieldType::COUNT,
row_by_row_id: HashMap::default(),
- }
+ };
+ this.get_database_data(&view_id).await;
+ this
+ }
+
+ pub async fn get_database_data(&self, view_id: &str) -> DatabasePB {
+ self.editor.open_database_view(view_id, None).await.unwrap()
}
pub async fn database_filters(&self) -> Vec<FilterPB> {
@@ -284,7 +290,7 @@ impl DatabaseEditorTest {
self
.sdk
.database_manager
- .get_or_init_database_editor(database_id)
+ .get_or_init_database_editor(database_id, None)
.await
.ok()
}