fix(extension): stabilize update marker#332
Open
iFwu wants to merge 2 commits into
Open
Conversation
Use the upstream README timestamp for the generated settings marker instead of formatting the local update time. This keeps the marker deterministic across operating systems and avoids locale-specific settings churn. Co-authored-by: Codex <noreply@openai.com>
Keep the generated marker compatible with the previous text shape while making the timestamp deterministic. This limits the change to the timestamp source and reduces risk for ad-hoc readers. Co-authored-by: Codex <noreply@openai.com>
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.
Description
Use the timestamp embedded in the upstream README config block for the generated
explorer.fileNesting.patterns["//"]marker instead of formatting the local update time withtoLocaleString().Before this change, the extension rewrote the marker with each machine's local locale, for example:
When VS Code/Cursor settings are synced across Windows and macOS (via Settings Sync, dotfiles, or a git-tracked
settings.json), the same upstream file-nesting config can therefore create platform-specific churn and merge conflicts even when the actual nesting patterns are identical.This keeps the previous marker shape (
Last update at ...) but makes the value deterministic by reusing the upstream README timestamp, for example:The marker is not used for file-nesting parsing or config comparison: the extension already removes the
"//"marker before comparing local patterns, while the upstream README parser strips JSONC comment lines beforeJSON.parse.Linked Issues
N/A. No exact existing issue/PR was found for the locale-specific update marker; related updater behavior discussions include #127 and #218.
Verification
git diff --check