chore: fix board row (#6046)

* chore: fix board row init

* chore: update client api version
This commit is contained in:
Nathan.fooo 2024-08-23 13:55:40 +08:00 committed by GitHub
parent 9e93483113
commit a206d9aa8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 79 additions and 75 deletions

View File

@ -27,12 +27,14 @@ class RowController {
} }
_rowMeta = newRowMeta; _rowMeta = newRowMeta;
_rowCache.setRowMeta(newRowMeta); _rowCache.setRowMeta(newRowMeta);
_onRowMetaChanged?.call();
}, },
); );
} }
RowMetaPB _rowMeta; RowMetaPB _rowMeta;
final String? groupId; final String? groupId;
VoidCallback? _onRowMetaChanged;
final String viewId; final String viewId;
final List<VoidCallback> _onRowChangedListeners = []; final List<VoidCallback> _onRowChangedListeners = [];
final RowCache _rowCache; final RowCache _rowCache;
@ -47,7 +49,10 @@ class RowController {
List<CellContext> loadCells() => _rowCache.loadCells(rowMeta); List<CellContext> loadCells() => _rowCache.loadCells(rowMeta);
void addListener({OnRowChanged? onRowChanged}) { void addListener({
OnRowChanged? onRowChanged,
VoidCallback? onMetaChanged,
}) {
final fn = _rowCache.addListener( final fn = _rowCache.addListener(
rowId: rowMeta.id, rowId: rowMeta.id,
onRowChanged: (context, reasons) { onRowChanged: (context, reasons) {
@ -60,6 +65,7 @@ class RowController {
// Add the listener to the list so that we can remove it later. // Add the listener to the list so that we can remove it later.
_onRowChangedListeners.add(fn); _onRowChangedListeners.add(fn);
_onRowMetaChanged = onMetaChanged;
} }
Future<void> dispose() async { Future<void> dispose() async {

View File

@ -653,7 +653,7 @@ class _BoardCardState extends State<_BoardCard> {
onTap: (context) => _openCard( onTap: (context) => _openCard(
context: context, context: context,
databaseController: databaseController, databaseController: databaseController,
rowMeta: context.read<CardBloc>().state.rowMeta, rowMeta: context.read<CardBloc>().rowController.rowMeta,
), ),
onShiftTap: (_) { onShiftTap: (_) {
Focus.of(context).requestFocus(); Focus.of(context).requestFocus();

View File

@ -2,6 +2,7 @@ import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/mobile/presentation/database/card/card.dart'; import 'package:appflowy/mobile/presentation/database/card/card.dart';
import 'package:appflowy/plugins/database/application/field/field_controller.dart'; import 'package:appflowy/plugins/database/application/field/field_controller.dart';
import 'package:appflowy/plugins/database/application/row/row_cache.dart'; import 'package:appflowy/plugins/database/application/row/row_cache.dart';
import 'package:appflowy/plugins/database/application/row/row_controller.dart';
import 'package:appflowy/plugins/database/grid/presentation/widgets/row/action.dart'; import 'package:appflowy/plugins/database/grid/presentation/widgets/row/action.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/row_entities.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/row_entities.pb.dart';
import 'package:appflowy_editor/appflowy_editor.dart'; import 'package:appflowy_editor/appflowy_editor.dart';
@ -73,13 +74,18 @@ class _RowCardState extends State<RowCard> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
final rowController = RowController(
viewId: widget.viewId,
rowMeta: widget.rowMeta,
rowCache: widget.rowCache,
);
_cardBloc = CardBloc( _cardBloc = CardBloc(
fieldController: widget.fieldController, fieldController: widget.fieldController,
viewId: widget.viewId, viewId: widget.viewId,
groupFieldId: widget.groupingFieldId, groupFieldId: widget.groupingFieldId,
isEditing: widget.isEditing, isEditing: widget.isEditing,
rowMeta: widget.rowMeta, rowController: rowController,
rowCache: widget.rowCache,
)..add(const CardEvent.initial()); )..add(const CardEvent.initial());
} }
@ -143,7 +149,7 @@ class _RowCardState extends State<RowCard> {
popupBuilder: (_) { popupBuilder: (_) {
return RowActionMenu.board( return RowActionMenu.board(
viewId: _cardBloc.viewId, viewId: _cardBloc.viewId,
rowId: _cardBloc.rowId, rowId: _cardBloc.rowController.rowId,
groupId: widget.groupId, groupId: widget.groupId,
); );
}, },

View File

@ -1,5 +1,6 @@
import 'dart:async'; import 'dart:async';
import 'package:appflowy/plugins/database/application/row/row_controller.dart';
import 'package:appflowy/plugins/database/application/row/row_service.dart'; import 'package:appflowy/plugins/database/application/row/row_service.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
@ -7,7 +8,6 @@ import 'package:flutter/foundation.dart';
import 'package:appflowy/plugins/database/application/cell/cell_controller.dart'; import 'package:appflowy/plugins/database/application/cell/cell_controller.dart';
import 'package:appflowy/plugins/database/application/field/field_controller.dart'; import 'package:appflowy/plugins/database/application/field/field_controller.dart';
import 'package:appflowy/plugins/database/application/row/row_cache.dart'; import 'package:appflowy/plugins/database/application/row/row_cache.dart';
import 'package:appflowy/plugins/database/domain/row_listener.dart';
import 'package:appflowy/plugins/database/widgets/setting/field_visibility_extension.dart'; import 'package:appflowy/plugins/database/widgets/setting/field_visibility_extension.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:freezed_annotation/freezed_annotation.dart';
@ -19,42 +19,35 @@ class CardBloc extends Bloc<CardEvent, CardState> {
required this.fieldController, required this.fieldController,
required this.groupFieldId, required this.groupFieldId,
required this.viewId, required this.viewId,
required RowMetaPB rowMeta,
required RowCache rowCache,
required bool isEditing, required bool isEditing,
}) : rowId = rowMeta.id, required this.rowController,
_rowListener = RowListener(rowMeta.id), }) : super(
_rowCache = rowCache,
super(
CardState.initial( CardState.initial(
rowMeta,
_makeCells( _makeCells(
fieldController, fieldController,
groupFieldId, groupFieldId,
rowCache.loadCells(rowMeta), rowController,
), ),
isEditing, isEditing,
rowController.rowMeta,
), ),
) { ) {
_dispatch(); _dispatch();
} }
final FieldController fieldController; final FieldController fieldController;
final String rowId;
final String? groupFieldId; final String? groupFieldId;
final RowCache _rowCache;
final String viewId; final String viewId;
final RowListener _rowListener; final RowController rowController;
VoidCallback? _rowCallback; VoidCallback? _rowCallback;
@override @override
Future<void> close() async { Future<void> close() async {
if (_rowCallback != null) { if (_rowCallback != null) {
_rowCache.removeRowListener(_rowCallback!);
_rowCallback = null; _rowCallback = null;
} }
await _rowListener.stop(); await rowController.dispose();
return super.close(); return super.close();
} }
@ -85,20 +78,17 @@ class CardBloc extends Bloc<CardEvent, CardState> {
} }
Future<void> _startListening() async { Future<void> _startListening() async {
_rowCallback = _rowCache.addListener( rowController.addListener(
rowId: rowId,
onRowChanged: (cellMap, reason) { onRowChanged: (cellMap, reason) {
if (!isClosed) { if (!isClosed) {
final cells = _makeCells(fieldController, groupFieldId, cellMap); final cells =
_makeCells(fieldController, groupFieldId, rowController);
add(CardEvent.didReceiveCells(cells, reason)); add(CardEvent.didReceiveCells(cells, reason));
} }
}, },
); onMetaChanged: () {
_rowListener.start(
onMetaChanged: (rowMeta) {
if (!isClosed) { if (!isClosed) {
add(CardEvent.didUpdateRowMeta(rowMeta)); add(CardEvent.didUpdateRowMeta(rowController.rowMeta));
} }
}, },
); );
@ -108,16 +98,18 @@ class CardBloc extends Bloc<CardEvent, CardState> {
List<CellMeta> _makeCells( List<CellMeta> _makeCells(
FieldController fieldController, FieldController fieldController,
String? groupFieldId, String? groupFieldId,
List<CellContext> cellContexts, RowController rowController,
) { ) {
// Only show the non-hidden cells and cells that aren't of the grouping field // Only show the non-hidden cells and cells that aren't of the grouping field
cellContexts.removeWhere((cellContext) { final cellContext = rowController.loadCells();
cellContext.removeWhere((cellContext) {
final fieldInfo = fieldController.getField(cellContext.fieldId); final fieldInfo = fieldController.getField(cellContext.fieldId);
return fieldInfo == null || return fieldInfo == null ||
!(fieldInfo.visibility?.isVisibleState() ?? false) || !(fieldInfo.visibility?.isVisibleState() ?? false) ||
(groupFieldId != null && cellContext.fieldId == groupFieldId); (groupFieldId != null && cellContext.fieldId == groupFieldId);
}); });
return cellContexts return cellContext
.map( .map(
(cellCtx) => CellMeta( (cellCtx) => CellMeta(
fieldId: cellCtx.fieldId, fieldId: cellCtx.fieldId,
@ -157,19 +149,19 @@ class CellMeta with _$CellMeta {
class CardState with _$CardState { class CardState with _$CardState {
const factory CardState({ const factory CardState({
required List<CellMeta> cells, required List<CellMeta> cells,
required RowMetaPB rowMeta,
required bool isEditing, required bool isEditing,
required RowMetaPB rowMeta,
ChangedReason? changeReason, ChangedReason? changeReason,
}) = _RowCardState; }) = _RowCardState;
factory CardState.initial( factory CardState.initial(
RowMetaPB rowMeta,
List<CellMeta> cells, List<CellMeta> cells,
bool isEditing, bool isEditing,
RowMetaPB rowMeta,
) => ) =>
CardState( CardState(
cells: cells, cells: cells,
rowMeta: rowMeta,
isEditing: isEditing, isEditing: isEditing,
rowMeta: rowMeta,
); );
} }

View File

@ -172,7 +172,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]] [[package]]
name = "app-error" name = "app-error"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
@ -192,7 +192,7 @@ dependencies = [
[[package]] [[package]]
name = "appflowy-ai-client" name = "appflowy-ai-client"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
@ -826,7 +826,7 @@ dependencies = [
[[package]] [[package]]
name = "client-api" name = "client-api"
version = "0.2.0" version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"again", "again",
"anyhow", "anyhow",
@ -877,7 +877,7 @@ dependencies = [
[[package]] [[package]]
name = "client-api-entity" name = "client-api-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"collab-entity", "collab-entity",
"collab-rt-entity", "collab-rt-entity",
@ -890,7 +890,7 @@ dependencies = [
[[package]] [[package]]
name = "client-websocket" name = "client-websocket"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"futures-channel", "futures-channel",
"futures-util", "futures-util",
@ -1138,7 +1138,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-rt-entity" name = "collab-rt-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
@ -1163,7 +1163,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-rt-protocol" name = "collab-rt-protocol"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -1426,7 +1426,7 @@ dependencies = [
"cssparser-macros", "cssparser-macros",
"dtoa-short", "dtoa-short",
"itoa 1.0.6", "itoa 1.0.6",
"phf 0.8.0", "phf 0.11.2",
"smallvec", "smallvec",
] ]
@ -1551,7 +1551,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
[[package]] [[package]]
name = "database-entity" name = "database-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -3076,7 +3076,7 @@ dependencies = [
[[package]] [[package]]
name = "gotrue" name = "gotrue"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"futures-util", "futures-util",
@ -3093,7 +3093,7 @@ dependencies = [
[[package]] [[package]]
name = "gotrue-entity" name = "gotrue-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -3525,7 +3525,7 @@ dependencies = [
[[package]] [[package]]
name = "infra" name = "infra"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
@ -6122,7 +6122,7 @@ dependencies = [
[[package]] [[package]]
name = "shared-entity" name = "shared-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",

View File

@ -53,7 +53,7 @@ collab-user = { version = "0.2" }
# Run the script: # Run the script:
# scripts/tool/update_client_api_rev.sh new_rev_id # scripts/tool/update_client_api_rev.sh new_rev_id
# ⚠️⚠️⚠️️ # ⚠️⚠️⚠️️
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "ae3833ea91c238a66ca7bda63763d1d654740fb4" } client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "50e6a41513348f42a441c9c4f90220fcec2ba2ca" }
[dependencies] [dependencies]
serde_json.workspace = true serde_json.workspace = true

View File

@ -163,7 +163,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]] [[package]]
name = "app-error" name = "app-error"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
@ -183,7 +183,7 @@ dependencies = [
[[package]] [[package]]
name = "appflowy-ai-client" name = "appflowy-ai-client"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
@ -800,7 +800,7 @@ dependencies = [
[[package]] [[package]]
name = "client-api" name = "client-api"
version = "0.2.0" version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"again", "again",
"anyhow", "anyhow",
@ -851,7 +851,7 @@ dependencies = [
[[package]] [[package]]
name = "client-api-entity" name = "client-api-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"collab-entity", "collab-entity",
"collab-rt-entity", "collab-rt-entity",
@ -864,7 +864,7 @@ dependencies = [
[[package]] [[package]]
name = "client-websocket" name = "client-websocket"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"futures-channel", "futures-channel",
"futures-util", "futures-util",
@ -1121,7 +1121,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-rt-entity" name = "collab-rt-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
@ -1146,7 +1146,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-rt-protocol" name = "collab-rt-protocol"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -1416,7 +1416,7 @@ dependencies = [
"cssparser-macros", "cssparser-macros",
"dtoa-short", "dtoa-short",
"itoa 1.0.10", "itoa 1.0.10",
"phf 0.8.0", "phf 0.11.2",
"smallvec", "smallvec",
] ]
@ -1541,7 +1541,7 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5"
[[package]] [[package]]
name = "database-entity" name = "database-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -3143,7 +3143,7 @@ dependencies = [
[[package]] [[package]]
name = "gotrue" name = "gotrue"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"futures-util", "futures-util",
@ -3160,7 +3160,7 @@ dependencies = [
[[package]] [[package]]
name = "gotrue-entity" name = "gotrue-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -3597,7 +3597,7 @@ dependencies = [
[[package]] [[package]]
name = "infra" name = "infra"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
@ -6186,7 +6186,7 @@ dependencies = [
[[package]] [[package]]
name = "shared-entity" name = "shared-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",

View File

@ -52,7 +52,7 @@ collab-user = { version = "0.2" }
# Run the script: # Run the script:
# scripts/tool/update_client_api_rev.sh new_rev_id # scripts/tool/update_client_api_rev.sh new_rev_id
# ⚠️⚠️⚠️️ # ⚠️⚠️⚠️️
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "ae3833ea91c238a66ca7bda63763d1d654740fb4" } client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "50e6a41513348f42a441c9c4f90220fcec2ba2ca" }
[dependencies] [dependencies]
serde_json.workspace = true serde_json.workspace = true

View File

@ -163,7 +163,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]] [[package]]
name = "app-error" name = "app-error"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
@ -183,7 +183,7 @@ dependencies = [
[[package]] [[package]]
name = "appflowy-ai-client" name = "appflowy-ai-client"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
@ -718,7 +718,7 @@ dependencies = [
[[package]] [[package]]
name = "client-api" name = "client-api"
version = "0.2.0" version = "0.2.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"again", "again",
"anyhow", "anyhow",
@ -769,7 +769,7 @@ dependencies = [
[[package]] [[package]]
name = "client-api-entity" name = "client-api-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"collab-entity", "collab-entity",
"collab-rt-entity", "collab-rt-entity",
@ -782,7 +782,7 @@ dependencies = [
[[package]] [[package]]
name = "client-websocket" name = "client-websocket"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"futures-channel", "futures-channel",
"futures-util", "futures-util",
@ -999,7 +999,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-rt-entity" name = "collab-rt-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
@ -1024,7 +1024,7 @@ dependencies = [
[[package]] [[package]]
name = "collab-rt-protocol" name = "collab-rt-protocol"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -1375,7 +1375,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
[[package]] [[package]]
name = "database-entity" name = "database-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -2754,7 +2754,7 @@ dependencies = [
[[package]] [[package]]
name = "gotrue" name = "gotrue"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"futures-util", "futures-util",
@ -2771,7 +2771,7 @@ dependencies = [
[[package]] [[package]]
name = "gotrue-entity" name = "gotrue-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",
@ -3136,7 +3136,7 @@ dependencies = [
[[package]] [[package]]
name = "infra" name = "infra"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
@ -5344,7 +5344,7 @@ dependencies = [
[[package]] [[package]]
name = "shared-entity" name = "shared-entity"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=ae3833ea91c238a66ca7bda63763d1d654740fb4#ae3833ea91c238a66ca7bda63763d1d654740fb4" source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=50e6a41513348f42a441c9c4f90220fcec2ba2ca#50e6a41513348f42a441c9c4f90220fcec2ba2ca"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"app-error", "app-error",

View File

@ -100,8 +100,8 @@ dashmap = "6.0.1"
# Run the script.add_workspace_members: # Run the script.add_workspace_members:
# scripts/tool/update_client_api_rev.sh new_rev_id # scripts/tool/update_client_api_rev.sh new_rev_id
# ⚠️⚠️⚠️️ # ⚠️⚠️⚠️️
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "ae3833ea91c238a66ca7bda63763d1d654740fb4" } client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "50e6a41513348f42a441c9c4f90220fcec2ba2ca" }
client-api-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "ae3833ea91c238a66ca7bda63763d1d654740fb4" } client-api-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "50e6a41513348f42a441c9c4f90220fcec2ba2ca" }
[profile.dev] [profile.dev]
opt-level = 0 opt-level = 0