Skip to content

fix: include symlinked directories in project discovery listings - #245

Open
ColasNahaboo wants to merge 1 commit into
co-l:developfrom
ColasNahaboo:fix-issue243-symlinks
Open

fix: include symlinked directories in project discovery listings#245
ColasNahaboo wants to merge 1 commit into
co-l:developfrom
ColasNahaboo:fix-issue243-symlinks

Conversation

@ColasNahaboo

@ColasNahaboo ColasNahaboo commented Aug 15, 2026

Copy link
Copy Markdown

Summary

The bug: Openfox ignores projects that are symlinks to directories #243

The fix: checking that a directory exists does now perform two checks:

  1. either it is a real directory
  2. or it is a symlink pointing to a real directry

AI-Enhanced Development

  • AI Models: DeepSeek V4 Flash

Cache Impact

Does this PR affect anything cached — system prompts, tool definitions, skills, or other context?

  • No

Tests

Tests performed and passed
All automated checks were run against the rebased branch (c644224 = symlink fix on ae26b30 / v2.0.120), clean worktree.

  1. New unit tests (added in this PR)

src/server/git/workspace.test.ts — listWorkspaces:

  • includes symlinked workspace directories — a symlinked dir is returned as a workspace
  • excludes broken symlinked workspace directories — a symlink whose target is missing (stat → ENOENT) is excluded

src/server/routes/directories.test.ts — GET /api/directories (real filesystem symlinks via node:fs symlink):

  • returns symlinked directories — a symlinked folder appears in the listing with its resolved path
  • excludes broken symlinks (skipped on Windows via describe.skipIf) — a broken link is not listed
  1. Targeted run — passed

npx vitest run src/server/git/workspace.test.ts src/server/routes/directories.test.ts

Test Files 2 passed (2)
Tests 43 passed (43)

  1. Full unit suite — passed

npm run test:unit

Test Files 319 passed | 2 skipped (321)
Tests 4057 passed | 33 skipped (4097)

  1. Static checks — passed

npm run check # exit 0
Includes: typecheck (server + web + e2e), ESLint, Prettier, and duplicate-code detection (jscpd) — 0 clones.

Not run

  • npm test full suite (includes slow e2e suite) and Playwright e2e — not run; recommend before merge.

Manual test plan (recommended)

Covers the four call sites the fix touches (isDirectoryEntry in src/server/utils/fs.ts:16):

  1. Directory browser (routes/directories.ts): launch the app, browse to a dir containing ln -s linked — the linked folder appears and is navigable; a broken link (ln -s broken) does not appear.

  2. Workspace listing (git/workspace.ts listWorkspaces): a symlinked worktree dir appears in the workspaces panel with its git branch.

  3. Orphaned workspace scan (routes/workspace-config.ts findOrphanedWorkspaces, used at lines 219/224): a symlinked git repo is offered for re-attach.

  4. Plugins listing (routes/plugins.ts): a symlinked plugin dir shows in installed plugins.

Precondition for a manual test: revert to the stock build and confirm symlinked dirs are absent (repro), then run the modified build and confirm they appear.

@ColasNahaboo ColasNahaboo changed the title fix: include symlinked directories in project discovery listings #243 fix: include symlinked directories in project discovery listings Aug 15, 2026
@ColasNahaboo
ColasNahaboo changed the base branch from main to develop August 15, 2026 21:20
@ColasNahaboo
ColasNahaboo force-pushed the fix-issue243-symlinks branch from c644224 to 228eaae Compare August 16, 2026 20:06
@ColasNahaboo

Copy link
Copy Markdown
Author

rebased the symlink fix onto v2.0.122.

Dirent.isDirectory() never follows symlinks, so symlinked project
folders were invisible in the directory browser, orphaned-workspace
scan, workspace listing, and plugin listing. Add a shared
isDirectoryEntry helper that follows symlinks via stat() (excluding
broken/cyclic links) and use it at all four sites.
@ColasNahaboo
ColasNahaboo force-pushed the fix-issue243-symlinks branch from 228eaae to bc3f1b2 Compare August 18, 2026 14:42
@ColasNahaboo

Copy link
Copy Markdown
Author

Rebased onto upstream develop (ecb848d4, post v2.0.123). Patch byte-identical to the previous 228eaaee; all checks pass (patch tests 43/43, npm run test:unit 4318 passed, npm run check clean).

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.

1 participant