Skip to content

Conversation

@AryanBagade
Copy link
Contributor

Summary

When local completions exist (e.g., UsersController), autoimport completions are skipped for performance. However, the response was marked as is_incomplete=false, causing clients (Zed, nvim) to cache results and filter locally instead of requesting new completions from the server.

This meant when typing UsersM, the client would filter cached results and never show UsersManager from autoimport.

Now we mark is_incomplete=true when local completions exist, so clients request completions again as the user types more characters, allowing autoimport completions to appear when local ones no longer match.

Fixes #1398

Test Plan

  • Added two new integration tests:
    • test_completion_incomplete_with_local_completions_blocking_autoimport
    • test_completion_autoimport_shown_when_local_no_longer_matches
  • Ran test.py - all tests pass including conformance tests

@meta-cla meta-cla bot added the cla signed label Jan 2, 2026
@github-actions
Copy link

github-actions bot commented Jan 2, 2026

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@meta-codesync
Copy link

meta-codesync bot commented Jan 5, 2026

@kinto0 has imported this pull request. If you are a Meta employee, you can view this in D90121759.

@kinto0 kinto0 self-assigned this Jan 5, 2026
Copy link
Contributor

@stroxler stroxler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@meta-codesync
Copy link

meta-codesync bot commented Jan 5, 2026

@kinto0 merged this pull request in 9909406.

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.

LSP (Zed): Auto-import completions incomplete for symbols with common prefix

4 participants