Skip to content

editor: Fix edit predictions polluting completions menu#50403

Merged
probably-neb merged 3 commits intozed-industries:mainfrom
Dnreikronos:fix/edit-predictions-polluting-completions-menu
Apr 21, 2026
Merged

editor: Fix edit predictions polluting completions menu#50403
probably-neb merged 3 commits intozed-industries:mainfrom
Dnreikronos:fix/edit-predictions-polluting-completions-menu

Conversation

@Dnreikronos
Copy link
Copy Markdown
Contributor

Closes #49565

Before you mark this PR as ready for review, make sure that you have:

  • Added a solid test coverage and/or screenshots from doing manual testing
  • Done a self-review taking into account security and performance aspects
  • Aligned any UI changes with the UI
    checklist

Screenshots
Before:
image

After:
image
image

Release Notes:

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Feb 28, 2026
@MrSubidubi MrSubidubi changed the title editor: Fix edit predictions polluting completions menu (#49565) editor: Fix edit predictions polluting completions menu Feb 28, 2026
@Dnreikronos
Copy link
Copy Markdown
Contributor Author

  1. Hardcoded true in trigger_completion_on_input: The trigger_in_words parameter was ignored in the default
    match arm, always passing true to open_or_update_completions_menu. This caused word characters to
    unconditionally trigger the completions menu, even when edit predictions were hidden from it.
  2. Snippet completions bypassed load_provider_completions gate: Extension snippets (e.g. Unicode symbols like
    "Theta", "tau", "turnstile") were loaded regardless of whether the trigger validation passed. This meant
    snippets polluted the completions menu even when the provider determined completions shouldn't load.

Impact

  • Users with show_in_completions_menu: false will no longer see the completions menu triggered on every
    keystroke
  • Extension snippets now respect the same trigger validation as other provider completions
  • Users who want to remove specific snippets (e.g. Unicode symbols) can still uninstall the relevant extension

@SomeoneToIgnore SomeoneToIgnore added the area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features label Feb 28, 2026
@Dnreikronos
Copy link
Copy Markdown
Contributor Author

Hi @osyvokon!
I've opened this PR to address the issues described in the issue mentioned above.

@probably-neb probably-neb self-assigned this Apr 20, 2026
@probably-neb probably-neb force-pushed the fix/edit-predictions-polluting-completions-menu branch from 1bcad13 to 0657677 Compare April 20, 2026 12:58
@probably-neb
Copy link
Copy Markdown
Collaborator

I think the first change you made is good, seems like a clear bug.

The second change however seems over-constrictive as shown by the test failures on that commit. It prevents any snippets from showing up ever. I pushed up a couple commits to make it so we are a bit smarter about when we show snippets based on matching the trigger against the snippet. Would you test these changes out and let me know if you think it fixes the issue for you?

@Dnreikronos
Copy link
Copy Markdown
Contributor Author

I think the first change you made is good, seems like a clear bug.

The second change however seems over-constrictive as shown by the test failures on that commit. It prevents any snippets from showing up ever. I pushed up a couple commits to make it so we are a bit smarter about when we show snippets based on matching the trigger against the snippet. Would you test these changes out and let me know if you think it fixes the issue for you?

Ofc, I will look to that rn!!!

@Dnreikronos
Copy link
Copy Markdown
Contributor Author

I think the first change you made is good, seems like a clear bug.

The second change however seems over-constrictive as shown by the test failures on that commit. It prevents any snippets from showing up ever. I pushed up a couple commits to make it so we are a bit smarter about when we show snippets based on matching the trigger against the snippet. Would you test these changes out and let me know if you think it fixes the issue for you?

Seems like that everything is working right:
image
image

@probably-neb probably-neb merged commit 7a6a95c into zed-industries:main Apr 21, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ai Related to Agent Panel, Edit Prediction, Copilot, or other AI features cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Word completions in Go files are broken despite "words": "disabled" setting

5 participants