Bug Description
A symlink whose target resolves outside the workspace root is classified as outside-root and is neither expandable nor openable in the file tree. It renders as a leaf node with a link icon, and opening it shows "Could not load file". The same links behaved as directories in 1.1.40.
Steps to Reproduce
- Create a task/worktree in any project.
- From the worktree root:
ln -s ~/some/dir/outside shared (target outside the worktree).
- Open the task editor's file tree and click
shared.
Actual vs Expected Behavior
Actual: the entry cannot be expanded or opened; opening it yields "Could not load file".
Expected: a symlink to a directory behaves as a directory.
emdash Version
1.2.2. Introduced in 1.2.0; 1.1.40 is unaffected.
Operating System
macOS 26.6.2 (Apple silicon)
Additional Context
packages/core/src/runtimes/files/node/tree/directory-reader.ts, in classifySymlink, returns before the isDirectory() / isFile() classification:
const canonical = await realpath(absolutePath);
if (!containsPath(rootPath, canonical)) return { target, kind: 'outside-root' };
- With
symlinkTargetKind === 'outside-root', isExpandableFileEntry and isOpenableFileEntry (packages/core/src/runtimes/files/api/tree/state.ts) both return false.
- The same containment applies in
RootPathPolicy.resolveFollowed and resolveExistingEntry (packages/core/src/runtimes/files/node/fs/path-policy.ts), and in enumerate.ts, where it also overrides includeSymlinkFiles.
directory-reader.ts is absent in v1.1.40 and present in v1.2.0.
Bug Description
A symlink whose target resolves outside the workspace root is classified as
outside-rootand is neither expandable nor openable in the file tree. It renders as a leaf node with a link icon, and opening it shows "Could not load file". The same links behaved as directories in 1.1.40.Steps to Reproduce
ln -s ~/some/dir/outside shared(target outside the worktree).shared.Actual vs Expected Behavior
Actual: the entry cannot be expanded or opened; opening it yields "Could not load file".
Expected: a symlink to a directory behaves as a directory.
emdash Version
1.2.2. Introduced in 1.2.0; 1.1.40 is unaffected.
Operating System
macOS 26.6.2 (Apple silicon)
Additional Context
packages/core/src/runtimes/files/node/tree/directory-reader.ts, inclassifySymlink, returns before theisDirectory()/isFile()classification:symlinkTargetKind === 'outside-root',isExpandableFileEntryandisOpenableFileEntry(packages/core/src/runtimes/files/api/tree/state.ts) both return false.RootPathPolicy.resolveFollowedandresolveExistingEntry(packages/core/src/runtimes/files/node/fs/path-policy.ts), and inenumerate.ts, where it also overridesincludeSymlinkFiles.directory-reader.tsis absent in v1.1.40 and present in v1.2.0.