feat(web): worktree toggle + cleaner new-session wizard#978
Merged
njbrake merged 2 commits intonjbrake:mainfrom May 8, 2026
Merged
feat(web): worktree toggle + cleaner new-session wizard#978njbrake merged 2 commits intonjbrake:mainfrom
njbrake merged 2 commits intonjbrake:mainfrom
Conversation
Adds a "Create a worktree" toggle to the web dashboard's new-session wizard so users can opt out of worktree creation (the backend already supported worktree_branch=null but the frontend always sent a value). Also restructures the wizard from 3 steps (Project, Settings, Review) into 4 linear steps (Project, Session, Agent, Review). Title and the worktree toggle/branch name now live on a dedicated Session step instead of being buried under Advanced settings on the Settings step. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Very good idea thanks! Even though it's only in beta, I feel like it's very important to have the web UI match the TUI as much as possible! I can't test it right now but looking at the PR on my phone it looks good. |
Owner
|
Hi @X-Skoprio thanks so much! Would you mind attaching a screenshot or screen recording of the functionality? |
Contributor
Author
|
@njbrake Sure, here are some screens : |
Group is session metadata (organization/naming), not agent runtime config. Co-locating it with Title on the Session step keeps the Agent step focused on tool/sandbox/yolo plus advanced runtime settings, and gives the Session step more substance so it doesn't feel like a speed-bump for users who skip the worktree toggle. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





Description
The web dashboard's "New session" wizard always created a git worktree on a new branch — there was no way to say "just run the agent in the repo folder." The TUI exposes this; the backend already supports it (
worktree_branch: Option<String>inCreateSessionBody, gated atsrc/session/builder.rs:228); only the web UI was forcing a value.This PR closes that gap and tightens the wizard flow:
worktree_branch: undefinedandcreate_new_branch: false, and the backend takes the existing no-worktree path. Default stays on, so existing behaviour is unchanged.No backend or API changes —
CreateSessionBody.worktree_branchwas alreadyOption<String>andcreate_new_branchwas already a bool.Files changed
web/src/components/session-wizard/SessionWizard.tsx— addsuseWorktreetoWizardData; submit body branches on it; new step ordering.web/src/components/session-wizard/StepIndicator.tsx— adds"session"toStepId.web/src/components/session-wizard/steps/SessionStep.tsx— new component (title + worktree toggle + branch/worktree name).web/src/components/session-wizard/steps/AgentStep.tsx— removes the title/branch inputs (moved to SessionStep), keeps agent / sandbox / yolo / advanced.web/src/components/session-wizard/steps/ReviewStep.tsx— Branch row label is now "Branch / worktree" (since the branch name is also the worktree dir name); shows "None — runs in repo folder" when worktree is off.PR Type
Checklist
(Docs unchanged — this is a UI-only refinement of an existing feature, not a new public API. Happy to add a screenshot in a follow-up commit if maintainers want one inline.)
How I tested
cargo fmt --checkcleancargo clippy --features serve --all-targets -- -D warningscleancargo test --features serve— 1700+ passing, 0 failedcd web && bun run buildclean (TypeScript + Vite)aoe serve --no-auth: worktree-on creates a new worktree (git worktree listgrows); worktree-off runs in the repo folder (git worktree listandgit branch --show-currentunchanged).AI Usage
AI Model/Tool used: Claude Code (Opus 4.7)
Any Additional AI Details you'd like to share:
Used Claude Code to explore the codebase, draft the wizard restructuring, and draft this PR description. All design decisions and the final review were done by me.