Conversation
Update the Claude Code plugin to detect and handle Cowork sandboxed environments: auto-install tdn from GitHub Releases, discover mounted vault directories, and create local config. Also suppress spurious "outside home directory" warnings for /sessions/ and /mnt/ paths. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use homedir() + join() instead of literal '~/tasks' which doesn't expand the tilde via path.resolve(), causing false warnings when cwd is outside $HOME. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR adds Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tdn-cli/src/config/index.ts`:
- Line 75: The home-directory check incorrectly treats paths like
"/home/alice2/..." as inside "/home/alice"; update the condition that uses
absolutePath and home (alongside isTempDir and isSandboxedMount) to perform a
proper path-boundary check by comparing equality or a prefix that includes the
path separator: replace the naive absolutePath.startsWith(home) use with a check
such as (absolutePath === home || absolutePath.startsWith(home + path.sep)) (use
Node's path.sep) or use path.relative(home, absolutePath) and ensure it does not
start with '..' to determine "inside home" before skipping the warning; keep the
existing isTempDir and isSandboxedMount logic intact.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c006a087-70ae-45c2-ae48-ecce581f7b3b
⛔ Files ignored due to path filters (5)
docs/tasks-todo/task-x-claude-cowork-integration.mdis excluded by!**/*.mdtdn-claude-plugin/README.mdis excluded by!**/*.mdtdn-claude-plugin/commands/prime.mdis excluded by!**/*.mdtdn-claude-plugin/skills/task-management/SKILL.mdis excluded by!**/*.mdtdn-claude-plugin/skills/task-management/cowork.mdis excluded by!**/*.md
📒 Files selected for processing (3)
.gitignoretdn-cli/src/config/index.tstdn-cli/tests/unit/config-security.test.ts
Use path.sep to prevent false matches where /home/alice2 would incorrectly be treated as inside /home/alice. Also fix formatting to satisfy Prettier. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary by CodeRabbit