Skip to content

Show a link indicator on symbolic links and Finder aliases in the Files pane - #18195

Merged
gtritchie merged 10 commits into
mainfrom
feature/9924-symlink-indicator
Jul 12, 2026
Merged

gtritchie merged 10 commits into
mainfrom
feature/9924-symlink-indicator

Conversation

@gtritchie

@gtritchie gtritchie commented Jul 10, 2026 •

Copy link
Copy Markdown
Member

Fixes #9924.

The Files pane gave no indication that an entry was a symbolic link. This adds a small link badge to the lower-left corner of the file-type icon for symbolic links and macOS Finder aliases, keeping the underlying file/folder icon so the file type and directory-ness stay visible. The link target is shown in the icon's tooltip (name -> target), and the badge carries "Symbolic link"/"Alias" alt text for screen readers.

Changes

Backend

  • New FilePath::readSymlink reports read failures (unlike resolveSymlink, which swallows them and returns the path unchanged) and returns the target as stored in the link.
  • createFileSystemItem emits is_symlink, symlink_target (read only for actual symlinks), and is_alias (set whenever a Finder alias is detected, so a broken alias is still flagged). One is_symlink (lstat-equivalent) call is added per listing entry.

Frontend

  • FileSystemItem gains isSymlink(), isAlias(), isLink(), getSymlinkTarget(), and a display-only getLinkTarget().
  • FileIcon is now immutable; withLinkBadge() returns a decorated copy so the shared FileTypeRegistry icons are never mutated.
  • FileIconRenderer composites the badge over the icon and leaves output unchanged when there is no badge. The Files pane applies the badge and tooltip to any link entry.

Screenshots

Here are two examples of Finder alias links (one to a file, one to a folder) and an actual symbolic link to a file. The tooltip for the api-alias icon is shown, which reveals the actual destination.

links

Notes

  • Broken symlinks remain hidden, as before: the listing already filters on the resolved target existing. Broken Finder aliases are regular files, so they are listed and now badged.
  • The symlink target is shown as stored (ls -l style; it may be relative, and on Windows path separators are normalized to /).
  • Windows .lnk shortcuts are out of scope; they are not symbolic links.

Testing

  • C++: FilePath::readSymlink unit tests for relative and absolute targets and the non-symlink error path.
  • GWT: FileSystemItem link-accessor tests (including broken alias, unreadable/relative target, and directory symlink) and FileIcon/FileIconRenderer tests (decorated-copy immutability, badge rendering, and null tooltip/description guards). Full GWT suite passes.
  • Verified visually in a local build: the badge, tooltip, and dark-theme appearance render as intended.

@gtritchie gtritchie added this to the 2026.08 (Yellow Yarrow) milestone Jul 10, 2026
@posit-snyk-bot

posit-snyk-bot commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

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

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

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

@kevinushey

kevinushey commented Jul 11, 2026 •

Copy link
Copy Markdown
Collaborator

LGTM -- how do you feel about having the link icon at the bottom right rather than bottom left?

Looks like the standard here is bottom-left; my main thought was that it feels a tad busy right next to the programming language icon but probably don't need to rock the boat here.

@github-actions

Copy link
Copy Markdown

RStudio E2E - all platforms

All tests passed!

#################### 100% pass rate

Passed Failed Skipped Flaky
1800 0 76 3
Platform ✅ Passed ❌ Failed ⚠️ Skipped 🔁 Flaky
✅ desktop-linux 455 0 14 1
✅ desktop-macos 451 0 19 0
✅ desktop-windows 456 0 16 0
✅ server-linux 438 0 27 2
View / download the full report

View report online -- opens in the browser, no download needed. Available for 14 days.

Download playwright-report.zip -- extract and open index.html

Includes screenshots, traces, and step-by-step details for every test. Expires in 15 days.


All platforms - commit e26b524d74cf2a62225ebd189284f927941cc941 - Run #143

@gtritchie
gtritchie merged commit 873e90f into main Jul 12, 2026
24 checks passed
@gtritchie
gtritchie deleted the feature/9924-symlink-indicator branch July 12, 2026 02:55
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.

Symlinks should have some visual indicator

3 participants