[PR #1549] [MERGED] Feat/restore revision #4814

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/1549
Author: @appflowy
Created: 12/8/2022
Status: Merged
Merged: 12/9/2022
Merged by: @appflowy

Base: mainHead: opti/restore_revision


📝 Commits (7)

  • 924e6e8 chore: write snapshot
  • f6045a8 chore: add tests
  • cbe7dd6 chore: sync close
  • 38dc88c chore: restore from snapshot
  • 9911c1c chore: delete invalid revisions after restored from snapshot
  • 9ad749c chore: create default view if it fail to deserialize view's revisions when there is no snapshot
  • e717667 chore: auto generate snapshot

📊 Changes

67 files changed (+1140 additions, -582 deletions)

View changed files

📝 frontend/app_flowy/lib/plugins/grid/application/cell/text_cell_bloc.dart (+4 -2)
📝 frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/text_cell.dart (+8 -4)
📝 frontend/app_flowy/test/bloc_test/home_test/app_bloc_test.dart (+9 -9)
📝 frontend/rust-lib/Cargo.lock (+25 -12)
frontend/rust-lib/flowy-database/migrations/2022-12-08-011428_grid_rev_snapshot/down.sql (+2 -0)
frontend/rust-lib/flowy-database/migrations/2022-12-08-011428_grid_rev_snapshot/up.sql (+9 -0)
📝 frontend/rust-lib/flowy-database/src/macros.rs (+16 -1)
📝 frontend/rust-lib/flowy-database/src/schema.rs (+28 -14)
📝 frontend/rust-lib/flowy-document/src/editor/document.rs (+2 -2)
📝 frontend/rust-lib/flowy-document/src/editor/editor.rs (+11 -7)
📝 frontend/rust-lib/flowy-document/src/editor/queue.rs (+2 -4)
📝 frontend/rust-lib/flowy-document/src/manager.rs (+17 -21)
📝 frontend/rust-lib/flowy-document/src/old_editor/editor.rs (+5 -3)
📝 frontend/rust-lib/flowy-document/src/old_editor/queue.rs (+2 -4)
📝 frontend/rust-lib/flowy-document/src/services/persistence/rev_sqlite/document_rev_sqlite_v0.rs (+0 -1)
📝 frontend/rust-lib/flowy-folder/src/manager.rs (+5 -8)
📝 frontend/rust-lib/flowy-folder/src/services/folder_editor.rs (+6 -5)
📝 frontend/rust-lib/flowy-folder/src/services/persistence/version_1/app_sql.rs (+1 -1)
📝 frontend/rust-lib/flowy-folder/src/services/persistence/version_1/trash_sql.rs (+1 -1)
📝 frontend/rust-lib/flowy-folder/src/services/persistence/version_1/view_sql.rs (+1 -1)

...and 47 more files

📄 Description

  1. Generate a snapshot when close the grid
  2. Restore the grid when there are any issues when opening the grid page.
  3. Auto-generate grid snapshot per 10 revisions.

🔄 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/1549 **Author:** [@appflowy](https://github.com/appflowy) **Created:** 12/8/2022 **Status:** ✅ Merged **Merged:** 12/9/2022 **Merged by:** [@appflowy](https://github.com/appflowy) **Base:** `main` ← **Head:** `opti/restore_revision` --- ### 📝 Commits (7) - [`924e6e8`](https://github.com/AppFlowy-IO/AppFlowy/commit/924e6e8f75021f1e426105ba854497a97a03025d) chore: write snapshot - [`f6045a8`](https://github.com/AppFlowy-IO/AppFlowy/commit/f6045a81c64cd45b41ee918f0f14ee00af0b170e) chore: add tests - [`cbe7dd6`](https://github.com/AppFlowy-IO/AppFlowy/commit/cbe7dd63c7693996d5ba93da290a19c51636c2e6) chore: sync close - [`38dc88c`](https://github.com/AppFlowy-IO/AppFlowy/commit/38dc88cd849e28ec01169f4cbc603ff768fc840f) chore: restore from snapshot - [`9911c1c`](https://github.com/AppFlowy-IO/AppFlowy/commit/9911c1c00f017b4511710b1d53a19a5e7c696556) chore: delete invalid revisions after restored from snapshot - [`9ad749c`](https://github.com/AppFlowy-IO/AppFlowy/commit/9ad749cecf29e241cc5a0744e6d9af46347d6d92) chore: create default view if it fail to deserialize view's revisions when there is no snapshot - [`e717667`](https://github.com/AppFlowy-IO/AppFlowy/commit/e717667f19ae7b8d2ab0429b07d8912572ace3de) chore: auto generate snapshot ### 📊 Changes **67 files changed** (+1140 additions, -582 deletions) <details> <summary>View changed files</summary> 📝 `frontend/app_flowy/lib/plugins/grid/application/cell/text_cell_bloc.dart` (+4 -2) 📝 `frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/text_cell.dart` (+8 -4) 📝 `frontend/app_flowy/test/bloc_test/home_test/app_bloc_test.dart` (+9 -9) 📝 `frontend/rust-lib/Cargo.lock` (+25 -12) ➕ `frontend/rust-lib/flowy-database/migrations/2022-12-08-011428_grid_rev_snapshot/down.sql` (+2 -0) ➕ `frontend/rust-lib/flowy-database/migrations/2022-12-08-011428_grid_rev_snapshot/up.sql` (+9 -0) 📝 `frontend/rust-lib/flowy-database/src/macros.rs` (+16 -1) 📝 `frontend/rust-lib/flowy-database/src/schema.rs` (+28 -14) 📝 `frontend/rust-lib/flowy-document/src/editor/document.rs` (+2 -2) 📝 `frontend/rust-lib/flowy-document/src/editor/editor.rs` (+11 -7) 📝 `frontend/rust-lib/flowy-document/src/editor/queue.rs` (+2 -4) 📝 `frontend/rust-lib/flowy-document/src/manager.rs` (+17 -21) 📝 `frontend/rust-lib/flowy-document/src/old_editor/editor.rs` (+5 -3) 📝 `frontend/rust-lib/flowy-document/src/old_editor/queue.rs` (+2 -4) 📝 `frontend/rust-lib/flowy-document/src/services/persistence/rev_sqlite/document_rev_sqlite_v0.rs` (+0 -1) 📝 `frontend/rust-lib/flowy-folder/src/manager.rs` (+5 -8) 📝 `frontend/rust-lib/flowy-folder/src/services/folder_editor.rs` (+6 -5) 📝 `frontend/rust-lib/flowy-folder/src/services/persistence/version_1/app_sql.rs` (+1 -1) 📝 `frontend/rust-lib/flowy-folder/src/services/persistence/version_1/trash_sql.rs` (+1 -1) 📝 `frontend/rust-lib/flowy-folder/src/services/persistence/version_1/view_sql.rs` (+1 -1) _...and 47 more files_ </details> ### 📄 Description 1. Generate a snapshot when close the grid 2. Restore the grid when there are any issues when opening the grid page. 3. Auto-generate grid snapshot per 10 revisions. --- <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:56 +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#4814
No description provided.