Repository navigation
fix(completion): preserve punctuation during deferred completion - #390
Merged
Merged
Conversation
Contributor
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0b4bfb03a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Accepting a completion after its language server restarted returned before taking completion_snapshot. With completion application now owning popup dismissal, no CloseDialog follows to clear it, so a delayed displayed-immediately response passed the snapshot dismissal guard and reopened the popup the user had already accepted. Take the snapshot ahead of the rejection paths so every accept ends the completion session.
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.
Typing
cons, waiting for the completion menu, then typingole.locould lose the period or leaveconsole.lowithout member suggestions. Red requested members before asynchronous completion work inserted the period; further typing could invalidate that work and discard the period entirely.Request members after applying and synchronizing the completion. If another input arrives while a punctuation-triggered completion is pending, finish the selected completion and its punctuation first, then ignore late deferred edits, including imports. Paused input still receives resolved import edits. Completion application also owns dismissal of its old popup, so it cannot close the new member menu.
Fixes #389.
How to Test
With the TypeScript language server available, open an empty
.tsfile:cons, wait for the menu, press Enter to acceptconsole, then type.lo. Expectconsole.lowithlogamong the member suggestions.cons, wait for the menu, then typeole.loquickly without accepting the menu. Expect the same text and member suggestions; the period must remain.console.and filter tologwhen typinglo.The focused regressions in
tests/completion.rscover deferred import resolution, request ordering, typing during both refresh and resolve, and late responses that must not reopen stale completions.Validation: 155 targeted library tests and 49 completion integration tests passed; Clippy passed for all targets/features with warnings denied, and formatting checks passed. Five interactive cases passed, including a repeat with ESLint and Prettier configured. Traces confirm the period reaches the server before the member request, which returns 20 candidates including
logandtimeLog.The configured dependency mirror cannot supply locked Wasmtime 48.0.6. Local validation uses an isolated historical lockfile with cached Wasmtime 48.0.5; this change leaves
Cargo.lockuntouched. CI must confirm validation with the committed lockfile.