Skip to content

Conversation

@acke
Copy link
Contributor

@acke acke commented Dec 5, 2025

  • Replace VirtualFileManager.findFileByUrl() with toVirtualFileOrNull() which properly decodes URL-encoded characters (e.g., %20 to spaces)
  • Add debug logging to applyEdit and DocumentChanger to trace URI handling
  • Fixes issue where applyEdit failed for paths containing spaces, dots, and underscores

The issue was that findFileByUrl() doesn't handle URL-encoded URIs. Using toVirtualFileOrNull() converts the URI to a path first, which automatically decodes %20 to spaces, then finds the file using the decoded path.

Description

Provide description of this PR and changes, if linked Jira ticket doesn't cover it in full.

Checklist

Screenshots / GIFs

Visuals that may help the reviewer. Please add screenshots for any UI change. GIFs are most welcome!

- Replace VirtualFileManager.findFileByUrl() with toVirtualFileOrNull()
  which properly decodes URL-encoded characters (e.g., %20 to spaces)
- Add debug logging to applyEdit and DocumentChanger to trace URI handling
- Fixes issue where applyEdit failed for paths containing spaces, dots, and underscores

The issue was that findFileByUrl() doesn't handle URL-encoded URIs.
Using toVirtualFileOrNull() converts the URI to a path first, which
automatically decodes %20 to spaces, then finds the file using the decoded path.
@acke acke requested review from a team as code owners December 5, 2025 10:40
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@snyk-io
Copy link

snyk-io bot commented Dec 5, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@acke acke force-pushed the fix/IDE-1555_Agent-Fix-Apply-Fix-Not-Working branch from b812b98 to e3805f3 Compare December 5, 2025 10:52
Replace Logger.getInstance() with logger<DocumentChanger>() to match
the pattern used throughout the codebase
@acke acke force-pushed the fix/IDE-1555_Agent-Fix-Apply-Fix-Not-Working branch from e3805f3 to e1c8ee1 Compare December 5, 2025 10:54
@acke acke merged commit 185ca1a into master Dec 5, 2025
10 of 11 checks passed
@acke acke deleted the fix/IDE-1555_Agent-Fix-Apply-Fix-Not-Working branch December 5, 2025 11:28
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.

4 participants