Don't raise the help panel on '?' while editing a queued prompt#13671
Draft
warp-dev-github-integration[bot] wants to merge 1 commit into
Draft
Don't raise the help panel on '?' while editing a queued prompt#13671warp-dev-github-integration[bot] wants to merge 1 commit into
warp-dev-github-integration[bot] wants to merge 1 commit into
Conversation
The `shift-?` -> `ToggleAgentViewShortcuts` FixedBinding on the Input keymap context raises the agent view shortcuts (help) panel when the regular input buffer is empty and agent view is active. While a queued prompt is being edited inline in the queued prompts panel, the inline edit editor is a focused descendant of the Input view, so the Input keymap context stays active. With an empty regular input, the `shift-?` binding therefore fired and swallowed the keystroke, opening the help panel instead of letting the queued-prompt editor insert '?'. Guard the binding with the existing QUEUED_PROMPT_INLINE_EDITOR_OPEN_CONTEXT context flag (the same flag already used to keep up/down arrow keys inside the queued-prompt inline editor). This suppresses the help-panel toggle while a queued prompt is being edited, so '?' is handled normally and inserted into the queued prompt being edited. Co-Authored-By: Oz <oz-agent@warp.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When editing a queued prompt inline in the queued prompts panel with an empty regular input, pressing
?incorrectly raised the agent view shortcuts (help) panel above the input instead of being inserted into the queued prompt being edited.Root cause: the
shift-?→ToggleAgentViewShortcutsFixedBindingon the Input keymap context fires whenever the regular input buffer is empty (EMPTY_INPUT_BUFFER) and agent view is active (ACTIVE_AGENT_VIEW). While a queued prompt is being edited inline, the inline edit editor is a focused descendant of the Input view, so the Input keymap context remains active. With an empty regular input, theshift-?binding matched and swallowed the keystroke — opening the help panel instead of letting the queued-prompt editor handle?as ordinary text input.Fix: add the existing
QUEUED_PROMPT_INLINE_EDITOR_OPEN_CONTEXTguard to the binding's context predicate. This is the same flag already used to keep up/down arrow keys inside the queued-prompt inline editor (it is set inInput::keymap_contextwhenis_editing_queued_promptis true). With the guard, the help-panel toggle is suppressed while a queued prompt is being edited, so?falls through to the inline editor and is inserted like any other character.The change is one line in
app/src/terminal/input.rs: theshift-?FixedBindingcontext predicate gains& !id!(QUEUED_PROMPT_INLINE_EDITOR_OPEN_CONTEXT), matching the adjacent guards.Linked Issue
N/A — self-contained bug fix to the queued-prompt inline editor / help-panel keybinding interaction.
ready-to-specorready-to-implement.Testing
./script/runThis is a keymap-context-predicate change that mirrors an existing, proven guard: the earlier "keep up/down arrow keys inside the queued-prompt inline editor" change added the same
QUEUED_PROMPT_INLINE_EDITOR_OPEN_CONTEXTflag to theUpbinding's context predicate. The flag is set inInput::keymap_contextbased onis_editing_queued_prompt, which returns true while a queued row is being edited inline.Manual verification steps:
?while focused in the queued-prompt inline editor.?is not inserted. After the fix:?is inserted into the queued prompt being edited and the help panel does not open.?when not editing a queued prompt (empty regular input, agent view active).No new automated test was added: the change is a one-line keymap-context predicate reusing an already-defined constant that is already used identically in the same
initfunction (for theUpbinding guard), consistent with how the analogous arrow-key guard was shipped. A full from-scratch build/test run was not feasible in this environment; the change compiles by construction (identical usage to the adjacent guards).Screenshots / Videos
N/A.
Agent Mode
Changelog Entries for Stable
CHANGELOG-BUG-FIX: Typing
?while editing a queued prompt no longer opens the help panel;?is now inserted into the queued prompt being edited.Conversation: https://staging.warp.dev/conversation/b972b4bf-df8e-492f-a667-28d16df10a10
Run: https://oz.staging.warp.dev/runs/019f5d5a-2df9-7860-9ed8-5dfbf844ea74
This PR was generated with Oz.