fix(desktop): queue a single pending send during streaming#460
Merged
Chevey339 merged 1 commit intoChevey339:masterfrom Apr 10, 2026
Merged
fix(desktop): queue a single pending send during streaming#460Chevey339 merged 1 commit intoChevey339:masterfrom
Chevey339 merged 1 commit intoChevey339:masterfrom
Conversation
Block desktop shortcut sends from starting a second generation while the current turn is still streaming. Queue one pending composer input instead, show a three-line preview, and allow canceling the queued item back into the editable composer with attachments restored. Move the guard into the controller/view-model send path so keyboard shortcuts cannot bypass the stop-state protection, and automatically dispatch the queued input when the active generation finishes or is stopped. Closes Chevey339#458 Files changed: - lib/core/models/chat_input_data.dart: add single-queue submission result and queued input model - lib/features/home/controllers/home_page_controller.dart: return send submission results and restore queued input back into the composer on cancel - lib/features/home/controllers/home_view_model.dart: add single pending-send queue, block concurrent sends, and auto-drain after streaming stops - lib/features/home/pages/home_page.dart: pass queued input state and preview text into the shared chat input section - lib/features/home/widgets/chat_input_bar.dart: make send async-result aware, lock the composer while queued, and render queued preview/cancel UI - lib/features/home/widgets/chat_input_section.dart: thread queued-input state and preview props into ChatInputBar - lib/l10n/app_en.arb: add queued pending/cancel strings - lib/l10n/app_localizations.dart: regenerate localization accessors for queued-input strings - lib/l10n/app_localizations_en.dart: regenerate English queued-input strings - lib/l10n/app_localizations_zh.dart: regenerate Chinese queued-input strings - lib/l10n/app_zh.arb: add queued pending/cancel strings - lib/l10n/app_zh_Hans.arb: add queued pending/cancel strings - lib/l10n/app_zh_Hant.arb: add queued pending/cancel strings - test/features/home/widgets/chat_input_bar_queue_test.dart: cover queued send clearing, rejected send retention, and queued preview/cancel UI Files changed: 14 Signed-off-by: Shuchen Luo <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Block desktop shortcut sends from starting a second generation while the current turn is still streaming. Queue one pending composer input instead, show a three-line preview, and allow canceling the queued item back into the editable composer with attachments restored.
Move the guard into the controller/view-model send path so keyboard shortcuts cannot bypass the stop-state protection, and automatically dispatch the queued input when the active generation finishes or is stopped.
Closes #458
Files changed: