Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix: use workspace .vscode/ for editor temp files on Windows#349

Merged
breaking-brake merged 1 commit intomainbreaking-brake/cc-wf-studio:mainfrom
fix/windows-editor-pathbreaking-brake/cc-wf-studio:fix/windows-editor-pathCopy head branch name to clipboard
Jan 1, 2026
Merged

fix: use workspace .vscode/ for editor temp files on Windows#349
breaking-brake merged 1 commit intomainbreaking-brake/cc-wf-studio:mainfrom
fix/windows-editor-pathbreaking-brake/cc-wf-studio:fix/windows-editor-pathCopy head branch name to clipboard

Conversation

@breaking-brake
Copy link
Copy Markdown
Owner

Problem

The "Edit in VSCode Editor" feature does not work correctly on Windows.

Current Behavior

  1. User clicks "Edit in Editor" button
  2. Editor tab opens correctly
  3. ❌ User saves the file, but nothing happens
  4. ❌ Tab remains open, content is not applied to the form

Expected Behavior

  1. User clicks "Edit in Editor" button
  2. Editor tab opens correctly
  3. ✅ User saves the file
  4. ✅ Tab closes automatically, content is applied to the form

Root Cause

Path comparison between savedDoc.uri.fsPath and the stored filePath fails on Windows due to:

  • Case sensitivity differences (e.g., c:\Users vs C:\Users)
  • Path normalization inconsistencies with os.tmpdir()

Solution

  1. Store temp files in .vscode/ directory instead of os.tmpdir() for better path consistency within the workspace
  2. Normalize file paths using vscode.Uri.file(filePath).fsPath before comparison
  3. Add tmp- prefix to temp file names for clarity (e.g., tmp-cc-wf-studio-xxx.md)

Changes

File: src/extension/commands/text-editor.ts

  • Added getTempDirectory() function that prefers .vscode/ in workspace, falls back to os.tmpdir()
  • Use vscode.Uri.file(filePath).fsPath for cross-platform path normalization
  • Changed temp file naming from cc-wf-studio-xxx.md to tmp-cc-wf-studio-xxx.md
  • Updated all path comparisons to use normalized path

Impact

  • ✅ Fixes Windows compatibility issue
  • ✅ No breaking changes for macOS/Linux
  • ✅ Temp files are automatically cleaned up after editing

Testing

  • Manual E2E testing on Windows - save detection works correctly
  • Manual E2E testing on macOS - continues to work as expected
  • Code quality checks passed (format, lint, check, build)

🤖 Generated with Claude Code

- Store temp files in .vscode/ instead of os.tmpdir() for path consistency
- Normalize file paths using vscode.Uri.file().fsPath for comparison
- Add tmp- prefix to temp file names for clarity
- Fixes save detection not working on Windows due to path mismatch

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@breaking-brake breaking-brake merged commit 00c13a4 into main Jan 1, 2026
3 checks passed
@breaking-brake breaking-brake deleted the fix/windows-editor-path branch January 1, 2026 14:39
@breaking-brake breaking-brake mentioned this pull request Jan 1, 2026
braking-brake-semantic-release Bot pushed a commit that referenced this pull request Jan 1, 2026
## [3.11.1](v3.11.0...v3.11.1) (2026-01-01)

### Bug Fixes

* use cross-platform path separator for agent file detection ([#348](#348)) ([49479cd](49479cd)), closes [#345](#345)
* use workspace .vscode/ for editor temp files on Windows ([#349](#349)) ([00c13a4](00c13a4))

### Improvements

* remove unnecessary info message from editor ([#347](#347)) ([2f65423](2f65423))
@braking-brake-semantic-release
Copy link
Copy Markdown

🎉 This PR is included in version 3.11.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.