Skip to content

[Bug] clarify_user native TUI ignores empty editor submissions while RPC rejects them #311

Open

Description

@li-xiu-qi

Summary

In native TUI mode, clarify_user silently ignores an empty editor submission. Pressing Enter with an empty or whitespace-only freeform answer produces no visible feedback: the dialog does not submit, does not cancel, and does not show an error.

The RPC path already returns an explicit error for empty or whitespace-only freeform answers, so the native TUI path and the RPC path are inconsistent.

Current behavior

  1. Trigger clarify_user in TUI mode with a freeform-only question.
  2. Focus the answer editor.
  3. Press Enter without entering text.

Observed result:

  • Nothing happens.
  • No validation message is shown.
  • The dialog stays open.
  • The user cannot tell whether the key was swallowed by the editor, the dialog, or the terminal.

Esc still cancels the dialog, but Enter has no observable effect when the answer is empty.

Expected behavior

An empty or whitespace-only Enter should be handled explicitly, not silently ignored.

  • Do not submit an empty answer.
  • Do not treat empty Enter as cancellation.
  • Show an inline validation message near the answer editor, for example: Enter an answer before submitting.
  • Keep the current editor content so the user can continue typing.
  • Clear the validation message as soon as the user enters text.
  • Non-empty Enter should continue to submit the answer as before.
  • Esc should continue to cancel.

Why this is a bug

clarify_user is a blocking clarification dialog. In that context, Enter means “submit my answer”. A required answer may reject an empty submission, but the rejection must be visible. Silently ignoring the key leaves the user without actionable feedback.

The RPC path already rejects empty freeform answers with an explicit error, so the native TUI path should provide an equally explicit result.

Scope

This issue covers only the native TUI dialog behavior. The RPC error handling from #306 remains unchanged, and this does not require a protocol change.

Version

0.84.4

Activity

  1. changed the title [-]clarify_user native TUI ignores empty editor submissions while RPC rejects them[/-] [+][Bug] clarify_user native TUI ignores empty editor submissions while RPC rejects them[/+] on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/tuisrc/tuibugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions