fix(ui): Gate Voice Input in toolbar layout editor based on features and settings#9969
fix(ui): Gate Voice Input in toolbar layout editor based on features and settings#9969PratikRai0101 wants to merge 4 commits intowarpdotdev:masterfrom
Conversation
…and settings (Fixes Bug 2 from warpdotdev#9958)
|
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 Powered by Oz |
There was a problem hiding this comment.
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
|
/oz-review |
|
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 Powered by Oz |
There was a problem hiding this comment.
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
|
/oz-review |
|
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 Powered by Oz |
There was a problem hiding this comment.
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
|
/oz-review |
|
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 Powered by Oz |
There was a problem hiding this comment.
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
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
VoiceInputitem is correctly gated by:cfg!(feature = "voice_input")intoolbar_item.rsto omit the item from available and default lists if the feature isn't compiled.AISettings::is_voice_input_enabled(app)ineditor.rsto dynamically filter the item based on user settings.is_at_defaultsand 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
ready-to-specorready-to-implement.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
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.