Skip to content

Don't toggle the help panel on '?' while editing a queued prompt#13685

Draft
warp-dev-github-integration[bot] wants to merge 1 commit into
masterfrom
oz/queued-prompt-question-mark-insert-fix
Draft

Don't toggle the help panel on '?' while editing a queued prompt#13685
warp-dev-github-integration[bot] wants to merge 1 commit into
masterfrom
oz/queued-prompt-question-mark-insert-fix

Conversation

@warp-dev-github-integration

Copy link
Copy Markdown
Contributor

Description

When editing a queued prompt inline in the queued prompts panel (with the regular input buffer empty), typing ? incorrectly toggled the help/shortcuts panel above the input instead of inserting the character into the queued prompt being edited.

Root cause: the fixed shift-? binding for InputAction::ToggleAgentViewShortcuts is guarded by EMPTY_INPUT_BUFFER, which reflects only the main input editor's buffer. The queued-prompt inline editor is a separate EditorView, so the predicate stayed true mid-edit and the binding consumed the keystroke.

Fix: exclude the existing QueuedPromptInlineEditorOpen keymap context flag (already set by Input::keymap_context() whenever a queued row is being edited) from the binding's predicate — mirroring the exclusion already used by the Show History binding. With the binding no longer matching, ? falls through to normal character insertion in the queued-prompt editor.

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

Testing

Added a regression test shift_question_mark_does_not_toggle_agent_view_shortcuts_while_editing_queued_prompt in app/src/terminal/input_tests.rs:

  • Control case: with no queued prompt being edited, shift-? is handled and toggles the shortcuts view open/closed (proves the binding is reachable in the harness).
  • Regression case: after queuing a prompt and entering inline edit mode, dispatching shift-? is not handled and the shortcuts view stays closed.

Validation run locally (headless Linux sandbox, so no manual GUI run):

  • cargo nextest run -p warp shift_question_mark_does_not_toggle_agent_view_shortcuts_while_editing_queued_prompt — passes

  • cargo nextest run -p warp -E 'test(queued) + test(shortcut)' — 105/105 pass

  • cargo fmt -p warp -- --check — clean

  • cargo clippy -p warp --tests -- -D warnings — clean

  • I have manually tested my changes locally with ./script/run

Agent Mode

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

CHANGELOG-BUG-FIX: Fixed typing ? while editing a queued prompt opening the help panel instead of inserting the character.

Conversation: https://staging.warp.dev/conversation/ee89cb70-804c-4215-a43e-2f161ec86f79
Run: https://oz.staging.warp.dev/runs/019f5d5a-7964-74f3-ba8f-396bbd132ed0

This PR was generated with Oz.

The shift-? FixedBinding for InputAction::ToggleAgentViewShortcuts was
guarded only by EMPTY_INPUT_BUFFER (the main input editor's buffer),
which stays true while a queued prompt is being edited inline (the
queued-prompt editor is a separate text buffer). As a result, typing
'?' into an in-progress queued-prompt edit incorrectly toggled the
help/shortcuts panel instead of inserting the character.

Exclude the existing QueuedPromptInlineEditorOpen keymap context flag
from the binding's predicate, mirroring the same exclusion already
used by the Show History custom binding. Add a regression test that
exercises the shift-? keystroke both with and without an active
queued-prompt inline edit, verifying the shortcuts panel only toggles
in the former case.

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