Description
Symlinked directories (Linux ln -s) and Windows junction points (e.g., OneDrive Desktop) are invisible in the directory picker, @file picker, and file listing. Navigating to ~/OneDrive/Desktop/ shows empty contents.
Root Cause
packages/core/src/filesystem.ts:74 — readDirectoryEntries classifies symlinks and junction points as "symlink" because Node's isDirectory() returns false for reparse points. Downstream filters in src/file/index.ts skip type !== "directory", silently losing all symlink entries.
Steps to Reproduce
- On Windows with OneDrive: navigate to ~/OneDrive/Desktop/ in the directory picker → empty
- On Linux: ln -s /mnt/data/Projects ~/Projects, navigate → empty
- @file picker also doesn't show symlinked directories
Proposed Fix
In readDirectoryEntries, when isSymbolicLink() is true, stat() the target. If the target is a directory, return "directory" instead of "symlink". This fixes ALL consumers (picker, @file, File.list, ripgrep indexer) without changing any downstream filters.
Related Issues
Platform
Windows 11, Linux, macOS (all symlink types)
Terminal
Windows Terminal
Description
Symlinked directories (Linux ln -s) and Windows junction points (e.g., OneDrive Desktop) are invisible in the directory picker, @file picker, and file listing. Navigating to ~/OneDrive/Desktop/ shows empty contents.
Root Cause
packages/core/src/filesystem.ts:74 — readDirectoryEntries classifies symlinks and junction points as "symlink" because Node's isDirectory() returns false for reparse points. Downstream filters in src/file/index.ts skip type !== "directory", silently losing all symlink entries.
Steps to Reproduce
Proposed Fix
In readDirectoryEntries, when isSymbolicLink() is true, stat() the target. If the target is a directory, return "directory" instead of "symlink". This fixes ALL consumers (picker, @file, File.list, ripgrep indexer) without changing any downstream filters.
Related Issues
Platform
Windows 11, Linux, macOS (all symlink types)
Terminal
Windows Terminal