style(code): toast when submitting empty required ask_user answer - #5095
Merged
Conversation
Pressing Enter on a required `ask_user` question with no answer silently did nothing, leaving users unsure why nothing advanced. Surface a warning toast prompting them to type an answer before continuing. Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Mason Daugherty (mdrxy)
marked this pull request as ready for review
July 27, 2026 20:18
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
ask_user answerask_user answer
ask_user answerask_user answer
Mason Daugherty (mdrxy)
added a commit
that referenced
this pull request
Jul 27, 2026
Follow-up to the `multi_select` question type, fixing issues found in review. Pressing Enter on a required `multi_select` with nothing toggled was a silent no-op. `MISSING_ANSWER_TOAST` is only emitted from the text-area submit handler, and `multi_select` composes no text area, so the blocked submit produced no feedback at all — reintroducing, for the new type only, the UX problem #5095 had just fixed. It is also the only question type that can reach that state, since `multiple_choice` pre-selects its first option. Both the per-question guard and the "confirmed but empty" fallback in `confirm_and_advance` now explain the block; the latter is reachable normally by navigating back to a confirmed multi-select and un-toggling every option. `_validate_questions` accepted choices with blank or comma-containing values. A blank value rendered as a selectable row whose answer read as "no answer", leaving Enter permanently dead, and a comma made the joined answer ambiguous (two selections became four tokens). Both are now rejected at the tool boundary, where the agent sees a real error, and the constraints are documented in the tool description and LLM-facing schema alongside the answer format. `_ask_user_question_count` was already this strict, so the asymmetry meant a question the tool accepted could silently drop same-turn authorization. `QuestionType` is now the single declaration of the supported types, with `QUESTION_TYPES` derived via `get_args`, replacing the set literals that were hand-maintained in three modules. Drift there fails closed but silently. Selection state is no longer duplicated: `_MultiSelectOption.checked` is authoritative and `_QuestionWidget._selected` is gone, removing the parallel index set and the isinstance downcast that kept them in sync. Unknown question types and empty choice lists now log instead of silently rendering as text, and the docstrings that still described only two question types are updated. Adds coverage for un-toggling, choice-order joining, optional empty submit, toggle glyphs surviving cursor movement, the two toast paths, help-text gating, spaces still typing in text inputs, and a drift guard asserting both validators accept every declared question type.
Marcelo5444
pushed a commit
to Marcelo5444/deepagents
that referenced
this pull request
Jul 30, 2026
…angchain-ai#5095) `ask_user` now shows a warning toast when you press Enter on a required question without an answer. --- Pressing Enter on a required `ask_user` question with an empty answer previously did nothing and gave no feedback. This surfaces a warning toast prompting the user to type an answer before continuing, so the blocked submit is no longer silent. Made by [Open SWE](https://openswe.vercel.app/agents/0137f4f3-a001-2eb9-5cac-2616cfa197df) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Mason Daugherty (mdrxy)
pushed a commit
that referenced
this pull request
Jul 30, 2026
> [!CAUTION] > Merging this PR will automatically publish to **PyPI** and create a **GitHub release**. For the full release process, see [`.github/RELEASING.md`](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md). --- _Release notes preview: keep this section in sync with the package `CHANGELOG.md`. Publish reads the merged CHANGELOG via `release.yml`, not this PR description — keep them aligned anyway so the PR stays an accurate historical record for reviewers and anyone returning later._ --- ## [0.1.50](deepagents-code==0.1.49...deepagents-code==0.1.50) (2026-07-30) ### Highlights - Added project hooks workspace trust and expanded Hooks v2 support with client and server lifecycle events plus runtime feedback ([#5105](#5105), [#5104](#5104), [#4997](#4997), [#5045](#5045)). - Added an option to mute the “YOLO is active” toast ([#5103](#5103)). - Made the splash screen `thread` ID clickable to copy it ([#5173](#5173)). - Show `ask_user` answers directly on the answered tool row ([#5100](#5100)). - Show a toast when submitting an empty required `ask_user` answer ([#5095](#5095)). - Added thread message counts to the Debug Console ([#5117](#5117)). ### Fixes and improvements - Gated Hooks v2 behind `DEEPAGENTS_CODE_EXPERIMENTAL` and improved hook resume stability across identity and Command tool results ([#5146](#5146), [#5176](#5176)). - Kept server hook state out of task results ([#5164](#5164)). - Stopped duplicate Auto transcript events during interrupt replay ([#5157](#5157)). - Kept `/update` and `/install --package` prompts responsive ([#5127](#5127)). - Refreshed the `/threads` cache after each turn ([#5174](#5174)). - Anchored toasts above the chat input and added a toast when media is dropped into a free-text question ([#5101](#5101), [#5099](#5099)). - Improved thread status message styling and links ([#5118](#5118)). - Made resume hints echo the launched command name ([#5119](#5119)). - Scoped selection copy to the clicked screen ([#5140](#5140)). - Ignored mouse hits on detached widgets ([#5114](#5114)). _End release notes preview._ --- > [!NOTE] > A **New Contributors** section is appended to the GitHub release notes automatically at publish time (see [Release Pipeline](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md#release-pipeline), step 2). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: langchain-oss-automated-triage[bot] <248757908+langchain-oss-automated-triage[bot]@users.noreply.github.com> Co-authored-by: Johannes du Plessis <johannes@langchain.dev>
Mason Daugherty (mdrxy)
pushed a commit
that referenced
this pull request
Jul 30, 2026
> [!CAUTION] > Merging this PR will automatically publish to **PyPI** and create a **GitHub release**. For the full release process, see [`.github/RELEASING.md`](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md). --- _Release notes preview: keep this section in sync with the package `CHANGELOG.md`. Publish reads the merged CHANGELOG via `release.yml`, not this PR description — keep them aligned anyway so the PR stays an accurate historical record for reviewers and anyone returning later._ --- ## [0.1.50](deepagents-code==0.1.49...deepagents-code==0.1.50) (2026-07-30) ### Highlights - Added project hooks workspace trust and expanded Hooks v2 support with client and server lifecycle events plus runtime feedback ([#5105](#5105), [#5104](#5104), [#4997](#4997), [#5045](#5045)). - Added an option to mute the “YOLO is active” toast ([#5103](#5103)). - Made the splash screen `thread` ID clickable to copy it ([#5173](#5173)). - Show `ask_user` answers directly on the answered tool row ([#5100](#5100)). - Show a toast when submitting an empty required `ask_user` answer ([#5095](#5095)). - Added thread message counts to the Debug Console ([#5117](#5117)). ### Fixes and improvements - Gated Hooks v2 behind `DEEPAGENTS_CODE_EXPERIMENTAL` and improved hook resume stability across identity and Command tool results ([#5146](#5146), [#5176](#5176)). - Kept server hook state out of task results ([#5164](#5164)). - Stopped duplicate Auto transcript events during interrupt replay ([#5157](#5157)). - Kept `/update` and `/install --package` prompts responsive ([#5127](#5127)). - Refreshed the `/threads` cache after each turn ([#5174](#5174)). - Anchored toasts above the chat input and added a toast when media is dropped into a free-text question ([#5101](#5101), [#5099](#5099)). - Improved thread status message styling and links ([#5118](#5118)). - Made resume hints echo the launched command name ([#5119](#5119)). - Scoped selection copy to the clicked screen ([#5140](#5140)). - Ignored mouse hits on detached widgets ([#5114](#5114)). _End release notes preview._ --- > [!NOTE] > A **New Contributors** section is appended to the GitHub release notes automatically at publish time (see [Release Pipeline](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md#release-pipeline), step 2). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: langchain-oss-automated-triage[bot] <248757908+langchain-oss-automated-triage[bot]@users.noreply.github.com> Co-authored-by: Johannes du Plessis <johannes@langchain.dev>
Mason Daugherty (mdrxy)
added a commit
that referenced
this pull request
Aug 17, 2026
Follow-up to the `multi_select` question type, fixing issues found in review. Pressing Enter on a required `multi_select` with nothing toggled was a silent no-op. `MISSING_ANSWER_TOAST` is only emitted from the text-area submit handler, and `multi_select` composes no text area, so the blocked submit produced no feedback at all — reintroducing, for the new type only, the UX problem #5095 had just fixed. It is also the only question type that can reach that state, since `multiple_choice` pre-selects its first option. Both the per-question guard and the "confirmed but empty" fallback in `confirm_and_advance` now explain the block; the latter is reachable normally by navigating back to a confirmed multi-select and un-toggling every option. `_validate_questions` accepted choices with blank or comma-containing values. A blank value rendered as a selectable row whose answer read as "no answer", leaving Enter permanently dead, and a comma made the joined answer ambiguous (two selections became four tokens). Both are now rejected at the tool boundary, where the agent sees a real error, and the constraints are documented in the tool description and LLM-facing schema alongside the answer format. `_ask_user_question_count` was already this strict, so the asymmetry meant a question the tool accepted could silently drop same-turn authorization. `QuestionType` is now the single declaration of the supported types, with `QUESTION_TYPES` derived via `get_args`, replacing the set literals that were hand-maintained in three modules. Drift there fails closed but silently. Selection state is no longer duplicated: `_MultiSelectOption.checked` is authoritative and `_QuestionWidget._selected` is gone, removing the parallel index set and the isinstance downcast that kept them in sync. Unknown question types and empty choice lists now log instead of silently rendering as text, and the docstrings that still described only two question types are updated. Adds coverage for un-toggling, choice-order joining, optional empty submit, toggle glyphs surviving cursor movement, the two toast paths, help-text gating, spaces still typing in text inputs, and a drift guard asserting both validators accept every declared question type.
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.
ask_usernow shows a warning toast when you press Enter on a required question without an answer.Pressing Enter on a required
ask_userquestion with an empty answer previously did nothing and gave no feedback. This surfaces a warning toast prompting the user to type an answer before continuing, so the blocked submit is no longer silent.BEGIN_COMMIT_OVERRIDE
style(code): toast when submitting empty required
ask_useranswerEND_COMMIT_OVERRIDE
Made by Open SWE