Clarify Git worktree choices for new and forked conversations (#50416)

## What changed

Label the `/new` and `/fork` picker options “Use current Git worktree” and “Create new Git worktree”. Explain that creating a worktree makes a separate checkout of the repository in another directory.

## Testing

Update picker assertions and snapshots for both commands to cover the revised labels and description.

GitOrigin-RevId: b7fb1aac3107e39c324707f9ae69c210a97346d7
This commit is contained in:
Benjamin Carlsson
2026-10-02 20:04:57 +00:00
committed by copyberry
parent c5d242fa79
commit dff5270b29
4 changed files with 14 additions and 9 deletions
@@ -5,7 +5,8 @@ expression: popup
Where should the forked conversation run?
› 1. Current checkout Keep using the current working directory
2. New worktree Create an isolated managed checkout
› 1. Use current Git worktree Keep using the current working directory
2. Create new Git worktree Create a separate checkout of this repository in
another directory
enter select · esc back
@@ -5,7 +5,8 @@ expression: popup
Where should the new conversation run?
› 1. Current checkout Keep using the current working directory
2. New worktree Create an isolated managed checkout
› 1. Use current Git worktree Keep using the current working directory
2. Create new Git worktree Create a separate checkout of this repository in
another directory
enter select · esc back
@@ -32,8 +32,8 @@ async fn slash_new_and_fork_offer_checkout_choices_inside_local_git_repository()
chat.dispatch_command(SlashCommand::New);
let popup = render_bottom_popup(&chat, /*width*/ 80);
assert_chatwidget_snapshot!("worktrees_new_choices", popup);
assert!(popup.contains("Current checkout"), "popup: {popup}");
assert!(popup.contains("New worktree"), "popup: {popup}");
assert!(popup.contains("Use current Git worktree"), "popup: {popup}");
assert!(popup.contains("Create new Git worktree"), "popup: {popup}");
assert_matches!(rx.try_recv(), Err(TryRecvError::Empty));
chat.handle_key_event(KeyEvent::new(KeyCode::Esc, KeyModifiers::NONE));
chat.bottom_pane
@@ -46,7 +46,7 @@ impl ChatWidget {
title: Some(title.into()),
items: vec![
SelectionItem {
name: "Current checkout".to_string(),
name: "Use current Git worktree".to_string(),
description: Some("Keep using the current working directory".to_string()),
actions: vec![Box::new(move |tx| match mode {
ManagedWorktreeMode::New => {
@@ -64,8 +64,11 @@ impl ChatWidget {
..Default::default()
},
SelectionItem {
name: "New worktree".to_string(),
description: Some("Create an isolated managed checkout".to_string()),
name: "Create new Git worktree".to_string(),
description: Some(
"Create a separate checkout of this repository in another directory"
.to_string(),
),
actions: vec![Box::new(move |tx| {
tx.send(AppEvent::StartManagedWorktree {
mode,