Add default new-thread worktree mode with draft defaults#1007
Add default new-thread worktree mode with draft defaults#1007notkainoa wants to merge 2 commits intopingdotgg:mainfrom
Conversation
- add `newThreadUsesNewWorktree` app setting and Threads mode selector in Settings - centralize new-thread draft initialization in `buildNewThreadDraftDefaults` - make Sidebar new-thread flow use resolved defaults (with force-local shortcut support) - backfill settings parsing for older persisted payloads and add coverage for worktree-first send flow
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 Tip CodeRabbit can use Trivy to scan for security misconfigurations and secrets in Infrastructure as Code files.Add a .trivyignore file to your project to customize which findings Trivy reports. |
- Stop recomputing defaults when reselecting an existing project draft thread - Keep existing draft branch/mode context instead of resetting it in Sidebar flow - Fallback to worktree mode with null branch when `git.status` fails - Add tests for reopening existing drafts and git status failure handling
|
just merged a different PR doing this (#892) although i do think your settings UI fits more so happy to get that int |
Add a setting to choose the default mode for new threads: Local or New worktree.
What changed
Added a default new-thread setting: Local or New worktree.
Unified the sidebar button and chat.new to use the same draft setup logic.
New worktree now opens as a pending draft and creates the worktree on first send.
chat.newLocal still always opens a local draft.
Reopening an unsent draft now preserves its branch and mode.
Local.vs.Worktree.for.new.thread.mp4
Note
Add default new-thread worktree mode with settings toggle and draft defaults
buildNewThreadDraftDefaultsin threadDraftDefaults.ts to computeenvModeand initial branch for new draft threads based on user preference and current git status.newThreadUsesNewWorktree(defaultfalse) toAppSettingsSchemain appSettings.ts, with a settings UI toggle in _chat.settings.tsx to switch between local and new-worktree modes.handleNewThreadin Sidebar.tsx to use computed defaults instead of manual branching/worktree overrides; thechat.newLocalshortcut forces local mode.chat.newshortcut no longer accepts explicit branch/worktree overrides.Macroscope summarized c55c17b. (Automatic summaries will resume when PR exits draft mode or review begins).