[PR #6388] [MERGED] fix: potential ai_repository not init #7355

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/6388
Author: @LucasXu0
Created: 9/24/2024
Status: Merged
Merged: 9/24/2024
Merged by: @LucasXu0

Base: mainHead: fix_potential_ai_repository_not_init


📝 Commits (7)

  • 6bd8ddb fix: potential ai_repository not init
  • 28fac2a fix: assertion when deleting block
  • 74be332 chore: remove the rule
  • 5306025 test: add smart edit bloc test
  • d2ebde5 test: add delete block test
  • de8b6a2 chore: remove unused_import
  • 78b1071 fix: paste image integration test

📊 Changes

11 files changed (+220 additions, -82 deletions)

View changed files

📝 frontend/appflowy_flutter/integration_test/cloud/appflowy_cloud_auth_test.dart (+4 -0)
frontend/appflowy_flutter/integration_test/cloud/document/document_delete_block_test.dart (+60 -0)
📝 frontend/appflowy_flutter/integration_test/cloud/document/document_drag_block_test.dart (+0 -24)
📝 frontend/appflowy_flutter/integration_test/desktop/document/document_copy_and_paste_test.dart (+4 -3)
📝 frontend/appflowy_flutter/lib/plugins/document/application/document_bloc.dart (+12 -16)
📝 frontend/appflowy_flutter/lib/plugins/document/application/editor_transaction_adapter.dart (+11 -19)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/actions/block_action_option_button.dart (+3 -0)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/paste_from_image.dart (+2 -9)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/widgets/smart_edit_bloc.dart (+27 -10)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/widgets/smart_edit_node_widget.dart (+3 -1)
frontend/appflowy_flutter/test/bloc_test/smart_edit_test/smart_editor_bloc_test.dart (+94 -0)

📄 Description

Feature Preview

  • fix ai_repository not initialized assertion
  • fix deleting block assertion
  • tests

PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

🔄 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/6388 **Author:** [@LucasXu0](https://github.com/LucasXu0) **Created:** 9/24/2024 **Status:** ✅ Merged **Merged:** 9/24/2024 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `fix_potential_ai_repository_not_init` --- ### 📝 Commits (7) - [`6bd8ddb`](https://github.com/AppFlowy-IO/AppFlowy/commit/6bd8ddb0a1967d86f63951fe072f0e3e2765eb74) fix: potential ai_repository not init - [`28fac2a`](https://github.com/AppFlowy-IO/AppFlowy/commit/28fac2aab532001e5a0f8bc0ad783e734ce2de88) fix: assertion when deleting block - [`74be332`](https://github.com/AppFlowy-IO/AppFlowy/commit/74be3324189d2a2837ae399bf6e338184e00c110) chore: remove the rule - [`5306025`](https://github.com/AppFlowy-IO/AppFlowy/commit/5306025c5b0e843e4ad0ca6842fb5de3df780e6d) test: add smart edit bloc test - [`d2ebde5`](https://github.com/AppFlowy-IO/AppFlowy/commit/d2ebde5dc874e0cdb24a5948417ff6af45ae663b) test: add delete block test - [`de8b6a2`](https://github.com/AppFlowy-IO/AppFlowy/commit/de8b6a22fda44df5f8065e8259b3e4d3d26261b1) chore: remove unused_import - [`78b1071`](https://github.com/AppFlowy-IO/AppFlowy/commit/78b107122335689779a659860c1203a155abc868) fix: paste image integration test ### 📊 Changes **11 files changed** (+220 additions, -82 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/integration_test/cloud/appflowy_cloud_auth_test.dart` (+4 -0) ➕ `frontend/appflowy_flutter/integration_test/cloud/document/document_delete_block_test.dart` (+60 -0) 📝 `frontend/appflowy_flutter/integration_test/cloud/document/document_drag_block_test.dart` (+0 -24) 📝 `frontend/appflowy_flutter/integration_test/desktop/document/document_copy_and_paste_test.dart` (+4 -3) 📝 `frontend/appflowy_flutter/lib/plugins/document/application/document_bloc.dart` (+12 -16) 📝 `frontend/appflowy_flutter/lib/plugins/document/application/editor_transaction_adapter.dart` (+11 -19) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/actions/block_action_option_button.dart` (+3 -0) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/paste_from_image.dart` (+2 -9) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/widgets/smart_edit_bloc.dart` (+27 -10) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/widgets/smart_edit_node_widget.dart` (+3 -1) ➕ `frontend/appflowy_flutter/test/bloc_test/smart_edit_test/smart_editor_bloc_test.dart` (+94 -0) </details> ### 📄 Description <!--- Thank you for submitting a pull request to AppFlowy. The team will dedicate their best efforts to reviewing and approving your pull request. If you have any questions about the project or feedback for us, please join our [Discord](https://discord.gg/wdjWUXXhtw). --> <!--- If your pull request adds a new feature, please drag and drop a video into this section to showcase what you've done! If not, you may delete this section. --> ### Feature Preview - [x] fix ai_repository not initialized assertion - [x] fix deleting block assertion - [x] tests <!--- List at least one issue here that this PR addresses. If it fixes the issue, please use the [fixes](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) keyword to close the issue. For example: fixes https://github.com/AppFlowy-IO/AppFlowy/pull/2106 --> --- <!--- Before you mark this PR ready for review, run through this checklist! --> #### PR Checklist - [x] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [ ] I've listed at least one issue that this PR fixes in the description above. - [x] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [ ] All existing tests are passing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 23:19:15 +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#7355
No description provided.