Skip to content

Add Ask-User-Question autonomy speedbump#10433

Merged
coolcom200 merged 2 commits into
masterfrom
leon/aqt-default-helper-setting
May 13, 2026
Merged

Add Ask-User-Question autonomy speedbump#10433
coolcom200 merged 2 commits into
masterfrom
leon/aqt-default-helper-setting

Conversation

@coolcom200
Copy link
Copy Markdown
Contributor

@coolcom200 coolcom200 commented May 8, 2026

Description

Add a one-shot dropdown-based speedbump footer on Ask-User-Question cards that lets users adjust the ask_user_question default permission (Never / Ask except in auto-approve / Always ask) without leaving the conversation. The footer includes a link to the full autonomy settings page and fires telemetry when the permission is changed.

Key changes:

  • New AskUserQuestionPermission enum and label() method in execution profiles
  • New ShouldShowForAskUserQuestion variant in AutonomySettingSpeedbump
  • AskUserQuestionSpeedbumpFooter struct with dropdown and settings link
  • Speedbump dropdown creation, selection sync, and footer attachment logic in AIBlock
  • Telemetry event for permission changes via the speedbump
  • New should_show_agent_mode_ask_user_question_speedbump AI setting (one-shot flag)
  • Overlay event routing for the dropdown through BlockListElement and dismiss.rs

Warp conversation

Demo

Linked Issue

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Screenshots / Videos

Testing

  • Presubmit (./script/presubmit) passes
  • Manually verified cargo check compiles cleanly
  • Unit test for AskUserQuestionPermission::label() coverage

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

@cla-bot cla-bot Bot added the cla-signed label May 8, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 8, 2026

@coolcom200

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds an inline Ask-User-Question autonomy speedbump footer, a local one-shot setting, telemetry, and overlay event routing changes.

Concerns

  • Selecting a dropdown option does not clear the installed AskUserQuestionView footer; clearing only AIBlock.autonomy_setting_speedbump leaves the footer visible even though the spec says the current card should hide it immediately.
  • This is a user-visible UI/behavior change, but the PR description’s screenshots/video section is empty. Manual testing is required for changes that can be manually tested. Please include screenshots or a screen recording that show it working end to end, or justify why manual testing is not possible.

Verdict

Found: 0 critical, 2 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/ai/blocklist/block.rs Outdated
Show a one-shot dropdown footer on the first Ask-User-Question card that
lets the user adjust the active execution profile's ask_user_question
permission without leaving the conversation.

- New local-only setting to track one-shot display state
- New AutonomySettingSpeedbump variant with lazy dropdown creation
- Footer renders as attached bottom strip on completed/collapsed cards
- Dropdown updates active profile and emits telemetry
- Default permission changed from AskExceptInAutoApprove to AlwaysAsk
- Overlay event routing fixes for dropdown interactivity in block list
- Unit tests for permission mapping, action ID detection, setting defaults

Co-Authored-By: Oz <oz-agent@warp.dev>
@coolcom200 coolcom200 force-pushed the leon/aqt-default-helper-setting branch from 6570a5c to ad14a54 Compare May 8, 2026 18:30
@coolcom200 coolcom200 requested a review from szgupta May 8, 2026 18:50
Comment thread app/src/ai/blocklist/block.rs Outdated
&& is_agent_mode_autonomy_allowed(ctx)
&& *AISettings::as_ref(ctx).should_show_agent_mode_ask_user_question_speedbump
{
if let Some(action_id) = first_ask_user_question_action_id(output) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: why not just check this in the loop above (under the same surrounding conditions)?

Comment thread app/src/ai/blocklist/block.rs Outdated
Comment on lines +996 to +997
/// Kept on the block so the dropdown's event subscription survives re-renders.
ask_user_question_speedbump_dropdown: Option<ViewHandle<Dropdown<AIBlockAction>>>,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite understand why it needs to live here

#[default]
AskExceptInAutoApprove,
/// Always pause and wait for the user to answer before continuing, even in auto-approve mode.
#[default]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the backwards compatibility story here? Will this change the default for existing users who haven't changed their setting explicitly? Seems fine, just want to make sure I understand the implication

Copy link
Copy Markdown
Contributor Author

@coolcom200 coolcom200 May 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question! Existing users who had no stored value (or were default-constructed) will receive AlwaysAsk since it is #[default]. This matches the prior behavior — before this PR the setting did not exist, so every AQU action prompted the user. AlwaysAsk as the default preserves backwards compat perfectly.

Edit: AI Posted this 💀

Comment thread app/src/ai/blocklist/inline_action/ask_user_question_view.rs Outdated
@coolcom200 coolcom200 requested a review from szgupta May 12, 2026 00:00
@coolcom200 coolcom200 merged commit da3b560 into master May 13, 2026
25 of 26 checks passed
@coolcom200 coolcom200 deleted the leon/aqt-default-helper-setting branch May 13, 2026 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants