From dc71d1caebfde864a8edc0963b0b60eb934ea754 Mon Sep 17 00:00:00 2001 From: ggurdin <46800240+ggurdin@users.noreply.github.com> Date: Thu, 29 Jan 2026 10:20:56 -0500 Subject: [PATCH] fix: on IT closed, only replace source text if IT manually dismissed to prevent race condition with accepted continuance stream for single-span translation (#5510) --- lib/pangea/choreographer/choreographer.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pangea/choreographer/choreographer.dart b/lib/pangea/choreographer/choreographer.dart index 0a5e11d2c..31d869862 100644 --- a/lib/pangea/choreographer/choreographer.dart +++ b/lib/pangea/choreographer/choreographer.dart @@ -372,7 +372,9 @@ class Choreographer extends ChangeNotifier { } void _onCloseIT() { - if (currentText.isEmpty && itController.sourceText.value != null) { + if (itController.dismissed && + currentText.isEmpty && + itController.sourceText.value != null) { textController.setSystemText( itController.sourceText.value!, EditTypeEnum.itDismissed,