fix: Import Settings preview race that clobbers conflict markers - #14956
Merged
Conversation
The Import VS Code Settings command opened the file-backed settings.json and called setValue synchronously right after openEditor(). The file model resolves its on-disk contents asynchronously, so a late resolve could overwrite the freshly-written conflict-marker preview, leaving a marker-free file. This manifested as a flaky e2e (the diff assertion saw the markers appear, then vanish before it ran). Resolve the model via ITextModelService.createModelReference first, so the initial disk resolve is complete before setValue; setValue then dirties the model, preventing a follow-up reload from clobbering the preview.
|
E2E Tests 🚀 Why these tags?
More on automatic tags from changed files. |
midleman
enabled auto-merge (squash)
July 17, 2026 19:29
samclark2015
approved these changes
Jul 20, 2026
samclark2015
left a comment
Contributor
There was a problem hiding this comment.
LGTM! Thanks for the catch!
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes a race in the Import VS Code Settings command where the imported conflict-marker preview could be overwritten by the settings file model finishing its async on-disk resolve, leaving a marker-free file. This surfaced as a flaky e2e (the diff assertion saw
<<<<<<< Existingappear, then vanish before it ran). Latent race in existing feature code; no behavior change.Release Notes
New Features
Bug Fixes
Validation Steps
@:vscode-settings @:web @:win
settings.jsonwith a value that conflicts with your Positron settings.<<<<<<</>>>>>>>conflict markers.E2E Triage Diagnosis
🟢 High confidence -- async race in the settings model likely caused the failure.
test/e2e/tests/import-vs-code-settings/import-vscode-settings.test.tsVerify diff displays and accepted settings are saved<<<<<<<conflict markers render immediately after import, then disappear before the assertion'stoBeVisible()check runs -- appear-then-vanish, not a render failure