Repository navigation
fix(rc): display symlinked directories in HostFolderBrowser (#5296) - #5360
markankamaransheogarat-sys wants to merge 5 commits into
Conversation
🦋 Changeset detectedLatest commit: 81d16d6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5560eb6505
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| entries.push({ name: d.name, path: entryPath, is_dir: true as const }); | ||
| } | ||
| } catch { | ||
| // Ignore broken symlinks, loops (ELOOP), or unreadable targets. |
There was a problem hiding this comment.
Remove the new TypeScript comment
This newly added explanatory comment violates the repository-wide prohibition on comments in JS/TS source. packages/agent-core-v2 is currently excluded from the automated comment checker, but that only means CI will not catch this violation; delete the comment and express the tolerated error cases through naming, control flow, or tests instead.
AGENTS.md reference: AGENTS.md:L82-L83
Useful? React with 👍 / 👎.
| } catch { | ||
| // Ignore broken symlinks, loops (ELOOP), or unreadable targets. | ||
| } |
There was a problem hiding this comment.
Propagate unexpected stat failures
When stat() fails for a process or filesystem condition other than the intentionally tolerated broken, looped, or unreadable-link cases (for example EIO, ENOMEM, or EOVERFLOW), this unconditional catch converts the browse into a successful response with the symlink silently omitted. That makes an operational failure indistinguishable from a non-directory link and gives the user no way to report it; inspect the errno and suppress only the expected per-link failures while propagating the rest.
AGENTS.md reference: AGENTS.md:L212-L214
Useful? React with 👍 / 👎.
| "@moonshot-ai/agent-core-v2": patch | ||
| "@moonshot-ai/kimi-code-sdk": patch | ||
| "@moonshot-ai/kimi-code": patch | ||
| "kimi-code-app": patch | ||
| "kimi-code": patch |
There was a problem hiding this comment.
Add a kap-server changeset entry
This package list omits @moonshot-ai/kap-server, even though the externally visible behavior being changed is the public /api/v1/fs:browse route implemented in packages/kap-server/src/routes/workspaceFs.ts:72-85. The repository delegates changeset review to .agents/skills/gen-changesets/SKILL.md, whose public-KAP rule requires the owning package to receive an entry, so the server can otherwise ship this behavior change without its own version bump or changelog record.
AGENTS.md reference: AGENTS.md:L190-L190
Useful? React with 👍 / 👎.
|
Addressed all 3 Codex Review notes in
Verified:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd21a01d55
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "@moonshot-ai/agent-core-v2": patch | ||
| "@moonshot-ai/kap-server": patch | ||
| "@moonshot-ai/kimi-code-sdk": patch | ||
| "@moonshot-ai/kimi-code": patch |
There was a problem hiding this comment.
Split library and product changesets
When Changesets generates releases, this one Remote Control sentence will be copied into the changelogs of three libraries and three products. AGENTS.md delegates this check to .agents/skills/gen-changesets/SKILL.md, which requires technical library entries and a separate user-facing product file for propagated changes; split the library packages from the affected products so each audience receives the correct release note.
AGENTS.md reference: AGENTS.md:L190-L190
Useful? React with 👍 / 👎.
| await rm(dir, { recursive: true, force: true }); | ||
| } | ||
| }); | ||
|
|
There was a problem hiding this comment.
Add a regression test for unexpected stat errors
If stat errors are swallowed again, this sole test still passes because it exercises only successful directory links plus intentionally ignored broken, looped, and file links; the previous catch-all therefore satisfies every assertion here. Add a fault-injected case such as EIO that asserts browse() rejects, so the regression test actually fails on the behavior this follow-up corrected.
AGENTS.md reference: AGENTS.md:L61-L61
Useful? React with 👍 / 👎.
commit: |
…er upstream rebase (MoonshotAI#5360)
f3f7fc4 to
81d16d6
Compare
Fixes #5296
Summary
packages/agent-core-v2/src/app/hostFolderBrowser/hostFolderBrowserService.ts: UpdateHostFolderBrowser.browse()sodirent.isSymbolicLink()entries are checked viastat(entryPath)and included whentargetStat.isDirectory()istrue. Broken symlinks, circular symlink loops (ELOOP), permission errors, and file symlinks are skipped without failing directory browsing.packages/agent-core-v2/test/app/hostFolderBrowser/hostFolderBrowserService.test.ts: Add unit test verifying internal/external directory symlinks are listed and navigable while file, broken, and looped symlinks are ignored..changeset/rc-folder-picker-symlinks.md: Add patch changesets for@moonshot-ai/agent-core-v2,@moonshot-ai/kimi-code-sdk,@moonshot-ai/kimi-code,kimi-code-app, andkimi-code.Verification
pnpm --filter @moonshot-ai/agent-core-v2 test test/app/hostFolderBrowser/hostFolderBrowserService.test.ts-> 1/1 passedpnpm --filter @moonshot-ai/agent-core-v2 typecheck-> passed