Repository navigation
Conversation
thomasjm
marked this pull request as draft
October 11, 2026 10:36
thomasjm
force-pushed
the
code-action-edits
branch
from
October 11, 2026 23:55
06c0773 to
9da5714
Compare
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.
A code action's
editcame back untouched: the shadow file's uri, the shadow file's version, and lines in the generated wrapper's coordinates, so a client that applies edits by document name refuses it. Same bug as codedownio/rust-notebook-language-server#3, same fix.transformServerRsp'fortextDocument/codeActionfiltered the list through anisInternalReferringCodeActionthat always returnedFalse, and nothing rewrote the edit. There was nocodeAction/resolvecase, so it fell through untouched too.Now
untransformWorkspaceEditrewritesdocumentChangesandchanges: shadow uri to the notebook's, version to null, every range back through the transformer. An action is dropped when it can't be expressed against the notebook — it names another document, it creates/renames/deletes a file, or one of its edits lands on a line the projection introduced. Half-applying an edit would corrupt the cell.codeAction/resolvecarries no document, so the transformer is found from the shadow uri inside the edit (lookupTransformerByNewUri). If that fails the edit is dropped rather than returned wrong.Bare
Commands pass through: their arguments are opaque, so there's nothing to rewrite and no safe way to tell whether they refer to the shadow file.Parked. This is the same fix written four times, which is the duplication the shared-core work is meant to remove. Holding it until the
Transformerclass is reconciled across the four proxies, then reapplying it once. Branch kept; seeplans/consolidating-the-notebook-proxies.mdin haskell-notebook-language-server.Closed, to be redone at the end. This predates the
Transformer/ProjectInreconciliation, so it needs rewriting against the new class rather than rebasing —getParamsis gone andunprojectno longer takesParams. Branchcode-action-editsis kept. The matching integration test is on codedown-languages branchrust-code-action-test.