fix(sidebar): 修复 Windows 下隐藏仓库设置因存储 key 格式不一致而失效的问题#424
Closed
huazz233 wants to merge 2 commits into
Closed
Conversation
saveRepositorySettings 使用 normalizeWorkspacePathKey(反斜杠转正斜杠), 但 TreeSidebar 过滤时用 normalizePath(保留反斜杠),导致 Windows 上 key 永远匹配不上,隐藏设置形同虚设。统一使用 normalizeWorkspacePathKey。
Contributor
|
I'll analyze this and get back to you. |
与 TreeSidebar (#404) 相同的 bug:handleMoveToGroup 改为按 id 匹配后, RepositorySidebar 仍传入 menuRepo.path,导致分组移动静默失败。 同时补全本地 Repository 接口的 id 字段。
Contributor
|
I'll analyze this and get back to you. |
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
saveRepositorySettings使用normalizeWorkspacePathKey(将\转为/),但TreeSidebar过滤隐藏仓库时使用normalizePath(保留\),导致 Windows 上存储 key 和查找 key 格式不一致,隐藏仓库设置永远匹配不上TreeSidebar.tsx中两处normalizePath改为normalizeWorkspacePathKey,统一 key 格式Root Cause
v0.2.39 的 remote workspace 重构 (#380) 将
getRepositorySettings/saveRepositorySettings的 key 规范化从normalizePath改为normalizeWorkspacePathKey,但TreeSidebar中的过滤逻辑未同步更新:Test plan