Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

Feat: Add summary and styling to `merge` and `push` commands

Maximilian Roos6bc3c86aaeea
diff --git a/src/commands/list/mod.rs b/src/commands/list/mod.rs
index 806490cd1..5c465d22e 100644
--- a/src/commands/list/mod.rs
+++ b/src/commands/list/mod.rs
@@ -331,13 +331,19 @@ fn display_summary(items: &[ListItem], include_branches: bool) {
return;
}
- let worktree_count = items.iter().filter(|i| i.worktree_info().is_some()).count();
+ let worktree_count = items
+ .iter()
+ .filter(|i| matches!(i, ListItem::Worktree(_)))
+ .count();
let branch_count = items.len() - worktree_count;
// Count worktrees with changes
let dirty_count = items
.iter()
- .filter_map(|i| i.worktree_info())
+ .filter_map(|i| match i {
+ ListItem::Worktree(wt) => Some(wt),
+ _ => None,
+ })
.filter(|wt| {
let (added, deleted) = wt.working_tree_diff;
added > 0 || deleted > 0
@@ -345,8 +351,21 @@ fn display_summary(items: &[ListItem], include_branches: bool) {
.count();
// Count items ahead/behind
- let ahead_count = items.iter().filter(|i| i.ahead() > 0).count();
- let behind_count = items.iter().filter(|i| i.behind() > 0).count();
+ let ahead_count = items
+ .iter()
+ .filter(|i| match i {
+ ListItem::Worktree(wt) => wt.counts.ahead > 0,
+ ListItem::Branch(br) => br.counts.ahead > 0,
+ })
+ .count();
+
+ let behind_count = items
+ .iter()
+ .filter(|i| match i {
+ ListItem::Worktree(wt) => wt.counts.behind > 0,
+ ListItem::Branch(br) => br.counts.behind > 0,
+ })
+ .count();
println!();
let dim = Style::new().dimmed();
diff --git a/src/commands/merge.rs b/src/commands/merge.rs
index f134b580f..c6bb6e000 100644
--- a/src/commands/merge.rs
+++ b/src/commands/merge.rs
@@ -38,9 +38,12 @@ pub fn handle_merge(
// Check for uncommitted changes
repo.ensure_clean_working_tree()?;
+ // Track operations for summary
+ let mut squashed_count: Option<usize> = None;
+
// Squash commits if requested
if squash {
- handle_squash(&target_branch)?;
+ squashed_count = handle_squash(&target_branch)?;
}
// Rebase onto target
@@ -90,18 +93,58 @@ pub fn handle_merge(
))
})?;
}
+
+ // Print comprehensive summary
+ println!();
+ print_merge_summary(&current_branch, &target_branch, squashed_count, true);
} else {
- let green = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Green)));
- let green_bold = green.bold();
- println!(
- "✅ {green}Successfully merged to {green_bold}{target_branch}{green_bold:#} (worktree preserved){green:#}"
- );
+ // Print comprehensive summary (worktree preserved)
+ println!();
+ print_merge_summary(&current_branch, &target_branch, squashed_count, false);
}
Ok(())
}
-fn handle_squash(target_branch: &str) -> Result<(), GitError> {
+/// Print a comprehensive summary of the merge operation
+fn print_merge_summary(
+ from_branch: &str,
+ to_branch: &str,
+ squashed_count: Option<usize>,
+ cleaned_up: bool,
+) {
+ let green = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Green)));
+ let green_bold = green.bold();
+ let dim = AnstyleStyle::new().dimmed();
+
+ println!("✅ {green}Merge complete{green:#}");
+ println!();
+
+ // Summary of operations
+ let mut operations = Vec::new();
+
+ if let Some(count) = squashed_count {
+ operations.push(format!("Squashed {count} commits into 1"));
+ }
+
+ operations.push(format!(
+ "Rebased {green_bold}{from_branch}{green_bold:#} onto {green_bold}{to_branch}{green_bold:#}"
+ ));
+
+ operations.push(format!("Pushed to {green_bold}{to_branch}{green_bold:#}"));
+
+ if cleaned_up {
+ operations.push("Cleaned up worktree".to_string());
+ } else {
+ operations.push("Preserved worktree".to_string());
+ }
+
+ for (i, op) in operations.iter().enumerate() {
+ println!(" {dim}{}. {}{dim:#}", i + 1, op);
+ }
+}
+
+fn handle_squash(target_branch: &str) -> Result<Option<usize>, GitError> {
let repo = Repository::current();
// Get merge base with target branch
@@ -118,7 +161,7 @@ fn handle_squash(target_branch: &str) -> Result<(), GitError> {
// No commits and no staged changes - nothing to squash
let dim = AnstyleStyle::new().dimmed();
println!("{dim}No commits to squash - already at merge base{dim:#}");
- return Ok(());
+ return Ok(None);
}
if commit_count == 0 && has_staged {
@@ -138,7 +181,7 @@ fn handle_squash(target_branch: &str) -> Result<(), GitError> {
println!(
"{dim}Only 1 commit since {cyan_bold}{target_branch}{cyan_bold:#} - no squashing needed{dim:#}"
);
- return Ok(());
+ return Ok(None);
}
// One or more commits (possibly with staged changes) - squash them
@@ -164,5 +207,5 @@ fn handle_squash(target_branch: &str) -> Result<(), GitError> {
let green = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Green)));
println!("✅ {green}Squashed {commit_count} commits into one{green:#}");
- Ok(())
+ Ok(Some(commit_count))
}
diff --git a/src/commands/worktree.rs b/src/commands/worktree.rs
index 118f854b6..8d4375fdf 100644
--- a/src/commands/worktree.rs
+++ b/src/commands/worktree.rs
@@ -648,6 +648,14 @@ pub fn handle_push(target: Option<&str>, allow_merge_commits: bool) -> Result<()
// Count commits and show what will be pushed
let commit_count = repo.count_commits(&target_branch, "HEAD")?;
+
+ // Get diff statistics early so we can use them in the summary
+ let diff_shortstat = if commit_count > 0 {
+ repo.run_command(&["diff", "--shortstat", &format!("{}..HEAD", target_branch)])?
+ } else {
+ String::new()
+ };
+
if commit_count > 0 {
let commit_text = if commit_count == 1 {
"commit"
@@ -675,6 +683,16 @@ pub fn handle_push(target: Option<&str>, allow_merge_commits: bool) -> Result<()
])?;
println!("{}", log_output.trim());
println!();
+
+ // Show diff statistics
+ let diff_stat =
+ repo.run_command(&["diff", "--stat", &format!("{}..HEAD", target_branch)])?;
+
+ if !diff_stat.trim().is_empty() {
+ let dim = AnstyleStyle::new().dimmed();
+ println!("{dim}{}{dim:#}", diff_stat.trim());
+ println!();
+ }
}
// Get git common dir for the push
@@ -687,8 +705,82 @@ pub fn handle_push(target: Option<&str>, allow_merge_commits: bool) -> Result<()
GitError::CommandFailed(format!("{ERROR_EMOJI} {ERROR}Push failed: {e}{ERROR:#}"))
})?;
+ // Build success message with statistics
let green = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Green)));
let green_bold = green.bold();
- println!("✅ {green}Pushed to {green_bold}{target_branch}{green_bold:#}{green:#}");
+
+ if commit_count > 0 {
+ // Parse shortstat to extract files/insertions/deletions
+ // Example: " 3 files changed, 45 insertions(+), 12 deletions(-)"
+ let stats = parse_diff_shortstat(&diff_shortstat);
+
+ let mut summary_parts = vec![format!(
+ "{} commit{}",
+ commit_count,
+ if commit_count == 1 { "" } else { "s" }
+ )];
+
+ if let Some(files) = stats.files {
+ summary_parts.push(format!(
+ "{} file{}",
+ files,
+ if files == 1 { "" } else { "s" }
+ ));
+ }
+ if let Some(insertions) = stats.insertions {
+ let addition = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Green)));
+ summary_parts.push(format!("{addition}+{insertions}{addition:#}"));
+ }
+ if let Some(deletions) = stats.deletions {
+ let deletion = AnstyleStyle::new().fg_color(Some(Color::Ansi(AnsiColor::Red)));
+ summary_parts.push(format!("{deletion}-{deletions}{deletion:#}"));
+ }
+
+ println!(
+ "✅ {green}Pushed to {green_bold}{target_branch}{green_bold:#} ({}) {green:#}",
+ summary_parts.join(", ")
+ );
+ } else {
+ println!("✅ {green}Pushed to {green_bold}{target_branch}{green_bold:#}{green:#}");
+ }
+
Ok(())
}
+
+/// Parse git diff --shortstat output
+struct DiffStats {
+ files: Option<usize>,
+ insertions: Option<usize>,
+ deletions: Option<usize>,
+}
+
+fn parse_diff_shortstat(output: &str) -> DiffStats {
+ let mut stats = DiffStats {
+ files: None,
+ insertions: None,
+ deletions: None,
+ };
+
+ // Example: " 3 files changed, 45 insertions(+), 12 deletions(-)"
+ let parts: Vec<&str> = output.split(',').collect();
+
+ for part in parts {
+ let part = part.trim();
+
+ if part.contains("file") {
+ if let Some(num_str) = part.split_whitespace().next() {
+ stats.files = num_str.parse().ok();
+ }
+ } else if part.contains("insertion") {
+ if let Some(num_str) = part.split_whitespace().next() {
+ stats.insertions = num_str.parse().ok();
+ }
+ } else if part.contains("deletion") {
+ if let Some(num_str) = part.split_whitespace().next() {
+ stats.deletions = num_str.parse().ok();
+ }
+ }
+ }
+
+ stats
+}
diff --git a/src/main.rs b/src/main.rs
index e1ae20df4..38579f49c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -10,8 +10,8 @@ mod display;
mod llm;
use commands::{
- Shell, handle_complete, handle_completion, handle_configure_shell, handle_init, handle_list,
- handle_merge, handle_push, handle_remove, handle_switch,
+ ConfigAction, Shell, handle_complete, handle_completion, handle_configure_shell, handle_init,
+ handle_list, handle_merge, handle_push, handle_remove, handle_switch,
};
#[derive(Debug, Clone, Copy, clap::ValueEnum)]
@@ -160,13 +160,12 @@ fn main() {
// Count actual changes (not AlreadyExists)
let changes_count = results
.iter()
- .filter(|r| !matches!(r.action, crate::ConfigAction::AlreadyExists))
+ .filter(|r| !matches!(r.action, ConfigAction::AlreadyExists))
.count();
if changes_count == 0 {
// All shells already configured
let green = Style::new().fg_color(Some(Color::Ansi(AnsiColor::Green)));
- let green_bold = green.bold();
println!("✅ {green}All shells already configured{green:#}");
return;
}
diff --git a/tests/snapshots/integration__integration_tests__column_alignment__alignment_empty_diffs.snap b/tests/snapshots/integration__integration_tests__column_alignment__alignment_empty_diffs.snap
index 0e4c8c6a5..c3e6db984 100644
--- a/tests/snapshots/integration__integration_tests__column_alignment__alignment_empty_diffs.snap
+++ b/tests/snapshots/integration__integration_tests__column_alignment__alignment_empty_diffs.snap
@@ -25,4 +25,6 @@ also-no-changes 9 months ago b834638e Initial commit
no-changes 9 months ago b834638e Initial commit ./no-changes
with-changes 9 months ago b834638e Initial commit ./with-changes
+Showing 4 worktrees, 1 with changes
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__column_alignment__alignment_extreme_diffs.snap b/tests/snapshots/integration__integration_tests__column_alignment__alignment_extreme_diffs.snap
index 351c381ab..b9cb88060 100644
--- a/tests/snapshots/integration__integration_tests__column_alignment__alignment_extreme_diffs.snap
+++ b/tests/snapshots/integration__integration_tests__column_alignment__alignment_extreme_diffs.snap
@@ -24,4 +24,6 @@ exit_code: 0
huge 9 months ago b834638e Initial commit ./huge
tiny 9 months ago b834638e Initial commit ./tiny
+Showing 3 worktrees, 1 with changes
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__column_alignment__alignment_varying_diffs.snap b/tests/snapshots/integration__integration_tests__column_alignment__alignment_varying_diffs.snap
index 692137076..4007cea90 100644
--- a/tests/snapshots/integration__integration_tests__column_alignment__alignment_varying_diffs.snap
+++ b/tests/snapshots/integration__integration_tests__column_alignment__alignment_varying_diffs.snap
@@ -25,4 +25,6 @@ feature-large 9 months ago b834638e Initial commit
feature-medium 9 months ago b834638e Initial commit ./feature-medium
feature-small 9 months ago b834638e Initial commit ./feature-small
+Showing 4 worktrees
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_already_exists.snap b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_already_exists.snap
index 6bf91360d..d312b72c0 100644
--- a/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_already_exists.snap
+++ b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_already_exists.snap
@@ -14,7 +14,7 @@ info:
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpERU3Zo
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpeWdD3U
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
@@ -22,7 +22,6 @@ info:
success: true
exit_code: 0
----- stdout -----
-Already configured zsh [TEMP_HOME]/.zshrc
- if command -v wt >/dev/null 2>&1; then eval "$(wt init zsh)"; fi
+✅ All shells already configured
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_custom_prefix.snap b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_custom_prefix.snap
index a6904cd1b..8e1916762 100644
--- a/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_custom_prefix.snap
+++ b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_custom_prefix.snap
@@ -16,7 +16,7 @@ info:
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp2TPYeW
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpuzP9Nf
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
@@ -27,4 +27,8 @@ exit_code: 0
Added bash [TEMP_HOME]/.bash_profile
if command -v worktree >/dev/null 2>&1; then eval "$(worktree init bash)"; fi
+✅ Configured 1 shell
+
+💡 Restart your shell or run: source <config-file>
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_fish.snap b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_fish.snap
index 6e9659624..ec37ede0e 100644
--- a/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_fish.snap
+++ b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_fish.snap
@@ -14,7 +14,7 @@ info:
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpRrLvi6
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp0kaR0I
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
@@ -25,4 +25,8 @@ exit_code: 0
Created fish [TEMP_HOME]/.config/fish/conf.d/wt.fish
if type -q wt; wt init fish | source; end
+✅ Configured 1 shell
+
+💡 Restart your shell or run: source <config-file>
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_fish_custom_prefix.snap b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_fish_custom_prefix.snap
index 272e89085..d5f974427 100644
--- a/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_fish_custom_prefix.snap
+++ b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_fish_custom_prefix.snap
@@ -16,7 +16,7 @@ info:
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpHWEVR4
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp0BNQxd
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
@@ -27,4 +27,8 @@ exit_code: 0
Created fish [TEMP_HOME]/.config/fish/conf.d/worktree.fish
if type -q worktree; worktree init fish | source; end
+✅ Configured 1 shell
+
+💡 Restart your shell or run: source <config-file>
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_mixed_states.snap b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_mixed_states.snap
index da1fa1147..b9857962e 100644
--- a/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_mixed_states.snap
+++ b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_mixed_states.snap
@@ -12,7 +12,7 @@ info:
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpCqxPsc
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp0ylY9j
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
@@ -25,4 +25,8 @@ Already configured bash [TEMP_HOME]/.bash_profile
Added zsh [TEMP_HOME]/.zshrc
if command -v wt >/dev/null 2>&1; then eval "$(wt init zsh)"; fi
+✅ Configured 1 shell
+
+💡 Restart your shell or run: source <config-file>
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_multiple_configs.snap b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_multiple_configs.snap
index f6f546e84..d62a1dd62 100644
--- a/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_multiple_configs.snap
+++ b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_multiple_configs.snap
@@ -12,7 +12,7 @@ info:
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp5RiHJU
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpkUz5nG
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
@@ -25,4 +25,8 @@ Added bash [TEMP_HOME]/.bash_profile
Added zsh [TEMP_HOME]/.zshrc
if command -v wt >/dev/null 2>&1; then eval "$(wt init zsh)"; fi
+✅ Configured 2 shells
+
+💡 Restart your shell or run: source <config-file>
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_with_yes.snap b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_with_yes.snap
index 752baa9c9..83e53f1ed 100644
--- a/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_with_yes.snap
+++ b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_with_yes.snap
@@ -12,7 +12,7 @@ info:
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpsM7nu9
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpX6Vm3M
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
@@ -23,4 +23,8 @@ exit_code: 0
Added zsh [TEMP_HOME]/.zshrc
if command -v wt >/dev/null 2>&1; then eval "$(wt init zsh)"; fi
+✅ Configured 1 shell
+
+💡 Restart your shell or run: source <config-file>
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_zsh.snap b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_zsh.snap
index 460f1109b..201000ba8 100644
--- a/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_zsh.snap
+++ b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_zsh.snap
@@ -14,7 +14,7 @@ info:
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
- HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpyxX7Uq
+ HOME: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp47Fgdy
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1704067200"
@@ -25,4 +25,8 @@ exit_code: 0
Added zsh [TEMP_HOME]/.zshrc
if command -v wt >/dev/null 2>&1; then eval "$(wt init zsh)"; fi
+✅ Configured 1 shell
+
+💡 Restart your shell or run: source <config-file>
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__list__detached_head.snap b/tests/snapshots/integration__integration_tests__list__detached_head.snap
index 5fb4bcd17..ce5b65f24 100644
--- a/tests/snapshots/integration__integration_tests__list__detached_head.snap
+++ b/tests/snapshots/integration__integration_tests__list__detached_head.snap
@@ -21,4 +21,6 @@ exit_code: 0
Branch  Age  Commit  Message  Path
(detached) 9 months ago b834638e Initial commit .
+Showing 1 worktree
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap b/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap
index ae611efc5..d3014f7d9 100644
--- a/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap
+++ b/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap
@@ -22,4 +22,6 @@ exit_code: 0
main  9 months ago b834638e ./main
locked-no-reason 9 months ago b834638e ./locked-no-reason
+Showing 2 worktrees
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__list__locked_worktree.snap b/tests/snapshots/integration__integration_tests__list__locked_worktree.snap
index 1b12f6261..fda961993 100644
--- a/tests/snapshots/integration__integration_tests__list__locked_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__list__locked_worktree.snap
@@ -22,4 +22,6 @@ exit_code: 0
main  9 months ago b834638e Initial commit ./main
locked-feature 9 months ago b834638e Initial commit ./locked-feature
+Showing 2 worktrees
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__list__long_branch_name.snap b/tests/snapshots/integration__integration_tests__list__long_branch_name.snap
index 15533a293..6adecbed6 100644
--- a/tests/snapshots/integration__integration_tests__list__long_branch_name.snap
+++ b/tests/snapshots/integration__integration_tests__list__long_branch_name.snap
@@ -22,4 +22,6 @@ exit_code: 0
main  b834638e ./main
feature-this-is-a-very-long-branch-name-that-should-test-column-alignment b834638e ./feature-this-is-a-very-long-branch-name-that-should-test-column-alignment
+Showing 2 worktrees
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__list__long_commit_message.snap b/tests/snapshots/integration__integration_tests__list__long_commit_message.snap
index 21b859d1d..3595de134 100644
--- a/tests/snapshots/integration__integration_tests__list__long_commit_message.snap
+++ b/tests/snapshots/integration__integration_tests__list__long_commit_message.snap
@@ -22,4 +22,6 @@ exit_code: 0
main  9 months ago 1310bfb9 Short message ./main
feature-a 9 months ago f078644e This is a very long commit... ./feature-a
+Showing 2 worktrees, 1 behind
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap b/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap
index c8514c84b..a8c6d34ca 100644
--- a/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap
+++ b/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap
@@ -25,4 +25,6 @@ short 9 months ago b834638e ./short
very-long-branch-name-here 9 months ago b834638e ./very-long-branch-name-here
with-changes 9 months ago b834638e ./with-changes
+Showing 5 worktrees
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap b/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap
index 649bde73f..7e6da327f 100644
--- a/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap
+++ b/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap
@@ -23,4 +23,6 @@ exit_code: 0
feature-a 9 months ago b834638e Initial commit ./feature-a
feature-b 9 months ago b834638e Initial commit ./feature-b
+Showing 3 worktrees
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__list__single_worktree.snap b/tests/snapshots/integration__integration_tests__list__single_worktree.snap
index a53645f1c..d88bda201 100644
--- a/tests/snapshots/integration__integration_tests__list__single_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__list__single_worktree.snap
@@ -21,4 +21,6 @@ exit_code: 0
Branch Age  Commit  Message  Path
main  9 months ago b834638e Initial commit .
+Showing 1 worktree
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__list__unicode_branch_name.snap b/tests/snapshots/integration__integration_tests__list__unicode_branch_name.snap
index 5789ea12e..a06757ae7 100644
--- a/tests/snapshots/integration__integration_tests__list__unicode_branch_name.snap
+++ b/tests/snapshots/integration__integration_tests__list__unicode_branch_name.snap
@@ -23,4 +23,6 @@ exit_code: 0
feature-日本語-test 9 months ago b834638e ./feature-日本語-test
fix-émoji-🎉 9 months ago b834638e ./fix-émoji-🎉
+Showing 3 worktrees
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap b/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap
index 5a050fda1..77930e7fd 100644
--- a/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap
+++ b/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap
@@ -22,4 +22,6 @@ exit_code: 0
main  9 months ago e4614cb7 Fix bug with café ☕... ./main
feature-test 9 months ago 0c53695b Add support for... ./feature-test
+Showing 2 worktrees, 1 behind
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap b/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap
index 3e3014d4a..dc2459b4c 100644
--- a/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap
@@ -26,4 +26,6 @@ another-branch 9 months ago b834638e
feature-without-worktree 9 months ago b834638e
fix-bug 9 months ago b834638e
+Showing 2 worktrees, 3 branches
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap b/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap
index 12ee13ad5..22906b563 100644
--- a/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap
@@ -24,4 +24,6 @@ exit_code: 0
feature-a 9 months ago b834638e Initial commit ./feature-a
feature-b 9 months ago b834638e Initial commit ./feature-b
+Showing 3 worktrees
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__list__with_branches_flag_only_branches.snap b/tests/snapshots/integration__integration_tests__list__with_branches_flag_only_branches.snap
index 548281952..062034523 100644
--- a/tests/snapshots/integration__integration_tests__list__with_branches_flag_only_branches.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_branches_flag_only_branches.snap
@@ -25,4 +25,6 @@ branch-alpha 9 months ago b834638e Initial commit
branch-beta 9 months ago b834638e Initial commit
branch-gamma 9 months ago b834638e Initial commit
+Showing 1 worktrees, 3 branches
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap b/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap
index 01cd2751a..d77ba9508 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap
@@ -24,11 +24,20 @@ exit_code: 0
* [SHA] (HEAD -> feature) Add feature file
-✅ Pushed to main
+feature.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+✅ Pushed to main (1 commit, 1 file, +1) 
🔄 Cleaning up worktree...
✅ Removed worktree and returned to primary
Path: [REPO]
To enable automatic cd, run: wt configure-shell
+✅ Merge complete
+
+ 1. Rebased feature onto main
+ 2. Pushed to main
+ 3. Cleaned up worktree
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_not_fast_forward.snap b/tests/snapshots/integration__integration_tests__merge__merge_not_fast_forward.snap
index 01cd2751a..d77ba9508 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_not_fast_forward.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_not_fast_forward.snap
@@ -24,11 +24,20 @@ exit_code: 0
* [SHA] (HEAD -> feature) Add feature file
-✅ Pushed to main
+feature.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+✅ Pushed to main (1 commit, 1 file, +1) 
🔄 Cleaning up worktree...
✅ Removed worktree and returned to primary
Path: [REPO]
To enable automatic cd, run: wt configure-shell
+✅ Merge complete
+
+ 1. Rebased feature onto main
+ 2. Pushed to main
+ 3. Cleaned up worktree
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap
index 4108fc21f..af7e3e674 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap
@@ -27,12 +27,24 @@ exit_code: 0
* [SHA] (HEAD -> feature) Squash commits from main
-✅ Pushed to main
+file1.txt | 1 +
+ file2.txt | 1 +
+ file3.txt | 1 +
+ 3 files changed, 3 insertions(+)
+
+✅ Pushed to main (1 commit, 3 files, +3) 
🔄 Cleaning up worktree...
✅ Removed worktree and returned to primary
Path: [REPO]
To enable automatic cd, run: wt configure-shell
+✅ Merge complete
+
+ 1. Squashed 3 commits into 1
+ 2. Rebased feature onto main
+ 3. Pushed to main
+ 4. Cleaned up worktree
+
----- stderr -----
🟡 LLM generation failed, using deterministic message
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_llm_fallback.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_llm_fallback.snap
index f9c74f478..cf0393f90 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_llm_fallback.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_llm_fallback.snap
@@ -28,12 +28,23 @@ exit_code: 0
* [SHA] (HEAD -> feature) Squash commits from main
-✅ Pushed to main
+file1.txt | 1 +
+ file2.txt | 1 +
+ 2 files changed, 2 insertions(+)
+
+✅ Pushed to main (1 commit, 2 files, +2) 
🔄 Cleaning up worktree...
✅ Removed worktree and returned to primary
Path: [REPO]
To enable automatic cd, run: wt configure-shell
+✅ Merge complete
+
+ 1. Squashed 2 commits into 1
+ 2. Rebased feature onto main
+ 3. Pushed to main
+ 4. Cleaned up worktree
+
----- stderr -----
🟡 LLM generation failed, using deterministic message
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_single_commit.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_single_commit.snap
index 79a49b668..b9d68aa5a 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_single_commit.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_single_commit.snap
@@ -26,11 +26,20 @@ exit_code: 0
* [SHA] (HEAD -> feature) feat: single commit
-✅ Pushed to main
+file1.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+✅ Pushed to main (1 commit, 1 file, +1) 
🔄 Cleaning up worktree...
✅ Removed worktree and returned to primary
Path: [REPO]
To enable automatic cd, run: wt configure-shell
+✅ Merge complete
+
+ 1. Rebased feature onto main
+ 2. Pushed to main
+ 3. Cleaned up worktree
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_with_llm.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_with_llm.snap
index 825e4071e..4ca5be98c 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_with_llm.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_with_llm.snap
@@ -29,12 +29,22 @@ exit_code: 0
* [SHA] (HEAD -> feature) Squash commits from main
-✅ Pushed to main
+auth.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+✅ Pushed to main (1 commit, 1 file, +1) 
🔄 Cleaning up worktree...
✅ Removed worktree and returned to primary
Path: [REPO]
To enable automatic cd, run: wt configure-shell
+✅ Merge complete
+
+ 1. Squashed 2 commits into 1
+ 2. Rebased feature onto main
+ 3. Pushed to main
+ 4. Cleaned up worktree
+
----- stderr -----
🟡 LLM generation failed, using deterministic message
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap b/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap
index a1365b0cf..6ba6da291 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap
@@ -23,11 +23,20 @@ exit_code: 0
* [SHA] (HEAD -> feature) Add feature file
-✅ Pushed to main
+feature.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+✅ Pushed to main (1 commit, 1 file, +1) 
🔄 Cleaning up worktree...
✅ Removed worktree and returned to primary
Path: [REPO]
To enable automatic cd, run: wt configure-shell
+✅ Merge complete
+
+ 1. Rebased feature onto main
+ 2. Pushed to main
+ 3. Cleaned up worktree
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_with_keep.snap b/tests/snapshots/integration__integration_tests__merge__merge_with_keep.snap
index 9a6c66e71..8c5c71247 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_with_keep.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_with_keep.snap
@@ -25,7 +25,15 @@ exit_code: 0
* [SHA] (HEAD -> feature) Add feature file
-✅ Pushed to main
-✅ Successfully merged to main (worktree preserved)
+feature.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+✅ Pushed to main (1 commit, 1 file, +1) 
+
+✅ Merge complete
+
+ 1. Rebased feature onto main
+ 2. Pushed to main
+ 3. Preserved worktree
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__push__push_fast_forward.snap b/tests/snapshots/integration__integration_tests__push__push_fast_forward.snap
index 4a842910c..e218e0d2f 100644
--- a/tests/snapshots/integration__integration_tests__push__push_fast_forward.snap
+++ b/tests/snapshots/integration__integration_tests__push__push_fast_forward.snap
@@ -23,6 +23,9 @@ exit_code: 0
* [SHA] (HEAD -> feature) Add test file
-✅ Pushed to main
+test.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+✅ Pushed to main (1 commit, 1 file, +1) 
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__push__push_not_fast_forward.snap b/tests/snapshots/integration__integration_tests__push__push_not_fast_forward.snap
index b5e196edb..fd6d53216 100644
--- a/tests/snapshots/integration__integration_tests__push__push_not_fast_forward.snap
+++ b/tests/snapshots/integration__integration_tests__push__push_not_fast_forward.snap
@@ -23,6 +23,9 @@ exit_code: 0
* [SHA] (HEAD -> feature) Add feature file
-✅ Pushed to main
+feature.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+✅ Pushed to main (1 commit, 1 file, +1) 
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__push__push_to_default.snap b/tests/snapshots/integration__integration_tests__push__push_to_default.snap
index 8b6122af4..0f206765c 100644
--- a/tests/snapshots/integration__integration_tests__push__push_to_default.snap
+++ b/tests/snapshots/integration__integration_tests__push__push_to_default.snap
@@ -22,6 +22,9 @@ exit_code: 0
* [SHA] (HEAD -> feature) Add feature file
-✅ Pushed to main
+feature.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+✅ Pushed to main (1 commit, 1 file, +1) 
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap
index 1d9557c96..46f1e4c6f 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap
@@ -24,4 +24,6 @@ another-extremely-long-name-here b834638e ./another-extremely-long-nam
short b834638e ./short
very-long-feature-branch-name b834638e ./very-long-feature-branch-name
+Showing 4 worktrees
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap
index c21907bbd..411d236f9 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap
@@ -24,4 +24,6 @@ long b834638e ./extremely-long-branch-name-that-might-cause-layout-i
medium b834638e ./medium-length-name
x b834638e ./x
+Showing 4 worktrees
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap
index d21c76e6d..48c9f6de3 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap
@@ -24,4 +24,6 @@ a 9 months ago b834638e Initial commit ./a
bb 9 months ago b834638e Initial commit ./bb
ccc 9 months ago b834638e Initial commit ./ccc
+Showing 4 worktrees
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_120.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_120.snap
index e977c5365..47e8a66af 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_120.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_120.snap
@@ -24,4 +24,6 @@ exit_code: 0
feature-a 9 months ago a7bc47ca Initial commit with a reasonably long message ./feature-a
feature-b 9 months ago a7bc47ca Initial commit with a reasonably long message ./feature-b
+Showing 3 worktrees
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_150.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_150.snap
index e49c32e7c..543501a0c 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_150.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_150.snap
@@ -24,4 +24,6 @@ exit_code: 0
feature-a 9 months ago a7bc47ca Initial commit with a reasonably long message ./feature-a
feature-b 9 months ago a7bc47ca Initial commit with a reasonably long message ./feature-b
+Showing 3 worktrees
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_80.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_80.snap
index 18a8c4b1b..270dccfe0 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_80.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_80.snap
@@ -24,4 +24,6 @@ exit_code: 0
feature-a 9 months ago a7bc47ca Initial commit with a... ./feature-a
feature-b 9 months ago a7bc47ca Initial commit with a... ./feature-b
+Showing 3 worktrees
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap
index 41e8bc1d7..bbf056d53 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap
@@ -24,4 +24,6 @@ cafe 9 months ago b834638e Initial commit ./café
naive 9 months ago b834638e Initial commit ./naïve
resume 9 months ago b834638e Initial commit ./résumé
+Showing 4 worktrees
+
----- stderr -----