Skip to content

fix(intellij): handle Windows file URIs with spaces/brackets - #11065

Closed
siewcapital wants to merge 2 commits into
mainfrom
unknown repository
Closed

siewcapital wants to merge 2 commits into
mainfrom
unknown repository

Conversation

@siewcapital

@siewcapital siewcapital commented Mar 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary\nFixes a JetBrains-side URI parsing bug where autocomplete crashes on Windows when a file path contains unescaped characters (e.g. spaces or ).\n\n### What changed\n- Updated to normalize style URIs and parse file URIs through component-based URI construction () so reserved characters are safely encoded.\n- Added decoding + normalization before reconstruction to avoid double-encoding existing segments.\n- Added unit tests covering:\n - file paths containing square brackets\n - Windows URIs with square brackets\n - Windows URIs with spaces\n\n## Why\nCurrent logic builds a URI from raw strings, which throws on unescaped characters and breaks requests used by autocomplete in JetBrains IDEs.\n\nFixes #10978\nFixes #10613\n\n## Testing\n- Added/updated unit tests in .\n- Note: running in this environment is currently blocked by local JDK 25 + Kotlin/Gradle script parsing compatibility ( during Gradle config), so full suite execution could not be completed locally.


Continue Tasks: 🔄 7 running — View all


Summary by cubic

Fixes IntelliJ autocomplete crashes on Windows by safely parsing file URIs with spaces, plus signs, or square brackets. Normalizes file:// URIs and constructs them via components to ensure correct encoding. Fixes #10978, #10613.

  • Bug Fixes
    • Normalize Windows file URIs (enforce file:///).
    • Decode paths (handle +), ensure leading slash, then build with URI("file", "", path, null) to escape reserved chars.
    • Add unit tests for brackets and spaces in Windows file URIs; include bracketed path File conversion.

Written for commit 1c7a830. Summary will update on new commits.

@siewcapital
siewcapital requested a review from a team as a code owner March 5, 2026 11:23
@siewcapital
siewcapital requested review from Patrick-Erichsen and removed request for a team March 5, 2026 11:24
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 5, 2026
@github-actions

github-actions Bot commented Mar 5, 2026 •

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


0 out of 2 committers have signed the CLA.
❌ @siewcapital
❌ @Co-Messi
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/UriUtils.kt">

<violation number="1" location="extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/UriUtils.kt:43">
P2: Decoding file URI paths with `URLDecoder` corrupts literal `+` characters into spaces, producing wrong file paths.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Add one-off context when rerunning by tagging @cubic-dev-ai with guidance or docs links (including llms.txt)
  • Ask questions if you need clarification on any suggestion

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@RomneyDa

Copy link
Copy Markdown
Contributor

@siewcapital thanks for the contribution!
This should be fixed by earlier PR #10633.
Closing this for now, let me know if I missed something

@RomneyDa RomneyDa closed this Mar 10, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autocomplete crashes with files having square brackets in the filepath/filename.

3 participants