Skip to content

Skip AgentTips with unresolved keybinding placeholders#9509

Draft
MaggieShan wants to merge 1 commit intomasterfrom
oz-agent/agent-tips-voice-keybinding-fix
Draft

Skip AgentTips with unresolved keybinding placeholders#9509
MaggieShan wants to merge 1 commit intomasterfrom
oz-agent/agent-tips-voice-keybinding-fix

Conversation

@MaggieShan
Copy link
Copy Markdown
Contributor

Description

When an AgentTip description contains <keybinding> but no keybinding is actually configured, the tip would be selected and shown with the literal text <keybinding> in the UI (e.g. "Hold to speak your prompt directly to the agent.").

This was specifically a problem for the voice mode tip: it is added to the tips pool whenever voice input is enabled, but the voice_input_toggle_key setting defaults to None and is only set after the user first interacts with the voice button (maybe_setup_first_time_voice).

Fix: Added a check in AgentTip::is_tip_applicable that returns false for any tip whose description contains the <keybinding> placeholder but has no resolved keybinding. This ensures such tips are filtered out during maybe_refresh_tip and never displayed with the raw placeholder string.

The same guard also protects all other keybinding-based tips (e.g. toggle input mode, command palette, select previous block, etc.) in case a user has unbound the corresponding action.

Testing

The fix is in is_tip_applicable, which is called every time maybe_refresh_tip filters the tip pool. The voice tip (and any other tip with an unresolvable <keybinding>) will now simply be absent from the pool of candidates until the keybinding is configured. Verified by reading through the full keybinding resolution path (keystroke()VoiceInputToggleKey::keystroke() → returns None for VoiceInputToggleKey::None).

No automated tests added — existing test coverage for is_tip_applicable is limited; the logic is straightforward and the path is exercised by the existing tip selection flow.

Agent Mode

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

CHANGELOG-BUG-FIX: Fixed AgentTips showing literal <keybinding> when no keybinding is configured (e.g. voice tip before first voice interaction).

Conversation: https://staging.warp.dev/conversation/02fcb9e5-14d7-4b23-8675-3371b438424a
Run: https://oz.staging.warp.dev/runs/019ddb4b-b9f1-7e83-9f49-eb9874ebd766

This PR was generated with Oz.

When a tip's description contains '<keybinding>' but no keybinding is
configured (e.g. voice mode tip with voice_input_toggle_key == None),
is_tip_applicable now returns false so the raw '<keybinding>' string
is never shown to users.

This specifically fixes the voice tip: it is added to the tips pool
whenever voice input is enabled, but the keybinding is only set after
the user first interacts with voice. Previously the tip could be
selected and displayed with the literal text '<keybinding>'. Now it is
filtered out at refresh time until a toggle key is configured.

The same guard also protects all other keybinding-based tips in case
a user has unbound the corresponding action.

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label Apr 29, 2026
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.

1 participant