[PR #2100] [MERGED] fix: open-ai replace does not work in certain use-cases #5090

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/2100
Author: @squidrye
Created: 3/23/2023
Status: Merged
Merged: 3/27/2023
Merged by: @LucasXu0

Base: mainHead: open-ai-replace-fix-2092


📝 Commits (8)

  • 8cc3eb4 test: added test to verify correct ordering after replacement of multiline text-nodes
  • f02fcda fix: open-ai replace does not work on certain use-cases
  • bcc014e refactor: using predefined operation insert node to create new nodes.
  • 209b062 Revert "refactor: using predefined operation insert node to create new nodes."
  • b449464 refactor: using predefined operation insert node to create new nodes.
  • 57f82cf fix: open-ai replace does not work in certain use-cases
  • 4966657 fix: fixed logic and tests for replacement of larger textNodes with smaller text.
  • 1e60ab5 Merge branch 'AppFlowy-IO:main' into open-ai-replace-fix-2092

📊 Changes

2 files changed (+76 additions, -8 deletions)

View changed files

📝 frontend/appflowy_flutter/packages/appflowy_editor/lib/src/core/transform/transaction.dart (+38 -7)
📝 frontend/appflowy_flutter/packages/appflowy_editor/test/core/transform/transaction_test.dart (+38 -1)

📄 Description

Replacing lesser number of available multi-line text nodes with higher number of incoming multi-line nodes lead to inconsistencies such as overwriting and unexpected line skips, this PR fixes the issue.

fixes #2092


🔄 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/2100 **Author:** [@squidrye](https://github.com/squidrye) **Created:** 3/23/2023 **Status:** ✅ Merged **Merged:** 3/27/2023 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `open-ai-replace-fix-2092` --- ### 📝 Commits (8) - [`8cc3eb4`](https://github.com/AppFlowy-IO/AppFlowy/commit/8cc3eb48465ea59371780701b5bc2f3e78dda862) test: added test to verify correct ordering after replacement of multiline text-nodes - [`f02fcda`](https://github.com/AppFlowy-IO/AppFlowy/commit/f02fcda8c04448720d3d23bac6db1ca44cb0831e) fix: open-ai replace does not work on certain use-cases - [`bcc014e`](https://github.com/AppFlowy-IO/AppFlowy/commit/bcc014e84d09633ee14d5090f06e609fa95af481) refactor: using predefined operation insert node to create new nodes. - [`209b062`](https://github.com/AppFlowy-IO/AppFlowy/commit/209b0626a710be0dff6035e9da89cfce3e5cc71c) Revert "refactor: using predefined operation insert node to create new nodes." - [`b449464`](https://github.com/AppFlowy-IO/AppFlowy/commit/b449464ce45df2b6e5fabc44a065292b6f714fc4) refactor: using predefined operation insert node to create new nodes. - [`57f82cf`](https://github.com/AppFlowy-IO/AppFlowy/commit/57f82cf0d568c97fae80c8c067905d30ef76e0d5) fix: open-ai replace does not work in certain use-cases - [`4966657`](https://github.com/AppFlowy-IO/AppFlowy/commit/4966657c75cc426e6f41512f8df5b036eb85ae1a) fix: fixed logic and tests for replacement of larger textNodes with smaller text. - [`1e60ab5`](https://github.com/AppFlowy-IO/AppFlowy/commit/1e60ab5569024b13ceb9b826ca9ac9ee685a8c9e) Merge branch 'AppFlowy-IO:main' into open-ai-replace-fix-2092 ### 📊 Changes **2 files changed** (+76 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/packages/appflowy_editor/lib/src/core/transform/transaction.dart` (+38 -7) 📝 `frontend/appflowy_flutter/packages/appflowy_editor/test/core/transform/transaction_test.dart` (+38 -1) </details> ### 📄 Description Replacing lesser number of available multi-line text nodes with higher number of incoming multi-line nodes lead to inconsistencies such as overwriting and unexpected line skips, this PR fixes the issue. fixes #2092 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 22:17:11 +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#5090
No description provided.