Skip to content

fix(app): reuse Windows file tree tabs by path equivalence#290

Merged
murongg merged 1 commit into
mainfrom
fix/issue-262-windows-path-tabs
Jun 15, 2026
Merged

fix(app): reuse Windows file tree tabs by path equivalence#290
murongg merged 1 commit into
mainfrom
fix/issue-262-windows-path-tabs

Conversation

@murongg

@murongg murongg commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Normalize native path comparisons for Windows verbatim paths, separators, and casing.
  • Use path-equivalence checks for file-tree active state and tab reuse.
  • Add regression coverage for newly created Windows tree files and path helper behavior.

Why

  • Creating tree files on Windows can return a \\?\C:\... path while the refreshed tree lists C:\...; strict equality left the tree row unselected and allowed duplicate tabs.

Validation

  • pnpm --filter @markra/app test -- path-move.test.ts App.test.tsx -t "path move helpers|keeps a newly created Windows tree file selected without opening duplicate tabs" passed, 1163 tests.
  • pnpm --filter @markra/app typecheck:test passed.
  • pnpm --filter @markra/app build passed.

Risk

  • Low; this only changes native path comparison for file matching and keeps persisted paths unchanged.

Closes #262

Normalize Windows native path variants so newly created file-tree documents stay selected and clicking the same file reuses the open tab.

Closes #262
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
markra-web Ready Ready Preview, Comment Jun 15, 2026 8:11am

@murongg murongg marked this pull request as ready for review June 15, 2026 08:19
@murongg murongg merged commit 6d437fb into main Jun 15, 2026
4 checks passed
@murongg murongg deleted the fix/issue-262-windows-path-tabs branch June 15, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 新建文件后重复点击不能自动锁定到当前标签页,而是重复打开一个新的同文件标签页

1 participant