Skip to content

fix: normalize Windows workspace namespace paths#572

Open
Reekin wants to merge 3 commits intoDimillian:mainfrom
Reekin:codex/bug-win-workspace-path
Open

fix: normalize Windows workspace namespace paths#572
Reekin wants to merge 3 commits intoDimillian:mainfrom
Reekin:codex/bug-win-workspace-path

Conversation

@Reekin
Copy link
Contributor

@Reekin Reekin commented Mar 21, 2026

Summary

  • normalize Windows \\?\ workspace paths across workspace creation, storage, and worktree flows
  • keep namespace-path migrations best-effort on read so startup does not require config files to be writable
  • normalize workspace/global worktree root settings and add Windows path regression coverage, including UNC dedupe

Testing

  • rustfmt --edition 2021 src-tauri/src/storage.rs src-tauri/src/shared/settings_core.rs src-tauri/src/shared/workspaces_core/crud_persistence.rs src-tauri/src/shared/workspaces_core/helpers.rs src-tauri/src/shared/workspaces_core/worktree.rs src-tauri/src/workspaces/tests.rs
  • git diff --check
  • npm run test -- src/features/workspaces/hooks/useWorkspaces.test.tsx (blocked: vitest not installed in current environment)
  • npm run typecheck (blocked: tsc not installed in current environment)
  • cargo test --manifest-path src-tauri/Cargo.toml ... (blocked by existing third-party whisper-rs 0.12.0 compile errors in this environment)

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b02e9da878

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +100 to +101
if changed {
try_rewrite_workspaces_with_normalized_paths(path, &list);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Stop retrying path migration on every workspace read

When read_workspaces sees a namespace path, it now rewrites the file on every read. In daemon mode, list_workspaces calls sync_workspaces_from_storage each request, which calls read_workspaces; if workspaces.json is read-only, changed stays true and this branch will keep attempting (and logging) a failed write on every refresh. That creates persistent stderr noise and avoidable I/O in the exact scenario this change aims to tolerate (best-effort migration when files are not writable).

Useful? React with 👍 / 👎.

@Reekin Reekin marked this pull request as draft March 21, 2026 07:44
@Reekin Reekin marked this pull request as ready for review March 21, 2026 09:33
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.

1 participant