fix(explorer): preserve collapsed folders on refresh - #62
Merged
Conversation
Keep directory expansion state user-driven across workspace refreshes.\nOnly Explorer New File reveals the created path's ancestors.\n\nFixes #61
kbuffardi
marked this pull request as ready for review
August 6, 2026 03:21
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.
Summary
Keep Explorer directory expansion state user-driven when workspace snapshots refresh. External filesystem changes, polling, compiler artifacts, and runtime
fstreamoutput now leave the current collapsed/expanded tree unchanged.The Explorer New File action remains the explicit exception: it expands the new file's ancestor folders so the file is visible immediately.
Why
Refresh handling previously treated every added path as a reveal target, so unrelated updates could expand nested folders the user had left collapsed.
Validation
node --experimental-detect-module --test scripts/e2e-workspace-file-tracking.test.mjsnpm run lintnpm run buildnpm run test:e2eThe build completed with its existing webpack bundle-size warnings.
Closes #61