Repository navigation
Description
Problem
Workspace mode (multi-repo review, shipped in #527 / v0.20.0) does not discover child repositories that are symlinked into the workspace root. With a monorepo-composite layout this makes it impossible to review changes across several related repos in one session without duplicating checkouts.
Layout
A common setup — a top-level repo that only wires things together, with independent service repos placed under an ignored projects/ directory:
my-composite/ (git repo, wires services together)
└── projects/ (gitignored)
├── backend-a/ (independent git repo)
├── backend-b/ (independent git repo)
├── backend-c/ (independent git repo)
├── frontend-a/ (independent git repo)
├── frontend-b/ (independent git repo)
└── frontend-c/ (independent git repo)
projects/ is in .gitignore, so running plannotator review from the composite root only sees the (empty) top-level diff. The goal is to review changes that span several service repos in one go, with the guided review understanding how they relate.
What I tried
-
Symlink wrapper. Create a non-git parent and symlink the service repos in:
mkdir -p ~/projects/workspace-root for svc in backend-a backend-b backend-c frontend-a frontend-b frontend-c; do ln -s ~/projects/my-composite/projects/$svc ~/projects/workspace-root/$svc done cd ~/projects/workspace-root plannotator review # -> "Not in a VCS repo and no nested Git/JJ repositories were found."
Symlinks are silently ignored.
-
Running
plannotator reviewfrom insidemy-composite/projects/— plannotator walks up to the composite git root instead of treatingprojects/as the workspace root.
Root cause
In collectWorkspaceRepos (workspace discovery, review-workspace-node.ts), entries are filtered with withFileTypes: true and only entry.isDirectory() is accepted:
function collectWorkspaceRepos(root, current, results) {
let entries;
try {
entries = readdirSync(current, { withFileTypes: true });
} catch {
return;
}
if (current !== root && hasVcsMarker(current)) {
results.push(current);
return;
}
for (const entry of entries) {
if (!entry.isDirectory()) // ← symlinked repos are filtered out here
continue;
if (SKIP_DIRS.has(entry.name))
continue;
collectWorkspaceRepos(root, resolve(current, entry.name), results);
}
}With withFileTypes: true, Dirent.isDirectory() returns false for a symlink, so every symlinked child repo is dropped before recursion. There is no flag to follow symlinks.
Suggested fix
Accept symlinks that resolve to directories during workspace discovery. Minimal change:
if (!(entry.isDirectory() || entry.isSymbolicLink()))
continue;with symlink-loop protection (track visited realpaths) to avoid cycles. Alternatively, an opt-in flag (--follow-symlinks) if there are concerns about traversal cost or loops.
Why this matters
The "composite repo + independent service repos under an ignored projects/" layout is common for compose-driven monorepos. A cross-cutting task routinely touches several service repos at once, and being able to review (and guided-review) them together — seeing the links between the API and client changes — is the main value of workspace mode. Right now the only workaround is git clone --local of every service into a fresh tree, which detaches the review from the actual working copy and defeats the purpose for uncommitted/in-progress work.
Related
- Feature Request: Make review support multiple repos #527 — multi-repo review (shipped v0.20.0); symlink case appears not to have come up.
- Allow /plannotator-review <path> to review a specific worktree #896 — allow
/plannotator-review <path>to target a specific worktree/cwd (related, but single-path). - code review doesn't work when using worktrees #196 — worktree selection in review.
Tested on: plannotator installed via ~/.local/bin/plannotator, macOS (darwin arm64).
Activity
[-]Workspace mode skips symlinked child repos — breaks "composed repo" layout[/-][+]Workspace mode skips symlinked child repos — breaks monorepo-composite layout[/+]