Skip to content

Conversation

warpdev
Copy link
Contributor

@warpdev warpdev commented Sep 2, 2025

Summary

Pressing Enter with an empty composer was treated as a submission, which queued a blank message while a task was running. This PR suppresses submission when there is no text and no attachments.

Root Cause

  • ChatComposer returned Submitted even when the trimmed text was empty. ChatWidget then queued it during a running task, leading to an empty item appearing in the queued list and being popped later with no effect.

Changes

  • ChatComposer Enter handling: if trimmed text is empty and there are no attached images, return None instead of Submitted.
  • No changes to ChatWidget; behavior naturally stops queuing blanks at the source.

Code Paths

  • Modified: tui/src/bottom_pane/chat_composer.rs
  • Tests added:
    • tui/src/bottom_pane/chat_composer.rs: empty_enter_returns_none
    • tui/src/chatwidget/tests.rs: empty_enter_during_task_does_not_queue

Result

Before

2025-09-02.6.11.56.mov

After

2025-09-02.6.11.31.mov

@gpeal gpeal merged commit 7ac6194 into openai:main Sep 2, 2025
27 of 29 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants