Skip to content

CmdPal: Fix bookmark launch fallback handling#48712

Draft
michaeljolley wants to merge 4 commits into
mainfrom
dev/mjolley/squad/bookmark-path-handling
Draft

CmdPal: Fix bookmark launch fallback handling#48712
michaeljolley wants to merge 4 commits into
mainfrom
dev/mjolley/squad/bookmark-path-handling

Conversation

@michaeljolley

@michaeljolley michaeljolley commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • update BookmarkResolver path probing/classification heuristics for bookmark strings with spaces, punctuation, and non-ASCII characters
  • add conservative percent-decoding (decode only when %xx sequences are present)
  • add NormalizePathForWindows (NFC normalization + safe long-path prefix stripping) before probe/classification use
  • require filesystem existence checks when selecting probe candidates; if exact target is missing, fall back to nearest existing parent directory and classify as Directory/ExplorerOpen
  • preserve URL/protocol/PATH-command behavior and keep launch behavior changes scoped to classification output

Fixes #48672

@michaeljolley michaeljolley added the Product-Command Palette Refers to the Command Palette utility label Jun 18, 2026
…ly tests (#48672)

- Extract NormalizePathForWindows from BookmarkResolver into a dedicated
  internal helper class (Services/PathNormalization.cs).
- Add safe trailing-whitespace trimming (incl. NBSP) so trailing copy/paste
  artifacts don't defeat File.Exists probes; trailing dots are deliberately
  preserved to avoid lossy transformations.
- BookmarkResolver delegates through a thin private wrapper so existing
  call sites and behavior are unchanged.
- Add PathNormalizationTests covering NFC, non-ASCII preservation,
  trailing-whitespace handling, and Windows-only long-path / NT-object
  prefix stripping. Windows-only assertions use Assert.Inconclusive on
  non-Windows agents so CI on Linux/macOS skips them cleanly.
@michaeljolley michaeljolley changed the title Fix bookmark launch fallback handling (#48672) CmdPal: Fix bookmark launch fallback handling (#48672) Jun 18, 2026
@michaeljolley michaeljolley changed the title CmdPal: Fix bookmark launch fallback handling (#48672) CmdPal: Fix bookmark launch fallback handling Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Product-Command Palette Refers to the Command Palette utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Command palette : incorrect path

1 participant