Skip to content

Conversation

@amitjoshi438
Copy link
Contributor

@amitjoshi438 amitjoshi438 commented Dec 4, 2025

Cherry-pick of #1357 from main to release/stable

This backports the fix for Invalid URL error in Page Template Autocomplete that was merged to main.

Original PR: #1357
Original commit: 3dc4e15

Changes

  • Fixed Invalid URL error in PathFinderUtil.ts by adding helper functions toFileSystemPath() and toFileURL()
  • Updated PortalManifestReader.ts to use the new helper functions
  • Added comprehensive unit tests in PathFinderUtil.test.ts

Files Changed

  • src/server/lib/PathFinderUtil.ts
  • src/server/lib/PortalManifestReader.ts
  • src/server/test/unit/PathFinderUtil.test.ts (new)

#1357)

* Initial plan

* Fix Invalid URL error in Page Template Autocomplete for VSCode Desktop

- Add toFileSystemPath() and toFileURL() helpers to handle both file:// URIs and plain paths
- Normalize paths to file system format in searchPortalConfigFolder() for consistent comparison
- Update PortalManifestReader to use fileURLToPath() for fs operations
- Add comprehensive unit tests for PathFinderUtil
- Add protection against infinite recursion at filesystem root

Co-authored-by: amitjoshi438 <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: amitjoshi438 <[email protected]>
@amitjoshi438 amitjoshi438 requested review from a team as code owners December 4, 2025 10:04
@amitjoshi438 amitjoshi438 changed the title Fix Invalid URL error in Page Template Autocomplete for VSCode Deskto… [Cherry-pick] Fix Invalid URL error in Page Template Autocomplete for VSCode Desktop Dec 4, 2025
@amitjoshi438 amitjoshi438 merged commit d838c73 into release/stable Dec 4, 2025
7 checks passed
@amitjoshi438 amitjoshi438 deleted the users/amitjoshi/cherry-pick-autocomplete-page-temp-fix branch December 4, 2025 13:58
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.

3 participants