[PR #1420] [MERGED] Refactor: merge multiple revision into one #4727

Closed
opened 2026-03-23 22:15:33 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/1420
Author: @appflowy
Created: 11/7/2022
Status: Merged
Merged: 11/8/2022
Merged by: @appflowy

Base: mainHead: refactor/flowy_revision_crate


📝 Commits (9)

  • 608a08e refactor: md5 of revision
  • f5dc9ed test: add revision tests
  • 2c71e4f chore: add tests
  • ff7aab7 chore: merge with config setting
  • e729c0a chore: add documentation
  • b3b24d0 chore: calculate the compact length after receiving ack
  • de4c1b2 chore: fix warnings
  • ebdd28c chore: add ref count map
  • 6425997 chore: merge lagging revisions when close the document

📊 Changes

57 files changed (+1680 additions, -639 deletions)

View changed files

📝 frontend/rust-lib/Cargo.lock (+3 -0)
📝 frontend/rust-lib/flowy-document/src/editor/document.rs (+5 -5)
📝 frontend/rust-lib/flowy-document/src/editor/editor.rs (+10 -2)
📝 frontend/rust-lib/flowy-document/src/editor/queue.rs (+2 -3)
📝 frontend/rust-lib/flowy-document/src/manager.rs (+44 -52)
📝 frontend/rust-lib/flowy-document/src/old_editor/editor.rs (+3 -3)
📝 frontend/rust-lib/flowy-document/src/old_editor/queue.rs (+16 -16)
📝 frontend/rust-lib/flowy-document/src/old_editor/web_socket.rs (+2 -5)
📝 frontend/rust-lib/flowy-document/src/services/migration.rs (+5 -5)
📝 frontend/rust-lib/flowy-document/src/services/persistence/rev_sqlite/document_rev_sqlite_v0.rs (+11 -30)
📝 frontend/rust-lib/flowy-document/src/services/persistence/rev_sqlite/document_rev_sqlite_v1.rs (+10 -11)
📝 frontend/rust-lib/flowy-folder/src/manager.rs (+6 -2)
📝 frontend/rust-lib/flowy-folder/src/services/folder_editor.rs (+8 -12)
📝 frontend/rust-lib/flowy-folder/src/services/persistence/migration.rs (+2 -1)
📝 frontend/rust-lib/flowy-folder/src/services/persistence/mod.rs (+3 -3)
📝 frontend/rust-lib/flowy-folder/src/services/persistence/rev_sqlite/folder_rev_sqlite.rs (+11 -30)
📝 frontend/rust-lib/flowy-folder/src/services/web_socket.rs (+4 -4)
📝 frontend/rust-lib/flowy-folder/tests/workspace/folder_test.rs (+50 -50)
📝 frontend/rust-lib/flowy-folder/tests/workspace/script.rs (+1 -0)
📝 frontend/rust-lib/flowy-grid/src/event_handler.rs (+27 -27)

...and 37 more files

📄 Description

The PR will modify how the data is stored in the DB. It includes these changes:

  1. Adds tests for flowy-revision crate
  2. Supports setting the merge strategy that controls how many revisions will be merged into one while editing.
  3. Merge the lagging revisions into one when close the document

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/1420 **Author:** [@appflowy](https://github.com/appflowy) **Created:** 11/7/2022 **Status:** ✅ Merged **Merged:** 11/8/2022 **Merged by:** [@appflowy](https://github.com/appflowy) **Base:** `main` ← **Head:** `refactor/flowy_revision_crate` --- ### 📝 Commits (9) - [`608a08e`](https://github.com/AppFlowy-IO/AppFlowy/commit/608a08eb7616e20cd2404653cb2dc6109297213c) refactor: md5 of revision - [`f5dc9ed`](https://github.com/AppFlowy-IO/AppFlowy/commit/f5dc9ed97564010c6687ae1b49ad16e6aa3c5a5d) test: add revision tests - [`2c71e4f`](https://github.com/AppFlowy-IO/AppFlowy/commit/2c71e4f885acb02f729fc70498cfa86552cb7851) chore: add tests - [`ff7aab7`](https://github.com/AppFlowy-IO/AppFlowy/commit/ff7aab73cc8c8ce87ed727dd4a7e69e8259ffa1a) chore: merge with config setting - [`e729c0a`](https://github.com/AppFlowy-IO/AppFlowy/commit/e729c0a81f74b7056042a2947467a182daaa0e0b) chore: add documentation - [`b3b24d0`](https://github.com/AppFlowy-IO/AppFlowy/commit/b3b24d0cc058c6ca151f027bdd95978a9e5e8cad) chore: calculate the compact length after receiving ack - [`de4c1b2`](https://github.com/AppFlowy-IO/AppFlowy/commit/de4c1b24efb415ec306f7779a002ed44ac88ece9) chore: fix warnings - [`ebdd28c`](https://github.com/AppFlowy-IO/AppFlowy/commit/ebdd28cf1c736962cd039bd578556631bdfe521d) chore: add ref count map - [`6425997`](https://github.com/AppFlowy-IO/AppFlowy/commit/6425997508bfda019407a4702e8e04eefb1ceb35) chore: merge lagging revisions when close the document ### 📊 Changes **57 files changed** (+1680 additions, -639 deletions) <details> <summary>View changed files</summary> 📝 `frontend/rust-lib/Cargo.lock` (+3 -0) 📝 `frontend/rust-lib/flowy-document/src/editor/document.rs` (+5 -5) 📝 `frontend/rust-lib/flowy-document/src/editor/editor.rs` (+10 -2) 📝 `frontend/rust-lib/flowy-document/src/editor/queue.rs` (+2 -3) 📝 `frontend/rust-lib/flowy-document/src/manager.rs` (+44 -52) 📝 `frontend/rust-lib/flowy-document/src/old_editor/editor.rs` (+3 -3) 📝 `frontend/rust-lib/flowy-document/src/old_editor/queue.rs` (+16 -16) 📝 `frontend/rust-lib/flowy-document/src/old_editor/web_socket.rs` (+2 -5) 📝 `frontend/rust-lib/flowy-document/src/services/migration.rs` (+5 -5) 📝 `frontend/rust-lib/flowy-document/src/services/persistence/rev_sqlite/document_rev_sqlite_v0.rs` (+11 -30) 📝 `frontend/rust-lib/flowy-document/src/services/persistence/rev_sqlite/document_rev_sqlite_v1.rs` (+10 -11) 📝 `frontend/rust-lib/flowy-folder/src/manager.rs` (+6 -2) 📝 `frontend/rust-lib/flowy-folder/src/services/folder_editor.rs` (+8 -12) 📝 `frontend/rust-lib/flowy-folder/src/services/persistence/migration.rs` (+2 -1) 📝 `frontend/rust-lib/flowy-folder/src/services/persistence/mod.rs` (+3 -3) 📝 `frontend/rust-lib/flowy-folder/src/services/persistence/rev_sqlite/folder_rev_sqlite.rs` (+11 -30) 📝 `frontend/rust-lib/flowy-folder/src/services/web_socket.rs` (+4 -4) 📝 `frontend/rust-lib/flowy-folder/tests/workspace/folder_test.rs` (+50 -50) 📝 `frontend/rust-lib/flowy-folder/tests/workspace/script.rs` (+1 -0) 📝 `frontend/rust-lib/flowy-grid/src/event_handler.rs` (+27 -27) _...and 37 more files_ </details> ### 📄 Description The PR will modify how the data is stored in the DB. It includes these changes: 1. Adds tests for flowy-revision crate 2. Supports setting the merge strategy that controls how many revisions will be merged into one while editing. 3. Merge the lagging revisions into one when close the document --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 22:15:33 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#4727
No description provided.