fix(editor): rerank incremental completions for the current prefix - #2445
Conversation
|
Please use english |
|
@datlechin Sorry, I change english |
ad9fb72 to
e3a00f1
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Thanks for this. The diagnosis was right and I have pushed a commit on top rather than asking you to rework it, since a few things only showed up once I traced the ranking against a real dialect. Your commit stays as the first one. What I keptDeleting the 30 ms Your tests too. Driving a real What changed, and whySeeded sessions rank as well. Keeping them filter-only leaves the same bug in the window before the analyzed request lands: the seed list is in declaration order, and Ranking alone does not fix the reported case on PostgreSQL. A session now keeps ten times what the popup shows and re-ranks that, so a longer prefix can reach a candidate the opening one ranked out of view. The popup still shows Each update re-filters the session's own candidates instead of narrowing from the previous keystroke's. It is a superset, so nothing is lost, and deleting a character widens the list again, which the narrowing path could not do.
MongoDB gained a tier for the completed token. Its comparator went anchored match, then kind priority, so a shell method (300) outranked a keyword (400) the user had finished typing. Same defect class, five lines. Its session pool is capped too, because an empty opening prefix filters nothing away and a wide document schema samples thousands of field paths. VerificationBuild passes. 224 completion cases pass across Your success criteria listed manual verification as not run, so I added I also folded the two Found while in here, not fixedThree defects in the same subsystem, none of which this PR depends on:
|
Signed-off-by: Ngô Quốc Đạt <datlechin@gmail.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Purpose
Fix the autocomplete popup keeping the candidate order from an earlier prefix, which can leave a longer function selected above an exact keyword match.
Closes #2444
Changes and rationale
seedsessions from completedresolvedsessions.TRUE,NULL, andINmove to the first row.t → true,n → null, andi → in, plus 1,000-candidate seed and resolved-session bounds.[Unreleased] > Fixed.Acceptance criteria
TRUE/TRUNCATE,NULL/NULLIF, andIN/INSTRordering test fails before the production change.QueryCompletionAdapterLifecycleTestspasses after the fix.SQLCompletionProviderFuzzyDedupeTests,SQLCompletionAdapterFuzzyTests,SQLCompletionProviderTests,MongoContextAnalyzerTests, andQueryCompletionProfileRegistryTestssuites pass.swiftlint lint --strict TablePro/Views/Editor/QueryCompletionAdapter.swift TableProTests/Views/Editor/QueryCompletionAdapterLifecycleTests.swiftpasses with zero violations.git diff --checkpasses.Repository template compatibility
목적
Fix the stale ordering of incrementally filtered autocomplete candidates.
내용(의도 포함)
Re-rank bounded resolved candidates while preserving filter-only seed sessions and monotonic narrowing for large candidate sets.
성공기준