-
Notifications
You must be signed in to change notification settings - Fork 13
feat: Add trust and subfolder config options #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add `wt config set trust true/false` to bypass setup command confirmations without needing to pass -t flag every time (issue #34) - Add `wt config set subfolder true/false` to create worktrees in a my-app-worktrees/feature pattern instead of my-app-feature siblings (issue #33) - Add getter/setter functions in config.ts for both options - Update confirmCommands() to check config trust setting - Update resolveWorktreePath() to support subfolder naming pattern - Add 8 new tests for the config options (98 total tests pass)
WalkthroughThis PR adds two new configuration options: Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
🧰 Additional context used📓 Path-based instructions (2)src/commands/*.ts📄 CodeRabbit inference engine (.cursor/rules/project.mdc)
Files:
src/index.ts📄 CodeRabbit inference engine (.cursor/rules/project.mdc)
Files:
🧠 Learnings (5)📓 Common learnings📚 Learning: 2025-08-04T13:02:29.847ZApplied to files:
📚 Learning: 2025-08-04T13:02:29.847ZApplied to files:
📚 Learning: 2025-08-04T13:02:29.847ZApplied to files:
📚 Learning: 2025-08-04T14:22:29.156ZApplied to files:
🧬 Code graph analysis (5)src/commands/config.ts (1)
src/utils/tui.ts (1)
src/index.ts (2)
src/config.ts (1)
src/utils/paths.ts (2)
🔇 Additional comments (6)
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "<value>", | ||
| "Enable or disable trust mode (true/false)" | ||
| ) | ||
| .description("Set trust mode to skip setup command confirmations.") | ||
| .action((value) => configHandler("set", "trust", value)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebuild missing for new config subcommands
The new config set trust/subfolder commands added here only exist in the TypeScript source, but the compiled entrypoint (build/index.js, which is what the wt bin points to and what test/config.test.ts executes via CLI_PATH) was not regenerated in this commit. The current build still registers only editor/provider/worktreepath, so on a fresh checkout or published package without manually re-running pnpm build, wt config set trust/subfolder will fail with an unknown-command error and the newly added tests will break. Please regenerate and commit the build outputs or run the tests against the source.
Useful? React with 👍 / 👎.
- Merged PR johnlindquist#35 (trust and subfolder config options) - Implemented wt status command with comprehensive git status info - Added 6 tests for status command (104 total tests passing) - Created Claude Code slash command at .claude/commands/worktree.md - Updated documentation with progress and new features - Fixed test issues related to trust mode configuration
Summary
This PR implements two user-requested config options:
wt config set trust trueto bypass setup command confirmations without needing to pass-tflag every timewt config set subfolder trueto create worktrees in amy-app-worktrees/featurepattern instead ofmy-app-featuresiblingsChanges
Trust Config (Issue #34)
trustboolean to ConfigSchemagetTrust()andsetTrust()functionsconfirmCommands()in tui.ts to check config setting (OR with -t flag)wt config set trust true/false,wt config get trustSubfolder Config (Issue #33)
worktreeSubfolderboolean to ConfigSchemagetWorktreeSubfolder()andsetWorktreeSubfolder()functionsresolveWorktreePath()to support 4 cases:my-app-worktrees/featurepatternmy-app-featurepatternwt config set subfolder true/false,wt config get subfolderUsage
Trust mode - skip confirmation prompts for setup commands:
Subfolder mode - organize worktrees in subdirectory:
Test plan
Closes #33, closes #34
Summary by CodeRabbit
Release Notes
New Features
config get/set trustandconfig get/set subfolder.Tests
✏️ Tip: You can customize this high-level summary in your review settings.