Don't auto-submit multi-select agent questions on toggle#12545
Draft
coolcom200 wants to merge 1 commit into
Draft
Don't auto-submit multi-select agent questions on toggle#12545coolcom200 wants to merge 1 commit into
coolcom200 wants to merge 1 commit into
Conversation
For AskUserQuestion, the last multi-select question previously auto-submitted the questionnaire as soon as a single option was toggled via mouse click or number key. This made it impossible to select more than one option before the answer was submitted. Multi-select questions now never auto-submit on toggle. Options are toggled explicitly via click/number keys and the user submits with Enter. Single-select behavior (auto-advance/auto-submit on selection) is unchanged. Enter also no longer toggles the highlighted option for multi-select; it just commits the current selection. Co-Authored-By: Oz <oz-agent@warp.dev>
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.
Description
For the
AskUserQuestiontool, the last multi-select question would auto-submit the whole questionnaire as soon as a single option was toggled — whether by clicking it with the mouse or pressing its number key. This made it impossible to select more than one option (the reported case: a user clicked the first option intending to also click the next, but it submitted after the first click).Multi-select questions now never auto-submit on toggle. Options are toggled explicitly via mouse click or number keys, and the user submits the question with Enter. Single-select behavior is unchanged (toggling an option still auto-advances / auto-submits the last question).
Changes
ask_user_question_auto_advance_enablednow keys offis_multiselectonly — single-select auto-advances, multi-select never does.toggle_optionno longer schedules an auto-advance for multi-select questions.save_other_textfollows the same rule for the "Other…" free-text path on multi-select questions.press_enterno longer toggles the highlighted option for multi-select; it just commits the current selection and submits/advances (single-select still activates the highlighted option on Enter). This also fixes Enter accidentally un-toggling the last-clicked/hovered option in multi-select.Linked Issue
ready-to-specorready-to-implement.Testing
Updated and extended the
ask_user_question_viewunit tests to cover the new behavior, and ran them:New/updated tests:
last_multi_select_toggle_does_not_auto_advance,last_multi_select_submits_on_enter,enter_on_multi_select_does_not_toggle_highlighted_option,enter_on_answered_multi_select_keeps_selection_without_toggling_highlighted_option.I have manually tested my changes locally with
./script/runAgent Mode
Conversation: https://staging.warp.dev/conversation/5044c0f2-de4e-4143-989e-7e55b7a6c62e
Run: https://oz.staging.warp.dev/runs/019eb8d5-5f41-77df-b381-ce5db367205a
This PR was generated with Oz.