fix(input): Tab accepts inline autosuggestion directly instead of opening popup#10239
fix(input): Tab accepts inline autosuggestion directly instead of opening popup#10239hayekw wants to merge 3 commits intowarpdotdev:masterfrom
Conversation
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Jason Wang.
|
|
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 |
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Jason Wang.
|
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Jason Wang.
|
There was a problem hiding this comment.
Overview
This PR changes Tab handling so an active inline autosuggestion is accepted before opening shell completions, and adds an integration test for that behavior.
Concerns
- The new Tab branch conflicts with the existing autosuggestion/completion flow that expects Tab to open completions and clear autosuggestions when that feature flag is enabled.
- The added integration test seeds history with
cd .but expects an autosuggestion forhfi.network, so it is likely asserting a tab-completion candidate rather than the autosuggestion source it needs.
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
| .editor | ||
| .read(ctx, |editor, _| editor.active_autosuggestion()); | ||
|
|
||
| if has_autosuggestion { |
There was a problem hiding this comment.
RemoveAutosuggestionDuringTabCompletions path from opening completions when an autosuggestion is active; the existing integration test that enables that flag and expects Tab to open the menu will now fail or needs to be updated with the intended behavior.
| // Execute a command so that we can generate autosuggestions. | ||
| .with_step(execute_command_for_single_terminal_in_tab( | ||
| 0, | ||
| "cd .".into(), |
There was a problem hiding this comment.
cd ., but the assertion below expects hfi.network; creating that directory only makes it a tab-completion candidate, so seed history with the expected command or assert the . autosuggestion instead.
Summary
pub(crate)toinsert_full_autosuggestionsoinput.rscan call ittest_tab_accepts_autosuggestion_directlyMotivation
Typing
cdshows a gray hint (e.g.hfi.network/), but Tab was ignoring it and opening the popup menu instead — requiring an extra keypress. This PR makes Tab accept the hint directly, matching Fish shell / VS Code behavior.Test plan
test_tab_accepts_autosuggestion_directly