Skip to content

fix(ui): Gate Voice Input in toolbar layout editor based on features and settings#9969

Open
PratikRai0101 wants to merge 4 commits intowarpdotdev:masterfrom
PratikRai0101:fix/cli-toolbar-voice-input
Open

fix(ui): Gate Voice Input in toolbar layout editor based on features and settings#9969
PratikRai0101 wants to merge 4 commits intowarpdotdev:masterfrom
PratikRai0101:fix/cli-toolbar-voice-input

Conversation

@PratikRai0101
Copy link
Copy Markdown

fix(ui): Gate Voice Input in toolbar layout editor based on features and settings

Description

This PR addresses Bug 2 from issue #9958, correcting a UI mismatch where the "Voice Input" button was visible in the CLI toolbar layout editor even when the feature was disabled or unavailable.

The implementation ensures that the VoiceInput item is correctly gated by:

  • Compile-time checks: Using cfg!(feature = "voice_input") in toolbar_item.rs to omit the item from available and default lists if the feature isn't compiled.
  • Runtime checks: Utilizing AISettings::is_voice_input_enabled(app) in editor.rs to dynamically filter the item based on user settings.
  • State Synchronization: Updating the is_at_defaults and saving logic to account for the dynamic visibility of the Voice Input button, preventing false-positive "custom" layout detections.

Linked Issue

Addresses Bug 2 in #9958

  • 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.

Screenshots / Videos

N/A - Logic and state gating update.

Testing

Verified that toggling the global Voice Input setting correctly updates the "Available" chips list in the layout configurator. Confirmed that the "is at defaults" check remains accurate when the Voice Input button is hidden.

Agent Mode

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

Changelog Entries for Stable

CHANGELOG-BUG-FIX: Fixed an issue where the Voice Input button would appear as a configuration option in the CLI agent toolbar even when the feature was disabled in settings.

@cla-bot cla-bot Bot added the cla-signed label May 3, 2026
@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 3, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 3, 2026

@PratikRai0101

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 gates the toolbar layout editor's Voice Input option on the compiled feature and runtime AI settings.

Concerns

  • The runtime filtering only removes Voice Input from the available/unused bank, so layouts that already include it in a selected zone still show it while voice input is disabled.
  • One of the compile-time gates changes the CLI default toolbar order when the feature is enabled.

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/agent_view/agent_input_footer/editor.rs
Comment thread app/src/ai/blocklist/agent_view/agent_input_footer/toolbar_item.rs
@PratikRai0101
Copy link
Copy Markdown
Author

/oz-review

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 3, 2026

@PratikRai0101

I'm re-reviewing this pull request in response to a review 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 compile-time and runtime gating for the Voice Input toolbar item in the toolbar layout editor.

Concerns

  • The inline editor does not refresh its existing chip configurator state when the voice input setting changes, so Voice Input can remain visible in the editor until a reset/reopen and can still be saved from stale state.

Verdict

Found: 0 critical, 1 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/agent_view/agent_input_footer/editor.rs
@PratikRai0101
Copy link
Copy Markdown
Author

/oz-review

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 3, 2026

@PratikRai0101

I'm re-reviewing this pull request in response to a review 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 gates the Voice Input toolbar item from the editor based on compile-time support and runtime AI/voice settings.

Concerns

  • When Voice Input is disabled, the editor removes the item from the in-memory layout; any subsequent save can persist that filtered layout and erase the user's previous Voice Input placement.

Verdict

Found: 0 critical, 1 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/agent_view/agent_input_footer/editor.rs Outdated
@PratikRai0101
Copy link
Copy Markdown
Author

/oz-review

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 3, 2026

@PratikRai0101

I'm re-reviewing this pull request in response to a review 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 gates Voice Input in the toolbar layout editor using compile-time feature availability and AI settings, and attempts to preserve hidden VoiceInput items while the setting is disabled.

Concerns

  • Saving while voice input is disabled can mutate stored toolbar layouts because hidden VoiceInput items are appended back rather than restored at their original positions.
  • For faster review, please upload screenshots or a video of the toolbar layout editor working end to end with Voice Input enabled and disabled.

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/agent_view/agent_input_footer/editor.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant