Skip to content

fix(coding-agent): reject empty clarify_user answers in native TUI - #312

Open
li-xiu-qi wants to merge 1 commit into
stepfun-ai:mainfrom
li-xiu-qi:fix/clarify-tui-empty-submission
Open

li-xiu-qi wants to merge 1 commit into
stepfun-ai:mainfrom
li-xiu-qi:fix/clarify-tui-empty-submission

Conversation

@li-xiu-qi

@li-xiu-qi li-xiu-qi commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #311

Problem

Native TUI clarify_user ignored an empty editor submission. Pressing Enter with an empty or whitespace-only freeform answer did nothing: no submit, no cancel, and no error. Esc still cancelled, so the broken path was specifically empty Enter.

Change

Reject empty freeform answers in the native TUI dialog with an inline validation error.

  • Empty or whitespace-only Enter does not submit and does not cancel.
  • Show Enter an answer before submitting under the answer editor.
  • Keep the current editor content.
  • Clear the error when the user types.
  • Non-empty Enter submits as before.
  • Esc still cancels.

No protocol, RPC, or persisted data change.

Validation

before:
9c92eb2f-e6be-4c0b-800c-d0e9f9ef2ea6

after:
ab1f8d33-e91b-465d-a212-f359609d96fe

Windows, Node.js 24.21.0:

  • pnpm exec vitest --run test/suite/regressions/311-clarify-tui-empty-submission.test.ts: 1 test passed.
  • pnpm run check: passed.

Limitations

None.

Pressing Enter with an empty freeform answer in the native TUI dialog
previously did nothing. Show an inline validation error, keep the current
input, and clear the error once the user types. Esc still cancels.

Fixes stepfun-ai#311
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant