Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Improve error messages and consistency
Maximilian Roos4bdf4e1f92f6
diff --git a/CLAUDE.md b/CLAUDE.mdindex 35fd7d486..b8ca8b91f 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -199,8 +199,8 @@ Six canonical message patterns with their emojis:### stdout vs stderr: Separation by Mode**Interactive mode:**-- stdout: All worktrunk output (messages, errors, warnings, progress)-- stderr: Child process output (git, npm, user commands) + interactive prompts+- stdout: Status messages (progress, success, warning, info, hint)+- stderr: Errors, gutter content (diagnostics), child process output, interactive prompts**Directive mode** (--internal flag for shell integration):- stdout: Shell script emitted at the end (e.g., `cd '/path/to/worktree'`)@@ -370,24 +370,35 @@ output::gutter(format_with_gutter(&log, "", None))?;output::progress(format!("{CYAN}Merging...{CYAN:#}\n"))?;```-### External Command Error Formatting+### Error Message Formatting-When external commands (user-configured commands like LLM tools, hooks) fail, error messages must:+**Single-line errors with variables are fine:**+```rust+// ✅ GOOD - single-line with path variable+.map_err(|e| format!("Failed to read {}: {}", format_path_for_display(path), e))?++// ✅ GOOD - using .context() for simple errors+std::fs::read_to_string(&path).context("Failed to read config")?+```++**Multi-line external output needs gutter formatting:**++When external commands (git, npm, LLM tools, hooks) produce multi-line stderr, use gutter formatting:1. **Show the command that was run** - Include the full command with arguments so users can debug-2. **Put error output in a gutter** - Don't embed raw stderr inline in the message+2. **Put multi-line output in a gutter** - Don't embed raw stderr inline in the messageUse the `format_error_block` helper in `src/git/error.rs` or follow its pattern:```rust-// ✅ GOOD - command shown in header, error in gutter+// ✅ GOOD - command shown in header, multi-line error in gutter❌ Commit generation command 'llm --model claude' failed┃ Error: [Errno 8] nodename nor servname provided, or not known-// ❌ BAD - error embedded inline, command not shown+// ❌ BAD - multi-line error embedded inline❌ Commit generation command 'llm' failed: LLM command failed: Error: [Errno 8]...```-**Implementation:** See `format_error_block()` in `src/git/error.rs` for the pattern, and `llm_command_failed()` for an example.+**Implementation:** See `format_error_block()` in `src/git/error.rs` for the pattern, and `LlmCommandFailed` variant for an example.### Table Column Alignmentdiff --git a/README.md b/README.mdindex 2ddcb8760..37762f532 100644--- a/README.md+++ b/README.md@@ -165,8 +165,20 @@ $ wt merge✅ Squashed @ a1b2c3d🔄 Running pre-merge test:cargo test+ Finished test [unoptimized + debuginfo] target(s) in 0.12s+ Running unittests src/lib.rs (target/debug/deps/worktrunk-abc123)++running 18 tests+test auth::tests::test_jwt_decode ... ok+test auth::tests::test_jwt_encode ... ok+test auth::tests::test_token_refresh ... ok+test auth::tests::test_token_validation ... ok++test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.08s🔄 Running pre-merge lint:cargo clippy+ Checking worktrunk v0.1.0+ Finished dev [unoptimized + debuginfo] target(s) in 1.23s🔄 Merging 1 commit to main @ a1b2c3d (no rebase needed)* a1b2c3d feat(auth): Implement JWT authentication systemauth.rs | 8 ++++++++@@ -177,6 +189,11 @@ $ wt merge🔄 Removing feature-auth worktree & branch in background🔄 Running post-merge install:cargo install --path .+ Installing worktrunk v0.1.0+ Compiling worktrunk v0.1.0+ Finished release [optimized] target(s) in 2.34s+ Installing ~/.cargo/bin/wt+ Installed package `worktrunk v0.1.0` (executable `wt`)```<!-- END AUTO-GENERATED -->diff --git a/src/commands/command_approval.rs b/src/commands/command_approval.rsindex 0ae6938d0..c9daa4f78 100644--- a/src/commands/command_approval.rs+++ b/src/commands/command_approval.rs@@ -109,7 +109,7 @@ fn prompt_for_batch_approval(commands: &[&Command], project_id: &str) -> anyhow:// This happens AFTER showing the commands so they appear in CI/CD logs// even when the prompt cannot be displayed (fail-fast principle)if !io::stdin().is_terminal() {- return Err(GitError::NotInteractive.styled_err());+ return Err(GitError::NotInteractive.into());}// Flush stderr before showing prompt to ensure all output is visiblediff --git a/src/commands/config.rs b/src/commands/config.rsindex ec9a41c12..851d47ce8 100644--- a/src/commands/config.rs+++ b/src/commands/config.rs@@ -44,8 +44,11 @@ fn comment_out_config(content: &str) -> String {/// Handle the config create commandpub fn handle_config_create() -> anyhow::Result<()> {- let config_path = get_global_config_path()- .ok_or_else(|| anyhow::anyhow!("Could not determine global config path"))?;+ let config_path = get_global_config_path().ok_or_else(|| {+ anyhow::anyhow!(+ "Cannot determine config directory. Set $HOME or $XDG_CONFIG_HOME environment variable"+ )+ })?;// Check if file already existsif config_path.exists() {@@ -112,8 +115,11 @@ fn render_global_config(out: &mut String) -> anyhow::Result<()> {let bold = AnstyleStyle::new().bold();// Get config path- let config_path = get_global_config_path()- .ok_or_else(|| anyhow::anyhow!("Could not determine global config path"))?;+ let config_path = get_global_config_path().ok_or_else(|| {+ anyhow::anyhow!(+ "Cannot determine config directory. Set $HOME or $XDG_CONFIG_HOME environment variable"+ )+ })?;writeln!(out,diff --git a/src/commands/configure_shell.rs b/src/commands/configure_shell.rsindex ef56e01fa..00d1db49c 100644--- a/src/commands/configure_shell.rs+++ b/src/commands/configure_shell.rs@@ -204,7 +204,9 @@ pub fn scan_shell_configs(let mut skipped = Vec::new();for shell in shells {- let paths = shell.config_paths().map_err(|e| e.to_string())?;+ let paths = shell+ .config_paths()+ .map_err(|e| format!("Failed to get config paths for {}: {}", shell, e))?;// Find the first existing config filelet target_path = paths.iter().find(|p| p.exists());@@ -301,7 +303,13 @@ fn configure_shell_file(// Check for the exact conditional wrapper we would writefor line in reader.lines() {- let line = line.map_err(|e| format!("Failed to read line: {}", e))?;+ let line = line.map_err(|e| {+ format!(+ "Failed to read line from {}: {}",+ format_path_for_display(path),+ e+ )+ })?;// Canonical detection: check if the line matches exactly what we writeif line.trim() == config_content {@@ -571,7 +579,9 @@ pub fn process_shell_completions(continue;}- let completion_path = shell.completion_path().map_err(|e| e.to_string())?;+ let completion_path = shell+ .completion_path()+ .map_err(|e| format!("Failed to get completion path for {}: {}", shell, e))?;// Check if completions already exist with correct contentif completion_path.exists() {@@ -739,7 +749,9 @@ fn scan_for_uninstall(continue;}- let completion_path = shell.completion_path().map_err(|e| e.to_string())?;+ let completion_path = shell+ .completion_path()+ .map_err(|e| format!("Failed to get completion path for {}: {}", shell, e))?;if completion_path.exists() {if dry_run {diff --git a/src/commands/merge.rs b/src/commands/merge.rsindex 7d2241073..2879e971b 100644--- a/src/commands/merge.rs+++ b/src/commands/merge.rs@@ -87,14 +87,14 @@ pub fn handle_merge(return Err(worktrunk::git::GitError::UncommittedChanges {action: Some("merge with --no-commit".into()),}- .styled_err());+ .into());}// Validate --no-commit flag compatibilityif !commit && remove {- return Err(anyhow::anyhow!(format!(+ return Err(anyhow::anyhow!("{ERROR_EMOJI} {ERROR}--no-commit requires --no-remove{ERROR:#}\n\n{HINT_EMOJI} {HINT}Cannot remove active worktree when skipping commit/rebase{HINT:#}"- )));+ ));}// --no-commit implies --no-squash (validation above ensures --no-remove is already set)@@ -216,7 +216,7 @@ pub fn handle_merge(force_delete: false,target_branch: Some(target_branch.clone()),};- crate::output::handle_remove_output(&remove_result, Some(¤t_branch), true, true)?;+ crate::output::handle_remove_output(&remove_result, Some(¤t_branch), true)?;} else {// Print comprehensive summary (worktree preserved)// Priority: main branch > on target > --no-remove flagdiff --git a/src/commands/process.rs b/src/commands/process.rsindex 8c0fd2635..a74523d24 100644--- a/src/commands/process.rs+++ b/src/commands/process.rs@@ -1,7 +1,9 @@+use anyhow::Context;use std::fs;use std::path::Path;use std::process::{Command, Stdio};use worktrunk::git::Repository;+use worktrunk::path::format_path_for_display;/// Spawn a detached background process with output redirected to a log file///@@ -32,8 +34,12 @@ pub fn spawn_detached(// Create log directory in the common git directorylet log_dir = git_common_dir.join("wt-logs");- fs::create_dir_all(&log_dir)- .map_err(|e| anyhow::anyhow!("Failed to create log directory\n {e}"))?;+ fs::create_dir_all(&log_dir).with_context(|| {+ format!(+ "Failed to create log directory {}",+ format_path_for_display(&log_dir)+ )+ })?;// Generate log filename (no timestamp - overwrites on each run)// Format: {branch}-{name}.log (e.g., "feature-post-start-npm.log", "bugfix-remove.log")@@ -43,8 +49,12 @@ pub fn spawn_detached(let log_path = log_dir.join(format!("{}-{}.log", safe_branch, safe_name));// Create log file- let log_file = fs::File::create(&log_path)- .map_err(|e| anyhow::anyhow!("Failed to create log file\n {e}"))?;+ let log_file = fs::File::create(&log_path).with_context(|| {+ format!(+ "Failed to create log file {}",+ format_path_for_display(&log_path)+ )+ })?;#[cfg(unix)]{@@ -80,17 +90,19 @@ fn spawn_detached_unix()).current_dir(worktree_path).stdin(Stdio::null())- .stdout(Stdio::from(log_file.try_clone().map_err(|e| {- anyhow::anyhow!(format!("Failed to clone log file handle: {}", e))- })?))+ .stdout(Stdio::from(+ log_file+ .try_clone()+ .context("Failed to clone log file handle")?,+ )).stderr(Stdio::from(log_file)).spawn()- .map_err(|e| anyhow::anyhow!(format!("Failed to spawn detached process\n {e}")))?;+ .context("Failed to spawn detached process")?;// Wait for the outer shell to exit (immediate, doesn't block on background command)child.wait()- .map_err(|e| anyhow::anyhow!(format!("Failed to wait for detachment shell\n {e}")))?;+ .context("Failed to wait for detachment shell")?;Ok(())}@@ -112,13 +124,15 @@ fn spawn_detached_windows(.args(["/C", command]).current_dir(worktree_path).stdin(Stdio::null())- .stdout(Stdio::from(log_file.try_clone().map_err(|e| {- anyhow::anyhow!(format!("Failed to clone log file handle: {}", e))- })?))+ .stdout(Stdio::from(+ log_file+ .try_clone()+ .context("Failed to clone log file handle")?,+ )).stderr(Stdio::from(log_file)).creation_flags(CREATE_NEW_PROCESS_GROUP | DETACHED_PROCESS).spawn()- .map_err(|e| anyhow::anyhow!(format!("Failed to spawn detached process\n {e}")))?;+ .context("Failed to spawn detached process")?;Ok(())}diff --git a/src/commands/repository_ext.rs b/src/commands/repository_ext.rsindex e524036ac..087fb0988 100644--- a/src/commands/repository_ext.rs+++ b/src/commands/repository_ext.rs@@ -7,10 +7,7 @@ use anyhow::Context;use worktrunk::config::ProjectConfig;use worktrunk::git::{GitError, Repository};use worktrunk::path::format_path_for_display;-use worktrunk::styling::{- CYAN, CYAN_BOLD, ERROR, ERROR_EMOJI, HINT, HINT_BOLD, HINT_EMOJI, WARNING, WARNING_BOLD,- format_with_gutter,-};+use worktrunk::styling::{CYAN, CYAN_BOLD, WARNING, WARNING_BOLD, format_with_gutter};/// CLI-only helpers implemented on [`Repository`] via an extension trait so we can keep orphan/// implementations inside the binary crate.@@ -52,15 +49,7 @@ impl RepositoryCliExt for Repository {match load_project_config_at(&repo_root)? {Some(cfg) => Ok(cfg),- None => {- use worktrunk::styling::eprintln;- eprintln!("{ERROR_EMOJI} {ERROR}No project configuration found{ERROR:#}");- eprintln!(- "{HINT_EMOJI} {HINT}Create a config file at: {HINT_BOLD}{}{HINT_BOLD:#}{HINT:#}",- format_path_for_display(&config_path)- );- Err(anyhow::anyhow!("No project configuration found"))- }+ None => Err(GitError::ProjectConfigNotFound { config_path }.into()),}}@@ -92,7 +81,7 @@ impl RepositoryCliExt for Repository {return Err(GitError::NoWorktreeFound {branch: branch_name.into(),}- .styled_err());+ .into());}};@@ -100,7 +89,7 @@ impl RepositoryCliExt for Repository {return Err(GitError::WorktreeMissing {branch: branch_name.into(),}- .styled_err());+ .into());}let target_repo = Repository::at(&worktree_path);@@ -163,7 +152,7 @@ impl RepositoryCliExt for Repository {files: overlapping,worktree_path: wt_path.clone(),}- .styled_err());+ .into());}let nanos = SystemTime::now()@@ -205,10 +194,10 @@ impl RepositoryCliExt for Repository {}let Some(stash_ref) = stash_ref else {- return Err(anyhow::anyhow!(format!(+ return Err(anyhow::anyhow!("Failed to locate autostash entry '{}'",stash_name- )));+ ));};Ok(Some(TargetWorktreeStash::new(wt_path, stash_ref)))diff --git a/src/commands/select.rs b/src/commands/select.rsindex 589b0bc51..7a6c182b7 100644--- a/src/commands/select.rs+++ b/src/commands/select.rs@@ -602,13 +602,13 @@ pub fn handle_select(is_directive_mode: bool) -> anyhow::Result<()> {// Legend/controls moved to preview window tabs (render_preview_tabs).no_clear(true) // Prevent skim from clearing screen, we'll do it manually.build()- .map_err(|e| anyhow::anyhow!(format!("Failed to build skim options: {}", e)))?;+ .map_err(|e| anyhow::anyhow!("Failed to build skim options: {}", e))?;// Create item receiverlet (tx, rx): (SkimItemSender, SkimItemReceiver) = unbounded();for item in items {tx.send(item)- .map_err(|e| anyhow::anyhow!(format!("Failed to send item to skim: {}", e)))?;+ .map_err(|e| anyhow::anyhow!("Failed to send item to skim: {}", e))?;}drop(tx);diff --git a/src/commands/standalone.rs b/src/commands/standalone.rsindex 3b485f3a6..44f891bd0 100644--- a/src/commands/standalone.rs+++ b/src/commands/standalone.rs@@ -57,7 +57,7 @@ fn check_hook_configured<T>(hook: &Option<T>, hook_type: HookType) -> anyhow::Rereturn Err(worktrunk::git::GitError::Other {message: format!("No {hook_type} hook configured"),}- .styled_err());+ .into());}Ok(())}@@ -333,13 +333,13 @@ pub fn handle_rebase(target: Option<&str>) -> anyhow::Result<RebaseResult> {target_branch: target_branch.clone(),git_output,}- .styled_err());+ .into());}// Not a rebase conflict, return original errorreturn Err(worktrunk::git::GitError::Other {message: format!("Failed to rebase onto '{}': {}", target_branch, e),}- .styled_err());+ .into());}// Verify rebase completed successfully (safety check for edge cases)@@ -349,7 +349,7 @@ pub fn handle_rebase(target: Option<&str>) -> anyhow::Result<RebaseResult> {target_branch: target_branch.clone(),git_output: String::new(),}- .styled_err());+ .into());}// Successdiff --git a/src/commands/worktree.rs b/src/commands/worktree.rsindex bc71adeca..56aca393a 100644--- a/src/commands/worktree.rs+++ b/src/commands/worktree.rs@@ -221,7 +221,7 @@ pub fn handle_switch(return Err(GitError::BranchAlreadyExists {branch: resolved_branch.clone(),}- .styled_err());+ .into());}// Check if base flag was provided without create flag@@ -263,7 +263,7 @@ pub fn handle_switch(return Err(GitError::WorktreeMissing {branch: resolved_branch.clone(),}- .styled_err());+ .into());}None => {}}@@ -273,14 +273,19 @@ pub fn handle_switch(let repo_name = repo_root.file_name()- .ok_or_else(|| anyhow::anyhow!("{}", "Invalid repository path"))?+ .ok_or_else(|| anyhow::anyhow!("Repository path has no filename: {}", repo_root.display()))?.to_str()- .ok_or_else(|| anyhow::anyhow!("{}", "Invalid UTF-8 in path"))?;+ .ok_or_else(|| {+ anyhow::anyhow!(+ "Repository path contains invalid UTF-8: {}",+ repo_root.display()+ )+ })?;let worktree_path = repo_root.join(config.format_path(repo_name, &resolved_branch)- .map_err(|e| anyhow::anyhow!(format!("Failed to format worktree path: {}", e)))?,+ .map_err(|e| anyhow::anyhow!("Failed to format worktree path: {}", e))?,);// If the target path already exists but no worktree is registered for this branch,@@ -295,7 +300,7 @@ pub fn handle_switch(path: worktree_path,occupant,}- .styled_err());+ .into());}// Create the worktree@@ -344,7 +349,7 @@ pub fn handle_switch(return Err(GitError::WorktreePathExists {path: normalized_path,}- .styled_err());+ .into());}}// Fall back to generic error with context@@ -353,7 +358,7 @@ pub fn handle_switch(base_branch: base_for_creation.clone(),error: msg,}- .styled_err());+ .into());}// Canonicalize the path to resolve any .. components@@ -532,13 +537,13 @@ pub fn handle_push(commits_formatted,in_merge_context: operations.is_some(),}- .styled_err());+ .into());}// Check for merge commits unless allowedlet has_merge_commits = repo.has_merge_commits(&target_branch, "HEAD")?;if !allow_merge_commits && has_merge_commits {- return Err(GitError::MergeCommitsFound.styled_err());+ return Err(GitError::MergeCommitsFound.into());}// Check for conflicting changes in target worktree (auto-stash safe changes)@@ -639,7 +644,7 @@ pub fn handle_push(return Err(GitError::PushFailed {error: e.to_string(),}- .styled_err());+ .into());}if let Some(stash) = target_worktree_stash.take() {diff --git a/src/config/user.rs b/src/config/user.rsindex 05ffd4ab7..497b1380e 100644--- a/src/config/user.rs+++ b/src/config/user.rs@@ -426,7 +426,9 @@ impl WorktrunkConfig {Some(path) => self.save_to(path),None => {let path = get_config_path().ok_or_else(|| {- ConfigError::Message("Could not determine config path".to_string())+ ConfigError::Message(+ "Cannot determine config directory. Set $HOME or $XDG_CONFIG_HOME environment variable".to_string(),+ )})?;self.save_to(&path)}diff --git a/src/git/error.rs b/src/git/error.rsindex 5418a5128..4702f406d 100644--- a/src/git/error.rs+++ b/src/git/error.rs@@ -3,8 +3,8 @@//! This module provides typed error handling://!//! - **`GitError`** - A typed enum for domain errors that can be pattern-matched-//! and tested. Use `.styled_err()` to convert to styled `anyhow::Error` for user-//! display, or `.into()` to preserve the type for pattern matching.+//! and tested. Use `.into()` to convert to `anyhow::Error` while preserving the+//! type for pattern matching and styled display in main.rs.//!//! - **`WorktrunkError`** - A minimal enum for semantic errors that need//! special handling (exit codes, silent errors).@@ -29,11 +29,8 @@ use crate::styling::{/// # Usage////// ```ignore-/// // Return a styled error for user display-/// return Err(GitError::DetachedHead { action: Some("merge".into()) }.styled_err());-///-/// // Return a typed error for pattern matching-/// return Err(GitError::BranchAlreadyExists { branch: "main".into() }.into());+/// // Return a typed error (main.rs handles styled display via downcast)+/// return Err(GitError::DetachedHead { action: Some("merge".into()) }.into());////// // Pattern match on errors/// if let Some(GitError::BranchAlreadyExists { branch }) = err.downcast_ref() {@@ -103,10 +100,6 @@ pub enum GitError {error: String,},- /// Failed to delete branch- #[error("failed to delete branch '{branch}'")]- BranchDeletionFailed { branch: String, error: String },-// -------------------------------------------------------------------------// Merge/push errors// -------------------------------------------------------------------------@@ -162,6 +155,13 @@ pub enum GitError {error: String,},+ /// Project configuration file not found+ #[error("no project configuration found")]+ ProjectConfigNotFound {+ /// Path where config file was expected+ config_path: PathBuf,+ },+/// Generic error with custom message#[error("{message}")]Other { message: String },@@ -266,13 +266,6 @@ impl GitError {format_error_block(header, error)}- GitError::BranchDeletionFailed { branch, error } => {- let header = format!(- "{ERROR_EMOJI} {ERROR}Failed to delete branch {ERROR_BOLD}{branch}{ERROR_BOLD:#}{ERROR:#}"- );- format_error_block(header, error)- }-GitError::ConflictingChanges {files,worktree_path,@@ -364,18 +357,18 @@ impl GitError {msg}+ GitError::ProjectConfigNotFound { config_path } => {+ format!(+ "{ERROR_EMOJI} {ERROR}No project configuration found{ERROR:#}\n\n{HINT_EMOJI} {HINT}Create a config file at: {HINT_BOLD}{}{HINT_BOLD:#}{HINT:#}",+ format_path_for_display(config_path)+ )+ }+GitError::ParseError { message } | GitError::Other { message } => {format!("{ERROR_EMOJI} {ERROR}{message}{ERROR:#}")}}}-- /// Convert to anyhow::Error with styled message.- ///- /// This wraps the error with its styled representation for user display.- pub fn styled_err(self) -> anyhow::Error {- anyhow::anyhow!("{}", self.styled())- }}/// Check if an error is a specific GitError variant@@ -522,16 +515,19 @@ mod tests {}#[test]- fn test_git_error_styled_err_conversion() {- // styled_err() wraps the styled message in anyhow::Error- let err = GitError::BranchAlreadyExists {+ fn test_into_preserves_type_for_styled_output() {+ // .into() preserves type so we can downcast and get styled output+ let err: anyhow::Error = GitError::BranchAlreadyExists {branch: "main".into(),}- .styled_err();- let msg = err.to_string();- assert!(msg.contains("❌")); // Should be styled- assert!(msg.contains("main"));- assert!(msg.contains("already exists"));+ .into();++ // Can downcast and get styled output+ let git_err = err.downcast_ref::<GitError>().expect("Should downcast");+ let styled = git_err.styled();+ assert!(styled.contains("❌")); // Should be styled+ assert!(styled.contains("main"));+ assert!(styled.contains("already exists"));}#[test]@@ -549,19 +545,6 @@ mod tests {}}- #[test]- fn test_styled_err_loses_type() {- // styled_err() wraps as string, cannot be pattern matched- let err = GitError::BranchAlreadyExists {- branch: "feature".into(),- }- .styled_err();- assert!(- err.downcast_ref::<GitError>().is_none(),- "styled_err() wraps as string, cannot be pattern matched"- );- }-#[test]fn test_is_git_error_helper() {let err: anyhow::Error = GitError::DetachedHead { action: None }.into();diff --git a/src/git/mod.rs b/src/git/mod.rsindex 88d2356d4..13f30bcd6 100644--- a/src/git/mod.rs+++ b/src/git/mod.rs@@ -124,7 +124,7 @@ impl WorktreeList {return Err(GitError::Other {message: "No worktrees found".into(),}- .styled_err());+ .into());}Ok(Self { worktrees })diff --git a/src/git/parse.rs b/src/git/parse.rsindex 576833e8b..7301a1450 100644--- a/src/git/parse.rs+++ b/src/git/parse.rs@@ -28,7 +28,7 @@ impl Worktree {return Err(GitError::ParseError {message: "worktree line missing path".into(),}- .styled_err());+ .into());};current = Some(Worktree {path: PathBuf::from(path),@@ -46,7 +46,7 @@ impl Worktree {return Err(GitError::ParseError {message: "HEAD line missing SHA".into(),}- .styled_err());+ .into());};wt.head = sha.to_string();}@@ -56,7 +56,7 @@ impl Worktree {return Err(GitError::ParseError {message: "branch line missing ref".into(),}- .styled_err());+ .into());};let branch = branch_ref.strip_prefix("refs/heads/")@@ -107,7 +107,7 @@ impl DefaultBranchName {return Err(GitError::ParseError {message: format!("Empty branch name from {}/HEAD", remote),}- .styled_err());+ .into());}Ok(Self(branch.to_string()))@@ -128,7 +128,7 @@ impl DefaultBranchName {GitError::ParseError {message: "Could not find symbolic ref in ls-remote output".into(),}- .styled_err()+ .into()})}diff --git a/src/git/repository/mod.rs b/src/git/repository/mod.rsindex 5ad8a22ef..764488ef7 100644--- a/src/git/repository/mod.rs+++ b/src/git/repository/mod.rs@@ -100,10 +100,12 @@ impl Repository {git_common_dir.parent().ok_or_else(|| {- GitError::Other {- message: "Invalid git directory".into(),- }- .styled_err()+ anyhow::Error::from(GitError::Other {+ message: format!(+ "Git directory has no parent: {}",+ git_common_dir.display()+ ),+ })})?.to_path_buf()};@@ -191,7 +193,7 @@ impl Repository {GitError::DetachedHead {action: Some(action.into()),}- .styled_err()+ .into()})}@@ -270,7 +272,7 @@ impl Repository {GitError::DetachedHead {action: Some("resolve '@' to current branch".into()),}- .styled_err()+ .into()}),"-" => {// Read from worktrunk.history (recorded by wt switch operations)@@ -283,7 +285,7 @@ impl Repository {"No previous branch found in history. Use 'wt list' to see available worktrees.".into(),}- .styled_err()+ .into()})}"^" => self.default_branch(),@@ -376,7 +378,7 @@ impl Repository {"Could not infer default branch. Please specify target branch explicitly or set up a remote.".into(),}- .styled_err())+ .into())}/// List all local branches.@@ -446,7 +448,7 @@ impl Repository {return Err(GitError::UncommittedChanges {action: action.map(String::from),}- .styled_err());+ .into());}Ok(())}@@ -498,7 +500,7 @@ impl Repository {GitError::ParseError {message: format!("Failed to parse commit count: {}", e),}- .styled_err()+ .into()})}@@ -523,7 +525,7 @@ impl Repository {GitError::ParseError {message: format!("Failed to parse timestamp: {}", e),}- .styled_err()+ .into()})}@@ -610,7 +612,7 @@ impl Repository {return Err(crate::git::GitError::ParseError {message: format!("Unexpected rev-list output format: {}", output),}- .styled_err());+ .into());}let behind: usize = parts[0].parse().context("Failed to parse behind count")?;@@ -785,7 +787,7 @@ impl Repository {return Err(crate::git::GitError::Other {message: "git stash create returned empty SHA - no changes to backup".into(),}- .styled_err());+ .into());}// Get current branch name to use in the ref name@@ -1042,10 +1044,9 @@ impl Repository {/// Remove a worktree at the specified path.pub fn remove_worktree(&self, path: &std::path::Path) -> anyhow::Result<()> {let path_str = path.to_str().ok_or_else(|| {- GitError::Other {- message: "Invalid UTF-8 in worktree path".into(),- }- .styled_err()+ anyhow::Error::from(GitError::Other {+ message: format!("Worktree path contains invalid UTF-8: {}", path.display()),+ })})?;self.run_command(&["worktree", "remove", path_str])?;Ok(())@@ -1156,10 +1157,12 @@ impl Repository {.file_name().and_then(|name| name.to_str()).ok_or_else(|| {- GitError::Other {- message: "Could not determine repository name".into(),- }- .styled_err()+ anyhow::Error::from(GitError::Other {+ message: format!(+ "Repository directory has no valid name: {}",+ repo_root.display()+ ),+ })})?;Ok(repo_name.to_string())diff --git a/src/llm.rs b/src/llm.rsindex 84a635a93..d5a535d0d 100644--- a/src/llm.rs+++ b/src/llm.rs@@ -121,7 +121,7 @@ fn execute_llm_command(command: &str, args: &[String], prompt: &str) -> anyhow::return Err(worktrunk::git::GitError::Other {message: "LLM returned empty message".into(),}- .styled_err());+ .into());}Ok(message)@@ -140,14 +140,13 @@ fn build_commit_prompt((None, Some(path)) => {let expanded_path = PathBuf::from(shellexpand::tilde(path).as_ref());std::fs::read_to_string(&expanded_path).map_err(|e| {- worktrunk::git::GitError::Other {+ anyhow::Error::from(worktrunk::git::GitError::Other {message: format!("Failed to read template-file '{}': {}",format_path_for_display(&expanded_path),e),- }- .styled_err()+ })})?}(None, None) => DEFAULT_TEMPLATE.to_string(),@@ -161,7 +160,7 @@ fn build_commit_prompt(return Err(worktrunk::git::GitError::Other {message: "Template is empty".into(),}- .styled_err());+ .into());}// Render template with minijinja@@ -191,14 +190,13 @@ fn build_squash_prompt((None, Some(path)) => {let expanded_path = PathBuf::from(shellexpand::tilde(path).as_ref());std::fs::read_to_string(&expanded_path).map_err(|e| {- worktrunk::git::GitError::Other {+ anyhow::Error::from(worktrunk::git::GitError::Other {message: format!("Failed to read squash-template-file '{}': {}",format_path_for_display(&expanded_path),e),- }- .styled_err()+ })})?}(None, None) => DEFAULT_SQUASH_TEMPLATE.to_string(),@@ -214,7 +212,7 @@ fn build_squash_prompt(return Err(worktrunk::git::GitError::Other {message: "Squash template is empty".into(),}- .styled_err());+ .into());}// Render template with minijinja@@ -247,7 +245,7 @@ pub fn generate_commit_message(command: format_command_display(command, args),error: e.to_string(),}- .styled_err()+ .into()});}@@ -345,7 +343,7 @@ pub fn generate_squash_message(command: format_command_display(command, args),error: e.to_string(),}- .styled_err()+ .into()});}diff --git a/src/main.rs b/src/main.rsindex 23c348382..746c82bb2 100644--- a/src/main.rs+++ b/src/main.rs@@ -303,7 +303,7 @@ fn main() {return Err(worktrunk::git::GitError::Other {message: "No shell config files found".into(),}- .styled_err());+ .into());}// Summary@@ -667,7 +667,7 @@ fn main() {return Err(worktrunk::git::GitError::Other {message: "Cannot use --force-delete with --no-delete-branch".into(),}- .styled_err());+ .into());}let repo = Repository::current();@@ -677,7 +677,7 @@ fn main() {let current_branch = repo.resolve_worktree_name("@")?;let result =handle_remove(¤t_branch, !delete_branch, force_delete, background)?;- handle_remove_output(&result, None, false, background)+ handle_remove_output(&result, None, background)} else {// When removing multiple worktrees, we need to handle the current worktree last// to avoid deleting the directory we're currently in@@ -708,14 +708,14 @@ fn main() {// Progress messages shown by handle_remove_output for all casesfor resolved in &others {let result = handle_remove(resolved, !delete_branch, force_delete, background)?;- handle_remove_output(&result, Some(resolved), false, background)?;+ handle_remove_output(&result, Some(resolved), background)?;}// Remove current worktree last (if it was in the list)if let Some(resolved) = current {let result =handle_remove(&resolved, !delete_branch, force_delete, background)?;- handle_remove_output(&result, Some(&resolved), false, background)?;+ handle_remove_output(&result, Some(&resolved), background)?;}Ok(())@@ -784,18 +784,23 @@ fn main() {// Route through output system to respect mode:// - Interactive mode: errors go to stdout// - Directive mode: errors go to stderr- //- // Multi-line errors from external commands (e.g., git output) get gutter formatting.- // We detect this by checking if context was added: e.to_string() != root_cause means- // the error was wrapped with .context(), so the root cause is raw external output.- let msg = e.to_string();- let root_cause = e.root_cause().to_string();- let has_context = msg != root_cause;- if has_context && root_cause.contains('\n') {- let _ = output::error(msg);- let _ = output::gutter(format_with_gutter(&root_cause, "", None));++ // Check if it's a typed GitError - use its styled output+ if let Some(git_err) = e.downcast_ref::<worktrunk::git::GitError>() {+ let _ = output::error(git_err.styled());} else {- let _ = output::error(msg);+ // Anyhow error - multi-line errors from external commands get gutter formatting.+ // We detect this by checking if context was added: e.to_string() != root_cause means+ // the error was wrapped with .context(), so the root cause is raw external output.+ let msg = e.to_string();+ let root_cause = e.root_cause().to_string();+ let has_context = msg != root_cause;+ if has_context && root_cause.contains('\n') {+ let _ = output::error(msg);+ let _ = output::gutter(format_with_gutter(&root_cause, "", None));+ } else {+ let _ = output::error(msg);+ }}// Preserve exit code from child processes (especially for signals like SIGINT)diff --git a/src/output/handlers.rs b/src/output/handlers.rsindex 17f87414a..5844358e4 100644--- a/src/output/handlers.rs+++ b/src/output/handlers.rs@@ -189,7 +189,6 @@ fn build_remove_command(pub fn handle_remove_output(result: &RemoveResult,branch: Option<&str>,- strict_branch_deletion: bool,background: bool,) -> anyhow::Result<()> {match result {@@ -210,19 +209,13 @@ pub fn handle_remove_output(*force_delete,target_branch.as_deref(),branch,- strict_branch_deletion,background,),RemoveResult::BranchOnly {branch_name,no_delete_branch,force_delete,- } => handle_branch_only_output(- branch_name,- *no_delete_branch,- *force_delete,- strict_branch_deletion,- ),+ } => handle_branch_only_output(branch_name, *no_delete_branch, *force_delete),}}@@ -231,7 +224,6 @@ fn handle_branch_only_output(branch_name: &str,no_delete_branch: bool,force_delete: bool,- strict_branch_deletion: bool,) -> anyhow::Result<()> {use worktrunk::styling::GRAY;@@ -283,15 +275,7 @@ fn handle_branch_only_output())?;}Err(e) => {- if strict_branch_deletion {- return Err(GitError::BranchDeletionFailed {- branch: branch_name.into(),- error: e.to_string(),- }- .styled_err());- }-- // If branch deletion fails in non-strict mode, show a warning but don't error+ // Show a warning but don't error - branch still existssuper::warning(format!("{WARNING}Could not delete branch {WARNING_BOLD}{branch_name}{WARNING_BOLD:#}{WARNING:#}"))?;@@ -316,7 +300,6 @@ fn handle_removed_worktree_output(force_delete: bool,target_branch: Option<&str>,branch: Option<&str>,- strict_branch_deletion: bool,background: bool,) -> anyhow::Result<()> {// 1. Emit cd directive if needed - shell will execute this immediately@@ -390,7 +373,7 @@ fn handle_removed_worktree_output(path: worktree_path.to_path_buf(),error: err.to_string(),}- .styled_err());+ .into());}// Delete the branch (unless --no-delete-branch was specified)@@ -423,15 +406,7 @@ fn handle_removed_worktree_output(match delete_result {Ok(_) => true,Err(e) => {- if strict_branch_deletion {- return Err(GitError::BranchDeletionFailed {- branch: branch_name.into(),- error: e.to_string(),- }- .styled_err());- }-- // If branch deletion fails in non-strict mode, show a warning but don't error+ // Show a warning but don't error - branch still existssuper::warning(format!("{WARNING}Could not delete branch {WARNING_BOLD}{branch_name}{WARNING_BOLD:#}{WARNING:#}"))?;@@ -506,18 +481,16 @@ pub(crate) fn execute_streaming(.env_remove("VERGEN_GIT_DESCRIBE").spawn().map_err(|e| {- worktrunk::git::GitError::Other {+ anyhow::Error::from(worktrunk::git::GitError::Other {message: format!("Failed to execute command: {}", e),- }- .styled_err()+ })})?;// Wait for command to completelet status = child.wait().map_err(|e| {- worktrunk::git::GitError::Other {+ anyhow::Error::from(worktrunk::git::GitError::Other {message: format!("Failed to wait for command: {}", e),- }- .styled_err()+ })})?;// Check if child was killed by a signal (Unix only)diff --git a/src/output/interactive.rs b/src/output/interactive.rsindex 3acecac42..8299da7bb 100644--- a/src/output/interactive.rs+++ b/src/output/interactive.rs@@ -2,7 +2,7 @@use std::io::{self, Write};use std::path::Path;-use worktrunk::styling::{println, stderr, stdout};+use worktrunk::styling::{ERROR, ERROR_EMOJI, eprintln, println, stderr, stdout};#[cfg(not(unix))]use super::handlers::execute_streaming;@@ -35,10 +35,20 @@ impl OutputHandler for InteractiveOutput {self.stdout.flush()}+ fn error(&mut self, message: String) -> io::Result<()> {+ // Errors go to stderr in all modes (Unix convention)+ if message.starts_with(ERROR_EMOJI) {+ eprintln!("{message}");+ } else {+ eprintln!("{ERROR_EMOJI} {ERROR}{message}{ERROR:#}");+ }+ stderr().flush()+ }+fn gutter(&mut self, content: String) -> io::Result<()> {- // Gutter content is pre-formatted with its own newlines- write!(self.stdout, "{content}")?;- self.stdout.flush()+ // Gutter content is diagnostic/informational, not data - goes to stderr+ write!(stderr(), "{content}")?;+ stderr().flush()}fn shell_integration_hint(&mut self, message: String) -> io::Result<()> {diff --git a/src/shell.rs b/src/shell.rsindex f21e22bf3..bb4e9c1ee 100644--- a/src/shell.rs+++ b/src/shell.rs@@ -7,7 +7,7 @@ fn home_dir() -> Result<PathBuf, std::io::Error> {home::home_dir().ok_or_else(|| {std::io::Error::new(std::io::ErrorKind::NotFound,- "Could not determine home directory",+ "Cannot determine home directory. Set $HOME environment variable",)})}diff --git a/tests/integration_tests/configure_shell.rs b/tests/integration_tests/configure_shell.rsindex adadffd06..49de9cb39 100644--- a/tests/integration_tests/configure_shell.rs+++ b/tests/integration_tests/configure_shell.rs@@ -264,9 +264,9 @@ fn test_configure_shell_no_files() {💡 [2mSkipped [1mbash[0m; ~/.bashrc not found[0m💡 [2mSkipped [1mzsh[0m; ~/.zshrc not found[0m💡 [2mSkipped [1mfish[0m; ~/.config/fish/conf.d not found[0m- ❌ [31mNo shell config files found[0m----- stderr -----+ ❌ [31mNo shell config files found[0m");});}diff --git a/tests/integration_tests/directives.rs b/tests/integration_tests/directives.rsindex 3885bafbb..8833d7489 100644--- a/tests/integration_tests/directives.rs+++ b/tests/integration_tests/directives.rs@@ -55,11 +55,10 @@ fn test_switch_without_internal() {success: falseexit_code: 1----- stdout ------ ❌ [31mFailed to create worktree for [1m[31mmy-feature[0m[0m- [107m [0m fatal: invalid reference: my-feature------ stderr -----+ ❌ [31mFailed to create worktree for [1m[31mmy-feature[0m[0m+ [107m [0m fatal: invalid reference: my-feature");});}diff --git a/tests/integration_tests/merge.rs b/tests/integration_tests/merge.rsindex 8573b7ed8..c6a931017 100644--- a/tests/integration_tests/merge.rs+++ b/tests/integration_tests/merge.rs@@ -667,7 +667,7 @@ fn test_merge_squash_llm_error() {repo.setup_remote("main");// Create a worktree for main- let main_wt = repo.root_path().parent().unwrap().join("test-repo.main-wt");+ let main_wt = repo.root_path().parent().unwrap().join("repo.main-wt");let mut cmd = Command::new("git");repo.configure_git_cmd(&mut cmd);cmd.args(["worktree", "add", main_wt.to_str().unwrap(), "main"])@@ -2453,13 +2453,13 @@ fn test_merge_no_commit_with_clean_tree() {exit_code: 0----- stdout -----🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)- [107m [0m * [SHA] Add feature file- [107m [0m feature.txt | 1 [32m+[m- [107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)⚪ Worktree preserved (--no-remove)----- stderr -----+ [107m [0m * [SHA] Add feature file+ [107m [0m feature.txt | 1 [32m+[m+ [107m [0m 1 file changed, 1 insertion(+)");});}@@ -2500,11 +2500,11 @@ fn test_merge_no_commit_with_dirty_tree() {success: falseexit_code: 1----- stdout -----++ ----- stderr -----❌ [31mCannot merge with --no-commit: working tree has uncommitted changes[0m💡 [2mCommit or stash them first[0m-- ----- stderr -----");});}@@ -2556,13 +2556,13 @@ fn test_merge_no_commit_no_squash_no_remove_redundant() {exit_code: 0----- stdout -----🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)- [107m [0m * [SHA] Add feature file- [107m [0m feature.txt | 1 [32m+[m- [107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)⚪ Worktree preserved (--no-remove)----- stderr -----+ [107m [0m * [SHA] Add feature file+ [107m [0m feature.txt | 1 [32m+[m+ [107m [0m 1 file changed, 1 insertion(+)");});}@@ -3526,3 +3526,100 @@ fn test_step_commit_nothing_to_commit() {],);}++// =============================================================================+// Error message snapshot tests+// =============================================================================++#[test]+fn test_merge_error_uncommitted_changes_with_no_commit() {+ // Tests the `uncommitted_changes()` error function when using --no-commit with dirty tree+ let mut repo = TestRepo::new();+ repo.commit("Initial commit");+ repo.setup_remote("main");++ // Create a worktree for main+ let main_wt = repo.root_path().parent().unwrap().join("repo.main-wt");+ let mut cmd = Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["worktree", "add", main_wt.to_str().unwrap(), "main"])+ .current_dir(repo.root_path())+ .output()+ .unwrap();++ // Create a feature worktree+ let feature_wt = repo.add_worktree("feature");++ // Make uncommitted changes (dirty working tree)+ fs::write(feature_wt.join("dirty.txt"), "uncommitted content").unwrap();++ // Try to merge with --no-commit - should fail because working tree is dirty+ snapshot_merge(+ "merge_error_uncommitted_changes_no_commit",+ &repo,+ &["main", "--no-commit", "--no-remove"],+ Some(&feature_wt),+ );+}++#[test]+fn test_merge_error_conflicting_changes_in_target() {+ // Tests the `conflicting_changes()` error function when target worktree has+ // uncommitted changes that overlap with files being pushed+ let mut repo = TestRepo::new();+ repo.commit("Initial commit");+ repo.setup_remote("main");++ // Switch primary worktree off main so we can create a worktree for main+ repo.switch_primary_to("develop");++ // Create a worktree for main+ let main_wt = repo.root_path().parent().unwrap().join("repo.main-wt");+ let mut cmd = Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ let output = cmd+ .args(["worktree", "add", main_wt.to_str().unwrap(), "main"])+ .current_dir(repo.root_path())+ .output()+ .unwrap();+ assert!(+ output.status.success(),+ "git worktree add failed: {}",+ String::from_utf8_lossy(&output.stderr)+ );++ // Create a feature worktree and commit a change to shared.txt+ let feature_wt = repo.add_worktree("feature");+ fs::write(feature_wt.join("shared.txt"), "feature content").unwrap();++ let mut cmd = Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["add", "shared.txt"])+ .current_dir(&feature_wt)+ .output()+ .unwrap();++ let mut cmd = Command::new("git");+ repo.configure_git_cmd(&mut cmd);+ cmd.args(["commit", "-m", "Add shared.txt on feature"])+ .current_dir(&feature_wt)+ .output()+ .unwrap();++ // Now make uncommitted changes to shared.txt in main worktree+ // This creates a conflict - we're trying to push changes to shared.txt+ // but main has uncommitted changes to the same file+ fs::write(+ main_wt.join("shared.txt"),+ "conflicting uncommitted content",+ )+ .unwrap();++ // Try to merge - should fail because of conflicting uncommitted changes+ snapshot_merge(+ "merge_error_conflicting_changes",+ &repo,+ &["main"],+ Some(&feature_wt),+ );+}diff --git a/tests/integration_tests/readme_sync.rs b/tests/integration_tests/readme_sync.rsindex 0c606857c..d2a0314c2 100644--- a/tests/integration_tests/readme_sync.rs+++ b/tests/integration_tests/readme_sync.rs@@ -73,6 +73,92 @@ fn strip_ansi(text: &str) -> String {ANSI_LITERAL_REGEX.replace_all(&text, "").to_string()}+/// Check if a line is gutter-formatted content (has the white background ANSI code)+fn is_gutter_line(line: &str) -> bool {+ line.starts_with("[107m") || line.starts_with("\x1b[107m")+}++/// Check if a line is a command gutter (gutter line with blue command name)+fn is_command_gutter(line: &str) -> bool {+ is_gutter_line(line) && line.contains("[34m")+}++/// Split stderr into logical chunks for interleaving with stdout+///+/// Chunks are split at command gutter boundaries and at transitions between+/// command output and regular gutter content.+fn split_stderr_chunks(stderr: &str) -> Vec<String> {+ let mut chunks = Vec::new();+ let mut current_chunk = Vec::new();+ let mut in_command_section = false;++ for line in stderr.lines() {+ if is_command_gutter(line) {+ // New command section - save previous chunk if any+ if !current_chunk.is_empty() {+ chunks.push(current_chunk.join("\n"));+ current_chunk = Vec::new();+ }+ current_chunk.push(line.to_string());+ in_command_section = true;+ } else if is_gutter_line(line) && in_command_section {+ // Non-command gutter after command section - new content section+ if !current_chunk.is_empty() {+ chunks.push(current_chunk.join("\n"));+ current_chunk = Vec::new();+ }+ current_chunk.push(line.to_string());+ in_command_section = false;+ } else {+ // Continue current chunk+ current_chunk.push(line.to_string());+ }+ }++ if !current_chunk.is_empty() {+ chunks.push(current_chunk.join("\n"));+ }++ chunks+}++/// Combine stdout and stderr by inserting stderr content after trigger lines+///+/// The pattern is:+/// - Certain stdout lines trigger stderr content (commit messages, commands, etc.)+/// - stderr is split into chunks that correspond to these triggers+/// - All stderr content is included (gutter + child process output)+fn combine_stdout_stderr(stdout: &str, stderr: &str) -> String {+ if stderr.is_empty() {+ return stdout.to_string();+ }++ let stdout_lines: Vec<&str> = stdout.lines().collect();+ let mut stderr_chunks: std::collections::VecDeque<String> = split_stderr_chunks(stderr).into();+ let mut result = Vec::new();++ for stdout_line in stdout_lines {+ result.push(stdout_line.to_string());++ // Check if this line triggers stderr content+ let triggers_stderr = stdout_line.contains("Generating")+ || stdout_line.contains("Running pre-")+ || stdout_line.contains("Running post-")+ || (stdout_line.contains("Merging") && stdout_line.contains("commit"));++ if triggers_stderr && let Some(chunk) = stderr_chunks.pop_front() {+ result.push(chunk);+ }+ }++ // Append any remaining stderr chunks (shouldn't normally happen)+ for chunk in stderr_chunks {+ result.push(chunk);+ }++ result.join("\n")+}+/// Parse content from an insta snapshot filefn parse_snapshot(path: &Path) -> Result<String, String> {let content = fs::read_to_string(path)@@ -116,8 +202,8 @@ fn parse_snapshot(path: &Path) -> Result<String, String> {String::new()};- // Use stdout if it has content, otherwise stderr- if !stdout.is_empty() { stdout } else { stderr }+ // Combine stdout and stderr by inserting gutter content after trigger lines+ combine_stdout_stderr(&stdout, &stderr)} else {content};diff --git a/tests/integration_tests/switch.rs b/tests/integration_tests/switch.rsindex c72ddb740..570f48420 100644--- a/tests/integration_tests/switch.rs+++ b/tests/integration_tests/switch.rs@@ -602,3 +602,37 @@ fn test_switch_internal_execute_with_output_before_exit() {&["--internal"],);}++// =============================================================================+// Error message snapshot tests+// =============================================================================++/// Test the `worktree_path_occupied` error when target path exists but isn't a worktree+#[test]+fn test_switch_error_path_occupied() {+ let repo = setup_switch_repo();++ // Calculate where the worktree would be created+ // Default path pattern is {repo_name}.{branch}+ let repo_name = repo.root_path().file_name().unwrap().to_str().unwrap();+ let expected_path = repo+ .root_path()+ .parent()+ .unwrap()+ .join(format!("{}.occupied-branch", repo_name));++ // Create a non-worktree directory at that path+ std::fs::create_dir_all(&expected_path).unwrap();+ std::fs::write(expected_path.join("some_file.txt"), "occupant content").unwrap();++ // Try to create a worktree with a branch that would use that path+ // Should fail with worktree_path_occupied error+ snapshot_switch(+ "switch_error_path_occupied",+ &repo,+ &["--create", "occupied-branch"],+ );++ // Cleanup+ std::fs::remove_dir_all(&expected_path).ok();+}diff --git a/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snap b/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snapindex 3f12f5677..8e0da2f92 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snap@@ -16,7 +16,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -24,9 +24,9 @@ success: trueexit_code: 0----- stdout -----🔄 [36mRunning post-create:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'approved'[0m[2m [0m[2m[36m>[0m[2m output.txt[0m✅ [32mCreated new worktree for [1m[32mtest-approved[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].test-approved[0m[0m💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m----- stderr -----+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'approved'[0m[2m [0m[2m[36m>[0m[2m output.txt[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_fails_in_non_tty.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_fails_in_non_tty.snapindex 2bd6ed8d7..2ee2bf4a1 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_fails_in_non_tty.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_fails_in_non_tty.snap@@ -16,19 +16,20 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: falseexit_code: 1----- stdout ------❌ [31mCannot prompt for approval in non-interactive environment[0m--💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0m----- stderr -----🟡 [33m[1m[33mrepo[0m[33m needs approval to execute [1m[33m1[0m[33m command:[0m⚪ post-create:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[0m++❌ [31mCannot prompt for approval in non-interactive environment[0m++💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snapindex 483996a55..e521d8821 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snap@@ -4,9 +4,6 @@ expression: combined---exit_code: 1----- stdout ------❌ [31mCannot prompt for approval in non-interactive environment[0m--💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0m----- stderr -----🟡 [33m[1m[33mrepo[0m[33m needs approval to execute [1m[33m2[0m[33m commands:[0m@@ -16,3 +13,7 @@ exit_code: 1⚪ post-create:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2m[0m++❌ [31mCannot prompt for approval in non-interactive environment[0m++💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snapindex 445742b7e..b1d77e44b 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snap@@ -4,9 +4,6 @@ expression: combined---exit_code: 1----- stdout ------❌ [31mCannot prompt for approval in non-interactive environment[0m--💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0m----- stderr -----🟡 [33m[1m[33mrepo[0m[33m needs approval to execute [1m[33m4[0m[33m commands:[0m@@ -22,3 +19,7 @@ exit_code: 1⚪ post-create:[107m [0m [2m[0m[2m[34mcd[0m[2m [REPO].test-nested-branch [0m[2m[36m&&[0m[2m [0m[2m[34mpwd[0m[2m[0m++❌ [31mCannot prompt for approval in non-interactive environment[0m++💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snapindex 50dcdf3eb..0fd6894f3 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snap@@ -4,9 +4,6 @@ expression: combined---exit_code: 1----- stdout ------❌ [31mCannot prompt for approval in non-interactive environment[0m--💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0m----- stderr -----🟡 [33m[1m[33mrepo[0m[33m needs approval to execute [1m[33m3[0m[33m commands:[0m@@ -19,3 +16,7 @@ exit_code: 1⚪ post-create [1mtest[0m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Running tests...'[0m[2m[0m++❌ [31mCannot prompt for approval in non-interactive environment[0m++💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snapindex 5bfcfca3d..7d87b3f4c 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snap@@ -4,12 +4,13 @@ expression: combined---exit_code: 1----- stdout ------❌ [31mCannot prompt for approval in non-interactive environment[0m--💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0m----- stderr -----🟡 [33m[1m[33mrepo[0m[33m needs approval to execute [1m[33m1[0m[33m command:[0m⚪ post-create:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Worktree path: [REPO].feature-test-approval'[0m[2m[0m++❌ [31mCannot prompt for approval in non-interactive environment[0m++💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snap b/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snapindex 483996a55..e521d8821 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snap@@ -4,9 +4,6 @@ expression: combined---exit_code: 1----- stdout ------❌ [31mCannot prompt for approval in non-interactive environment[0m--💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0m----- stderr -----🟡 [33m[1m[33mrepo[0m[33m needs approval to execute [1m[33m2[0m[33m commands:[0m@@ -16,3 +13,7 @@ exit_code: 1⚪ post-create:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2m[0m++❌ [31mCannot prompt for approval in non-interactive environment[0m++💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__force_bypasses_tty_check.snap b/tests/snapshots/integration__integration_tests__approval_ui__force_bypasses_tty_check.snapindex 854102707..1884a44c9 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__force_bypasses_tty_check.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__force_bypasses_tty_check.snap@@ -17,7 +17,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -25,9 +25,9 @@ success: trueexit_code: 0----- stdout -----🔄 [36mRunning post-create:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[0m✅ [32mCreated new worktree for [1m[32mtest-force-tty[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].test-force-tty[0m[0m💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m----- stderr -----+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[0m[0mtest commanddiff --git a/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_first_run.snap b/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_first_run.snapindex 4b07a882e..fdf5df4fc 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_first_run.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_first_run.snap@@ -17,7 +17,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -25,9 +25,9 @@ success: trueexit_code: 0----- stdout -----🔄 [36mRunning post-create:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m [0m[2m[36m>[0m[2m output.txt[0m✅ [32mCreated new worktree for [1m[32mtest-force[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].test-force[0m[0m💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m----- stderr -----+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m [0m[2m[36m>[0m[2m output.txt[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_second_run.snap b/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_second_run.snapindex 6d7a47c5b..60161fd42 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_second_run.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_second_run.snap@@ -4,12 +4,13 @@ expression: combined---exit_code: 1----- stdout ------❌ [31mCannot prompt for approval in non-interactive environment[0m--💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0m----- stderr -----🟡 [33m[1m[33mrepo[0m[33m needs approval to execute [1m[33m1[0m[33m command:[0m⚪ post-create:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m [0m[2m[36m>[0m[2m output.txt[0m++❌ [31mCannot prompt for approval in non-interactive environment[0m++💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__run_hook_post_merge_requires_approval.snap b/tests/snapshots/integration__integration_tests__approval_ui__run_hook_post_merge_requires_approval.snapindex 29d3d606a..ce66a8375 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__run_hook_post_merge_requires_approval.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__run_hook_post_merge_requires_approval.snap@@ -4,12 +4,13 @@ expression: combined---exit_code: 1----- stdout ------❌ [31mCannot prompt for approval in non-interactive environment[0m--💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0m----- stderr -----🟡 [33m[1m[33mrepo[0m[33m needs approval to execute [1m[33m1[0m[33m command:[0m⚪ post-merge:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Post-merge cleanup for main'[0m[2m[0m++❌ [31mCannot prompt for approval in non-interactive environment[0m++💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__run_hook_pre_merge_requires_approval.snap b/tests/snapshots/integration__integration_tests__approval_ui__run_hook_pre_merge_requires_approval.snapindex 6fd167a8a..6941121fa 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__run_hook_pre_merge_requires_approval.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__run_hook_pre_merge_requires_approval.snap@@ -4,12 +4,13 @@ expression: combined---exit_code: 1----- stdout ------❌ [31mCannot prompt for approval in non-interactive environment[0m--💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0m----- stderr -----🟡 [33m[1m[33mrepo[0m[33m needs approval to execute [1m[33m1[0m[33m command:[0m⚪ pre-merge:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Running pre-merge checks on main'[0m[2m[0m++❌ [31mCannot prompt for approval in non-interactive environment[0m++💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0mdiff --git a/tests/snapshots/integration__integration_tests__approvals__add_approvals_all_none_approved.snap b/tests/snapshots/integration__integration_tests__approvals__add_approvals_all_none_approved.snapindex c824f3412..afbb7a961 100644--- a/tests/snapshots/integration__integration_tests__approvals__add_approvals_all_none_approved.snap+++ b/tests/snapshots/integration__integration_tests__approvals__add_approvals_all_none_approved.snap@@ -17,19 +17,20 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: falseexit_code: 1----- stdout ------❌ [31mCannot prompt for approval in non-interactive environment[0m--💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0m----- stderr -----🟡 [33m[1m[33mrepo[0m[33m needs approval to execute [1m[33m1[0m[33m command:[0m⚪ post-create:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test'[0m[2m[0m++❌ [31mCannot prompt for approval in non-interactive environment[0m++💡 [2mIn CI/CD, use --force to skip prompts. To pre-approve commands, use 'wt config approvals add'[0mdiff --git a/tests/snapshots/integration__integration_tests__approvals__add_approvals_no_config.snap b/tests/snapshots/integration__integration_tests__approvals__add_approvals_no_config.snapindex f3dc8e376..b800dec35 100644--- a/tests/snapshots/integration__integration_tests__approvals__add_approvals_no_config.snap+++ b/tests/snapshots/integration__integration_tests__approvals__add_approvals_no_config.snap@@ -16,14 +16,15 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: falseexit_code: 1----- stdout ------❌ [31mNo project configuration found[0m----- stderr -----❌ [31mNo project configuration found[0m+💡 [2mCreate a config file at: [1m[2m[REPO]/.config/wt.toml[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_and_squash.snap b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_and_squash.snapindex bbf1d0391..3e4899a83 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_and_squash.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_and_squash.snap@@ -15,7 +15,8 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: true@@ -24,14 +25,14 @@ exit_code: 0🔄 [36mSquashing 2 commits & working tree changes into a single commit[0m (2 files, [32m+2[0m)...💡 [2mBackup created @ [SHA][0m🔄 [36mGenerating squash commit message...[0m-[107m [0m [1mfix: update file 1 content[0m✅ [32mSquashed @ [2m[SHA][0m🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)-[107m [0m * [SHA] fix: update file 1 content-[107m [0m file1.txt | 1 [32m+[m-[107m [0m file2.txt | 1 [32m+[m-[107m [0m 2 files changed, 2 insertions(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 2 files, [32m+2[0m)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m [1mfix: update file 1 content[0m+[107m [0m * [SHA] fix: update file 1 content+[107m [0m file1.txt | 1 [32m+[m+[107m [0m file2.txt | 1 [32m+[m+[107m [0m 2 files changed, 2 insertions(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_deterministic.snap b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_deterministic.snapindex 306bbba4e..f2716b7b4 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_deterministic.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_deterministic.snap@@ -15,7 +15,8 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: true@@ -25,16 +26,16 @@ exit_code: 0💡 [2mBackup created @ [SHA][0m🔄 [36mGenerating squash commit message...[0m💡 [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m+✅ [32mSquashed @ [2m[SHA][0m+🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)+✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)+🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m++----- stderr -----[107m [0m [1mSquash commits from main[0m[107m [0m[107m [0m Combined commits:[107m [0m - feat: initial feature-✅ [32mSquashed @ [2m[SHA][0m-🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)[107m [0m * [SHA] Squash commits from main[107m [0m feature.txt | 1 [32m+[m[107m [0m 1 file changed, 1 insertion(+)-✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)-🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_with_llm.snap b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_with_llm.snapindex 1ee9ac5ed..e2110dbf1 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_with_llm.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_with_llm.snap@@ -15,7 +15,8 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: true@@ -24,13 +25,13 @@ exit_code: 0🔄 [36mSquashing 1 commit & working tree changes into a single commit[0m (1 file, [32m+1[0m)...💡 [2mBackup created @ [SHA][0m🔄 [36mGenerating squash commit message...[0m-[107m [0m [1mfix: improve auth validation logic[0m✅ [32mSquashed @ [2m[SHA][0m🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)-[107m [0m * [SHA] fix: improve auth validation logic-[107m [0m auth.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m [1mfix: improve auth validation logic[0m+[107m [0m * [SHA] fix: improve auth validation logic+[107m [0m auth.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snap b/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snapindex c52edca1b..dee7ae897 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snap@@ -15,23 +15,24 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🟡 [33mAuto-staging 1 untracked file:[0m-[107m [0m dirty.txt🔄 [36mCommitting changes with default message...[0m (1 file, [32m+1[0m, no squashing needed)💡 [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m-[107m [0m [1mChanges to dirty.txt[0m✅ [32mCommitted changes @ [2m[SHA][0m🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)-[107m [0m * [SHA] Changes to dirty.txt-[107m [0m dirty.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m dirty.txt+[107m [0m [1mChanges to dirty.txt[0m+[107m [0m * [SHA] Changes to dirty.txt+[107m [0m dirty.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_error_conflicting_changes.snap b/tests/snapshots/integration__integration_tests__merge__merge_error_conflicting_changes.snapnew file mode 100644index 000000000..243ce50f5--- /dev/null+++ b/tests/snapshots/integration__integration_tests__merge__merge_error_conflicting_changes.snap@@ -0,0 +1,31 @@+---+source: tests/integration_tests/merge.rs+info:+ program: wt+ args:+ - merge+ - main+ env:+ CLICOLOR_FORCE: "1"+ COLUMNS: "150"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""+ LANG: C+ LC_ALL: C+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+---+success: false+exit_code: 1+----- stdout -----++----- stderr -----+❌ [31mCannot push: conflicting uncommitted changes in:[0m++[107m [0m shared.txt++💡 [2mCommit or stash these changes in [REPO].main-wt first[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_error_detached_head.snap b/tests/snapshots/integration__integration_tests__merge__merge_error_detached_head.snapindex 0d32fca47..831097d91 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_error_detached_head.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_error_detached_head.snap@@ -15,14 +15,15 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: falseexit_code: 1----- stdout -----++----- stderr -----❌ [31mCannot merge: not on a branch (detached HEAD)[0m💡 [2mSwitch to a branch first with 'git switch <branch>'[0m------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_error_uncommitted_changes_no_commit.snap b/tests/snapshots/integration__integration_tests__merge__merge_error_uncommitted_changes_no_commit.snapnew file mode 100644index 000000000..ecde15a40--- /dev/null+++ b/tests/snapshots/integration__integration_tests__merge__merge_error_uncommitted_changes_no_commit.snap@@ -0,0 +1,31 @@+---+source: tests/integration_tests/merge.rs+info:+ program: wt+ args:+ - merge+ - main+ - "--no-commit"+ - "--no-remove"+ env:+ CLICOLOR_FORCE: "1"+ COLUMNS: "150"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""+ LANG: C+ LC_ALL: C+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+---+success: false+exit_code: 1+----- stdout -----++----- stderr -----+❌ [31mCannot merge with --no-commit: working tree has uncommitted changes[0m++💡 [2mCommit or stash them first[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap b/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snapindex c7dd46d73..121a89398 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap@@ -15,17 +15,18 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_no_commit_not_fast_forward.snap b/tests/snapshots/integration__integration_tests__merge__merge_no_commit_not_fast_forward.snapindex f9cd76a10..89e3885b8 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_no_commit_not_fast_forward.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_commit_not_fast_forward.snap@@ -17,16 +17,16 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: falseexit_code: 1----- stdout -----++----- stderr -----❌ [31mCan't push to local [1m[31mmain[0m[31m branch: it has newer commits[0m[107m [0m * [SHA] Add main file💡 [2mRun 'wt merge' again to incorporate these changes[0m------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snap b/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snapindex fb6bfbb70..97a2f2b87 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snap@@ -15,23 +15,24 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🟡 [33mAuto-staging 1 untracked file:[0m-[107m [0m newfile.txt🔄 [36mCommitting changes with default message...[0m (1 file, [32m+1[0m, no squashing needed)💡 [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m-[107m [0m [1mChanges to newfile.txt[0m✅ [32mCommitted changes @ [2m[SHA][0m🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)-[107m [0m * [SHA] Changes to newfile.txt-[107m [0m newfile.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mno-commits-dirty[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m newfile.txt+[107m [0m [1mChanges to newfile.txt[0m+[107m [0m * [SHA] Changes to newfile.txt+[107m [0m newfile.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_no_remote.snap b/tests/snapshots/integration__integration_tests__merge__merge_no_remote.snapindex fe4f33011..ecacd8573 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_no_remote.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_remote.snap@@ -14,17 +14,18 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_no_squash.snap b/tests/snapshots/integration__integration_tests__merge__merge_no_squash.snapindex 4905893a8..48f3dfb7c 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_no_squash.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_squash.snap@@ -16,19 +16,20 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🔄 [36mMerging 2 commits to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)+✅ [32mMerged to [1m[32mmain[0m[0m (2 commits, 2 files, [32m+2[0m)+🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m++----- stderr -----[107m [0m * [SHA] feat: add file 2[107m [0m * [SHA] feat: add file 1[107m [0m file1.txt | 1 [32m+[m[107m [0m file2.txt | 1 [32m+[m[107m [0m 2 files changed, 2 insertions(+)-✅ [32mMerged to [1m[32mmain[0m[0m (2 commits, 2 files, [32m+2[0m)-🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m------- 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.snapindex c7dd46d73..121a89398 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@@ -15,17 +15,18 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snapindex f59d781be..bbbfba0de 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snap@@ -16,7 +16,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -24,17 +24,16 @@ success: falseexit_code: 1----- stdout -----🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m🔄 [36mRunning post-merge:[0m-[107m [0m [2m[0m[2m[34mexit[0m[2m 1[0m🟡 [33mCommand failed: exit status: 1[0m-❌ [31mpost-merge command failed: exit status: 1[0m--💡 [2mUse --no-verify to skip post-merge commands[0m----- stderr ------[0m+[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)+[107m [0m [2m[0m[2m[34mexit[0m[2m 1[0m+[0m❌ [31mpost-merge command failed: exit status: 1[0m++💡 [2mUse --no-verify to skip post-merge commands[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snapindex 0828b7534..8221376d0 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snap@@ -16,7 +16,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -24,15 +24,15 @@ success: trueexit_code: 0----- stdout -----🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m🔄 [36mRunning post-merge [1mnotify[0m:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Merge to main complete'[0m[2m [0m[2m[36m>[0m[2m notify.txt[0m🔄 [36mRunning post-merge [1mdeploy[0m:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Deploying branch feature'[0m[2m [0m[2m[36m>[0m[2m deploy.txt[0m----- stderr ------[0m[0m+[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Merge to main complete'[0m[2m [0m[2m[36m>[0m[2m notify.txt[0m+[0m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Deploying branch feature'[0m[2m [0m[2m[36m>[0m[2m deploy.txt[0m+[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_no_verify.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_no_verify.snapindex a0af1cefd..de5599e2f 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_no_verify.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_no_verify.snap@@ -17,17 +17,18 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snapindex 7ee0ed36e..5b5e9a827 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snap@@ -16,7 +16,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -24,13 +24,13 @@ success: trueexit_code: 0----- stdout -----🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m🔄 [36mRunning post-merge:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'merged feature to main'[0m[2m [0m[2m[36m>[0m[2m post-merge-ran.txt[0m----- stderr -----+[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'merged feature to main'[0m[2m [0m[2m[36m>[0m[2m post-merge-ran.txt[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_runs_from_main_branch.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_runs_from_main_branch.snapindex 013fa2259..238492c42 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_runs_from_main_branch.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_runs_from_main_branch.snap@@ -15,7 +15,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -25,7 +25,7 @@ exit_code: 0⚪ Already up to date with [1mmain[0m (no new commits, no rebase needed)⚪ Worktree preserved (on main branch)🔄 [36mRunning post-merge:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'post-merge ran from main'[0m[2m [0m[2m[36m>[0m[2m post-merge-ran.txt[0m----- stderr -----+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'post-merge ran from main'[0m[2m [0m[2m[36m>[0m[2m post-merge-ran.txt[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_runs_with_nothing_to_merge.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_runs_with_nothing_to_merge.snapindex eb3374b37..d61c82505 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_runs_with_nothing_to_merge.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_runs_with_nothing_to_merge.snap@@ -16,7 +16,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -26,7 +26,7 @@ exit_code: 0⚪ Already up to date with [1mmain[0m (no new commits, no rebase needed)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m🔄 [36mRunning post-merge:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'post-merge ran'[0m[2m [0m[2m[36m>[0m[2m post-merge-ran.txt[0m----- stderr -----+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'post-merge ran'[0m[2m [0m[2m[36m>[0m[2m post-merge-ran.txt[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snapindex 28f4c169c..b4192e1e2 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snap@@ -16,7 +16,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -24,12 +24,11 @@ success: falseexit_code: 1----- stdout -----🟡 [33mAuto-staging 1 untracked file:[0m-[107m [0m feature.txt🔄 [36mRunning pre-commit:[0m++----- stderr -----+[107m [0m feature.txt[107m [0m [2m[0m[2m[34mexit[0m[2m 1[0m-❌ [31mpre-commit command failed: exit status: 1[0m+[0m❌ [31mpre-commit command failed: exit status: 1[0m💡 [2mUse --no-verify to skip pre-commit commands[0m------- stderr ------[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snapindex 840aef8a8..716890c56 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap@@ -16,7 +16,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -24,19 +24,19 @@ success: trueexit_code: 0----- stdout -----🟡 [33mAuto-staging 1 untracked file:[0m-[107m [0m feature.txt🔄 [36mRunning pre-commit:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Pre-commit check passed'[0m[2m[0m🔄 [36mCommitting changes with default message...[0m (1 file, [32m+1[0m, no squashing needed)💡 [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m-[107m [0m [1mChanges to feature.txt[0m✅ [32mCommitted changes @ [2m[SHA][0m🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)-[107m [0m * [SHA] Changes to feature.txt-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m feature.txt+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Pre-commit check passed'[0m[2m[0m[0mPre-commit check passed+[107m [0m [1mChanges to feature.txt[0m+[107m [0m * [SHA] Changes to feature.txt+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snapindex cf3f5e087..7f515a305 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snap@@ -16,7 +16,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -24,10 +24,9 @@ success: falseexit_code: 1----- stdout -----🔄 [36mRunning pre-merge:[0m++----- stderr -----[107m [0m [2m[0m[2m[34mexit[0m[2m 1[0m-❌ [31mpre-merge command failed: exit status: 1[0m+[0m❌ [31mpre-merge command failed: exit status: 1[0m💡 [2mUse --no-verify to skip pre-merge commands[0m------- stderr ------[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snapindex 51e2dd3e9..256812169 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap@@ -16,7 +16,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -24,17 +24,16 @@ success: trueexit_code: 0----- stdout -----🔄 [36mRunning pre-merge [1mformat[0m:[0m-[107m [0m [2m[0m[2m[34mexit[0m[2m 0[0m🔄 [36mRunning pre-merge [1mlint[0m:[0m-[107m [0m [2m[0m[2m[34mexit[0m[2m 0[0m🔄 [36mRunning pre-merge [1mtest[0m:[0m-[107m [0m [2m[0m[2m[34mexit[0m[2m 0[0m🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m----- stderr ------[0m[0m[0m+[107m [0m [2m[0m[2m[34mexit[0m[2m 0[0m+[0m[107m [0m [2m[0m[2m[34mexit[0m[2m 0[0m+[0m[107m [0m [2m[0m[2m[34mexit[0m[2m 0[0m+[0m[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snapindex e6f7b1f37..f0e239890 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap@@ -16,7 +16,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -24,13 +24,12 @@ success: trueexit_code: 0----- stdout -----🔄 [36mRunning pre-merge:[0m-[107m [0m [2m[0m[2m[34mexit[0m[2m 0[0m🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m----- stderr ------[0m+[107m [0m [2m[0m[2m[34mexit[0m[2m 0[0m+[0m[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_failure.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_failure.snapindex 0e40d5899..4444c28df 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_failure.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_failure.snap@@ -16,7 +16,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -24,10 +24,9 @@ success: falseexit_code: 1----- stdout -----🔄 [36mRunning pre-commit:[0m++----- stderr -----[107m [0m [2m[0m[2m[34mexit[0m[2m 1[0m-❌ [31mpre-commit command failed: exit status: 1[0m+[0m❌ [31mpre-commit command failed: exit status: 1[0m💡 [2mUse --no-verify to skip pre-commit commands[0m------- stderr ------[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snapindex a9d6f9d62..52c31f16d 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snap@@ -16,7 +16,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -24,13 +24,13 @@ success: trueexit_code: 0----- stdout -----🔄 [36mRunning pre-commit:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Pre-commit check passed'[0m[2m[0m🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Pre-commit check passed'[0m[2m[0m[0mPre-commit check passed+[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch.snap b/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch.snapindex 50d8896d6..d86a9cf8d 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch.snap@@ -15,17 +15,18 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature-from-develop[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch_dirty.snap b/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch_dirty.snapindex b4d049df8..62487973f 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch_dirty.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch_dirty.snap@@ -15,7 +15,8 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: true@@ -24,10 +25,10 @@ exit_code: 0🔄 [36mRebasing onto [1m[36mmain[0m[36m...[0m✅ [32mRebased onto [1m[32mmain[0m[0m🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash needed)-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature-dirty-primary[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_race_condition_before_new_commit.snap b/tests/snapshots/integration__integration_tests__merge__merge_race_condition_before_new_commit.snapindex a8f28a124..eb95a78be 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_race_condition_before_new_commit.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_race_condition_before_new_commit.snap@@ -16,17 +16,18 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)⚪ Worktree preserved (--no-remove)----- stderr -----+[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_rebase_conflict.snap b/tests/snapshots/integration__integration_tests__merge__merge_rebase_conflict.snapindex e6ee121c4..1c6233951 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_rebase_conflict.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_rebase_conflict.snap@@ -15,7 +15,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -23,12 +23,11 @@ success: falseexit_code: 1----- stdout -----🔄 [36mRebasing onto [1m[36mmain[0m[36m...[0m++----- stderr -----❌ [31mRebase onto [1m[31mmain[0m[31m incomplete[0m[107m [0m Rebasing (1/1)[107m [0m error: could not apply [SHA]... Update shared.txt in feature[107m [0m Could not apply [SHA]... # Update shared.txt in feature[107m [0m Auto-merging shared.txt[107m [0m CONFLICT (content): Merge conflict in shared.txt-------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_rebase_true_rebase.snap b/tests/snapshots/integration__integration_tests__merge__merge_rebase_true_rebase.snapindex 829ce71c5..6c5ed801f 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_rebase_true_rebase.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_rebase_true_rebase.snap@@ -15,7 +15,8 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: true@@ -24,10 +25,10 @@ exit_code: 0🔄 [36mRebasing onto [1m[36mmain[0m[36m...[0m✅ [32mRebased onto [1m[32mmain[0m[0m🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash needed)-[107m [0m * [SHA] Add feature-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mtrue-rebase-test[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m * [SHA] Add feature+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snapindex 0f12f382b..f2b813283 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap@@ -15,7 +15,8 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: true@@ -24,20 +25,20 @@ exit_code: 0🔄 [36mSquashing 3 commits into a single commit[0m (3 files, [32m+3[0m)...🔄 [36mGenerating squash commit message...[0m💡 [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m+✅ [32mSquashed @ [2m[SHA][0m+🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)+✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 3 files, [32m+3[0m)+🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m++----- stderr -----[107m [0m [1mSquash commits from main[0m[107m [0m[107m [0m Combined commits:[107m [0m - feat: add file 1[107m [0m - fix: update logic[107m [0m - docs: update readme-✅ [32mSquashed @ [2m[SHA][0m-🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)[107m [0m * [SHA] Squash commits from main[107m [0m file1.txt | 1 [32m+[m[107m [0m file2.txt | 1 [32m+[m[107m [0m file3.txt | 1 [32m+[m[107m [0m 3 files changed, 3 insertions(+)-✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 3 files, [32m+3[0m)-🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_empty_changes.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_empty_changes.snapindex 3a3dab504..5348840e5 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_empty_changes.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_empty_changes.snap@@ -15,7 +15,8 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: true@@ -24,14 +25,14 @@ exit_code: 0🔄 [36mSquashing 3 commits into a single commit...[0m🔄 [36mGenerating squash commit message...[0m💡 [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m+⚪ [2mNo changes after squashing 3 commits[0m+⚪ Already up to date with [1mmain[0m (no new commits, no rebase needed)+🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m++----- stderr -----[107m [0m [1mSquash commits from main[0m[107m [0m[107m [0m Combined commits:[107m [0m - Change 1[107m [0m - Change 2[107m [0m - Revert to initial-⚪ [2mNo changes after squashing 3 commits[0m-⚪ Already up to date with [1mmain[0m (no new commits, no rebase needed)-🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_llm_error.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_llm_error.snapindex d1fac1ec5..f5bbfbd9b 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_llm_error.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_llm_error.snap@@ -15,7 +15,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -24,10 +24,10 @@ exit_code: 1----- stdout -----🔄 [36mSquashing 2 commits into a single commit[0m (2 files, [32m+2[0m)...🔄 [36mGenerating squash commit message...[0m++----- stderr -----❌ [31mCommit generation command failed[0m[107m [0m Error: connection refused⚪ Ran command:[107m [0m sh -c echo 'Error: connection refused' >&2 && exit 1------- stderr -----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.snapindex 8988c6311..0d3db0dcb 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@@ -15,7 +15,8 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_COMMIT_GENERATION__COMMAND: nonexistent-llm-commandWORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -25,18 +26,18 @@ exit_code: 0🔄 [36mSquashing 2 commits into a single commit[0m (2 files, [32m+2[0m)...🔄 [36mGenerating squash commit message...[0m💡 [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m+✅ [32mSquashed @ [2m[SHA][0m+🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)+✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 2 files, [32m+2[0m)+🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m++----- stderr -----[107m [0m [1mSquash commits from main[0m[107m [0m[107m [0m Combined commits:[107m [0m - feat: new feature[107m [0m - fix: bug fix-✅ [32mSquashed @ [2m[SHA][0m-🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)[107m [0m * [SHA] Squash commits from main[107m [0m file1.txt | 1 [32m+[m[107m [0m file2.txt | 1 [32m+[m[107m [0m 2 files changed, 2 insertions(+)-✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 2 files, [32m+2[0m)-🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m------- stderr -----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.snapindex 187df6883..e55911d7a 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@@ -15,17 +15,18 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)-[107m [0m * [SHA] feat: single commit-[107m [0m file1.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m * [SHA] feat: single commit+[107m [0m file1.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)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.snapindex 8a2c7cb61..bcc23b707 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@@ -15,7 +15,8 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: true@@ -23,13 +24,13 @@ exit_code: 0----- stdout -----🔄 [36mSquashing 2 commits into a single commit[0m (1 file, [32m+1[0m)...🔄 [36mGenerating squash commit message...[0m-[107m [0m [1mfeat: implement user authentication system[0m✅ [32mSquashed @ [2m[SHA][0m🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)-[107m [0m * [SHA] feat: implement user authentication system-[107m [0m auth.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m [1mfeat: implement user authentication system[0m+[107m [0m * [SHA] feat: implement user authentication system+[107m [0m auth.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_with_working_tree_creates_backup.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_with_working_tree_creates_backup.snapindex 9959f842a..22caa3ef3 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_with_working_tree_creates_backup.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_with_working_tree_creates_backup.snap@@ -15,7 +15,8 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_COMMIT_GENERATION__ARGS: "fix: update files"WORKTRUNK_COMMIT_GENERATION__COMMAND: echoWORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"@@ -27,18 +28,18 @@ exit_code: 0💡 [2mBackup created @ [SHA][0m🔄 [36mGenerating squash commit message...[0m💡 [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m+✅ [32mSquashed @ [2m[SHA][0m+🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)+✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 2 files, [32m+2[0m)+🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m++----- stderr -----[107m [0m [1mSquash commits from main[0m[107m [0m[107m [0m Combined commits:[107m [0m - feat: add file 1[107m [0m - feat: add file 2-✅ [32mSquashed @ [2m[SHA][0m-🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)[107m [0m * [SHA] Squash commits from main[107m [0m file1.txt | 1 [32m+[m[107m [0m file2.txt | 1 [32m+[m[107m [0m 2 files changed, 2 insertions(+)-✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 2 files, [32m+2[0m)-🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap b/tests/snapshots/integration__integration_tests__merge__merge_to_default.snapindex fe4f33011..ecacd8573 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap@@ -14,17 +14,18 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_to_non_default_target.snap b/tests/snapshots/integration__integration_tests__merge__merge_to_non_default_target.snapindex 137a7e7d2..1d8508145 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_to_non_default_target.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_to_non_default_target.snap@@ -15,7 +15,8 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: true@@ -24,10 +25,10 @@ exit_code: 0🔄 [36mRebasing onto [1m[36mstaging[0m[36m...[0m✅ [32mRebased onto [1m[32mstaging[0m[0m🔄 [36mMerging 1 commit to [1m[36mstaging[0m[36m @ [2m[SHA][0m (no commit/squash needed)-[107m [0m * [SHA] Add feature for staging-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mstaging[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature-for-staging[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m * [SHA] Add feature for staging+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_when_primary_not_on_default_but_default_has_worktree.snap b/tests/snapshots/integration__integration_tests__merge__merge_when_primary_not_on_default_but_default_has_worktree.snapindex c7dd46d73..121a89398 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_when_primary_not_on_default_but_default_has_worktree.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_when_primary_not_on_default_but_default_has_worktree.snap@@ -15,17 +15,18 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_with_caret.snap b/tests/snapshots/integration__integration_tests__merge__merge_with_caret.snapindex 3edb2d7dd..2a76adda3 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_with_caret.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_with_caret.snap@@ -15,17 +15,18 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_with_no_remove.snap b/tests/snapshots/integration__integration_tests__merge__merge_with_no_remove.snapindex a8f28a124..eb95a78be 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_with_no_remove.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_with_no_remove.snap@@ -16,17 +16,18 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)⚪ Worktree preserved (--no-remove)----- stderr -----+[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snap b/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snapindex 957afbcef..ae3705360 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snap@@ -15,7 +15,8 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_COMMIT_GENERATION__ARGS: "fix: commit changes"WORKTRUNK_COMMIT_GENERATION__COMMAND: echoWORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"@@ -24,24 +25,24 @@ success: trueexit_code: 0----- stdout -----🟡 [33mAuto-staging 2 untracked files:[0m-[107m [0m untracked1.txt-[107m [0m untracked2.txt🔄 [36mSquashing 1 commit & working tree changes into a single commit[0m (3 files, [32m+3[0m)...💡 [2mBackup created @ [SHA][0m🔄 [36mGenerating squash commit message...[0m💡 [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m+✅ [32mSquashed @ [2m[SHA][0m+🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)+✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 3 files, [32m+3[0m)+🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m++----- stderr -----+[107m [0m untracked1.txt+[107m [0m untracked2.txt[107m [0m [1mSquash commits from main[0m[107m [0m[107m [0m Combined commits:[107m [0m - feat: add file 1-✅ [32mSquashed @ [2m[SHA][0m-🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)[107m [0m * [SHA] Squash commits from main[107m [0m file1.txt | 1 [32m+[m[107m [0m untracked1.txt | 1 [32m+[m[107m [0m untracked2.txt | 1 [32m+[m[107m [0m 3 files changed, 3 insertions(+)-✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 3 files, [32m+3[0m)-🔄 [36mRemoving [1m[36mfeature[0m[36m worktree & branch in background[0m------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snapindex 77633ab8e..44cb6507e 100644--- a/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CPATH: "[PATH]"- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -26,6 +26,15 @@ exit_code: 0----- stdout -----🔄 [36mSquashing 3 commits into a single commit[0m (3 files, [32m+33[0m)...🔄 [36mGenerating squash commit message...[0m+✅ [32mSquashed @ [2m[SHA][0m+🔄 [36mRunning pre-merge [1mtest[0m:[0m+🔄 [36mRunning pre-merge [1mlint[0m:[0m+🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)+✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 3 files, [32m+33[0m)+🔄 [36mRemoving [1m[36mfeature-auth[0m[36m worktree & branch in background[0m+🔄 [36mRunning post-merge [1minstall[0m:[0m++----- stderr -----[107m [0m [1mfeat(auth): Implement JWT authentication system[0m[107m [0m[107m [0m Add comprehensive JWT token handling including validation, refresh logic,@@ -35,23 +44,7 @@ exit_code: 0[107m [0m - Implement token refresh mechanism with expiry handling[107m [0m - Add JWT encoding/decoding with signature verification[107m [0m - Create test suite covering all authentication flows-✅ [32mSquashed @ [2m[SHA][0m-🔄 [36mRunning pre-merge [1mtest[0m:[0m[107m [0m [2m[0m[2m[34mcargo[0m[2m test[0m-🔄 [36mRunning pre-merge [1mlint[0m:[0m-[107m [0m [2m[0m[2m[34mcargo[0m[2m clippy[0m-🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)-[107m [0m * [SHA] feat(auth): Implement JWT authentication system-[107m [0m auth.rs | 8 [32m++++++++[m-[107m [0m auth_test.rs | 17 [32m+++++++++++++++++[m-[107m [0m jwt.rs | 8 [32m++++++++[m-[107m [0m 3 files changed, 33 insertions(+)-✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 3 files, [32m+33[0m)-🔄 [36mRemoving [1m[36mfeature-auth[0m[36m worktree & branch in background[0m-🔄 [36mRunning post-merge [1minstall[0m:[0m-[107m [0m [2m[0m[2m[34mcargo[0m[2m install [0m[2m[36m--path[0m[2m .[0m------- stderr -----[0m Finished test [unoptimized + debuginfo] target(s) in 0.12sRunning unittests src/lib.rs (target/debug/deps/worktrunk-abc123)@@ -62,8 +55,15 @@ test auth::tests::test_token_refresh ... oktest auth::tests::test_token_validation ... oktest result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.08s+[107m [0m [2m[0m[2m[34mcargo[0m[2m clippy[0m[0m Checking worktrunk v0.1.0Finished dev [unoptimized + debuginfo] target(s) in 1.23s+[107m [0m * [SHA] feat(auth): Implement JWT authentication system+[107m [0m auth.rs | 8 [32m++++++++[m+[107m [0m auth_test.rs | 17 [32m+++++++++++++++++[m+[107m [0m jwt.rs | 8 [32m++++++++[m+[107m [0m 3 files changed, 33 insertions(+)+[107m [0m [2m[0m[2m[34mcargo[0m[2m install [0m[2m[36m--path[0m[2m .[0m[0m Installing worktrunk v0.1.0Compiling worktrunk v0.1.0Finished release [optimized] target(s) in 2.34sdiff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_post_create.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_post_create.snapindex 798dd6e00..20154d349 100644--- a/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_post_create.snap+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_post_create.snap@@ -18,7 +18,7 @@ info:LANG: CLC_ALL: CPATH: "[PATH]"- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -26,13 +26,13 @@ success: trueexit_code: 0----- stdout -----🔄 [36mRunning post-create [1minstall[0m:[0m-[107m [0m [2m[0m[2m[34muv[0m[2m sync[0m✅ [32mCreated new worktree for [1m[32mfeature-x[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature-x[0m[0m💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m🔄 [36mRunning post-start [1mdev[0m:[0m-[107m [0m [2m[0m[2m[34muv[0m[2m run dev[0m----- stderr -----+[107m [0m [2m[0m[2m[34muv[0m[2m sync[0m[0mResolved 24 packages in 145msInstalled 24 packages in 1.2s+[107m [0m [2m[0m[2m[34muv[0m[2m run dev[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_pre_merge.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_pre_merge.snapindex 4b100fb77..ae22f8506 100644--- a/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_pre_merge.snap+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_pre_merge.snap@@ -17,7 +17,7 @@ info:LANG: CLC_ALL: CPATH: "[PATH]"- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -26,24 +26,19 @@ exit_code: 0----- stdout -----🔄 [36mSquashing 3 commits into a single commit[0m (2 files, [32m+45[0m)...🔄 [36mGenerating squash commit message...[0m-[107m [0m [1mfeat(api): Add user authentication endpoints[0m-[107m [0m-[107m [0m Implement login and token refresh endpoints with JWT validation.-[107m [0m Includes comprehensive test coverage and input validation.✅ [32mSquashed @ [2m[SHA][0m🔄 [36mRunning pre-merge [1mtest[0m:[0m-[107m [0m [2m[0m[2m[34muv[0m[2m run pytest[0m🔄 [36mRunning pre-merge [1mlint[0m:[0m-[107m [0m [2m[0m[2m[34muv[0m[2m run ruff check[0m🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)-[107m [0m * [SHA] feat(api): Add user authentication endpoints-[107m [0m api/auth.py | 31 [32m+++++++++++++++++++++++++++++++[m-[107m [0m tests/test_auth.py | 14 [32m++++++++++++++[m-[107m [0m 2 files changed, 45 insertions(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 2 files, [32m+45[0m)🔄 [36mRemoving [1m[36mfeature-auth[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m [1mfeat(api): Add user authentication endpoints[0m+[107m [0m+[107m [0m Implement login and token refresh endpoints with JWT validation.+[107m [0m Includes comprehensive test coverage and input validation.+[107m [0m [2m[0m[2m[34muv[0m[2m run pytest[0m[0m============================= test session starts ==============================collected 3 items@@ -54,5 +49,11 @@ tests/test_auth.py::test_token_validation PASSED [100%]============================== 3 passed in 0.8s ===============================+[107m [0m [2m[0m[2m[34muv[0m[2m run ruff check[0m[0mAll checks passed!++[107m [0m * [SHA] feat(api): Add user authentication endpoints+[107m [0m api/auth.py | 31 [32m+++++++++++++++++++++++++++++++[m+[107m [0m tests/test_auth.py | 14 [32m++++++++++++++[m+[107m [0m 2 files changed, 45 insertions(+)diff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_simple.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_simple.snapindex a2127afd0..420e1d7b6 100644--- a/tests/snapshots/integration__integration_tests__merge__readme_example_simple.snap+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_simple.snap@@ -15,17 +15,18 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🔄 [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)-[107m [0m * [SHA] Implement JWT validation-[107m [0m auth.rs | 13 [32m+++++++++++++[m-[107m [0m 1 file changed, 13 insertions(+)✅ [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+13[0m)🔄 [36mRemoving [1m[36mfix-auth[0m[36m worktree & branch in background[0m----- stderr -----+[107m [0m * [SHA] Implement JWT validation+[107m [0m auth.rs | 13 [32m+++++++++++++[m+[107m [0m 1 file changed, 13 insertions(+)diff --git a/tests/snapshots/integration__integration_tests__merge__step_commit_both_flags.snap b/tests/snapshots/integration__integration_tests__merge__step_commit_both_flags.snapindex 3c200a9d9..d0898fed4 100644--- a/tests/snapshots/integration__integration_tests__merge__step_commit_both_flags.snap+++ b/tests/snapshots/integration__integration_tests__merge__step_commit_both_flags.snap@@ -17,7 +17,8 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_COMMIT_GENERATION__ARGS: "fix: update file"WORKTRUNK_COMMIT_GENERATION__COMMAND: echoWORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"@@ -28,7 +29,7 @@ exit_code: 0💡 [2mSkipping pre-commit hook (--no-verify)[0m🔄 [36mCommitting tracked changes with default message...[0m (1 file, [32m+1[0m, [31m-1[0m)💡 [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m-[107m [0m [1mChanges to tracked.txt[0m✅ [32mCommitted changes @ [2m[SHA][0m----- stderr -----+[107m [0m [1mChanges to tracked.txt[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__step_commit_no_verify.snap b/tests/snapshots/integration__integration_tests__merge__step_commit_no_verify.snapindex 7915be617..1e5f7c309 100644--- a/tests/snapshots/integration__integration_tests__merge__step_commit_no_verify.snap+++ b/tests/snapshots/integration__integration_tests__merge__step_commit_no_verify.snap@@ -16,7 +16,8 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_COMMIT_GENERATION__ARGS: "feat: add file"WORKTRUNK_COMMIT_GENERATION__COMMAND: echoWORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"@@ -26,11 +27,11 @@ exit_code: 0----- stdout -----💡 [2mSkipping pre-commit hook (--no-verify)[0m🟡 [33mAuto-staging 2 untracked files:[0m-[107m [0m .config/-[107m [0m file1.txt🔄 [36mCommitting changes with default message...[0m (2 files, [32m+2[0m)💡 [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m-[107m [0m [1mChanges to wt.toml & file1.txt[0m✅ [32mCommitted changes @ [2m[SHA][0m----- stderr -----+[107m [0m .config/+[107m [0m file1.txt+[107m [0m [1mChanges to wt.toml & file1.txt[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__step_commit_nothing_to_commit.snap b/tests/snapshots/integration__integration_tests__merge__step_commit_nothing_to_commit.snapindex 9d5cc380f..8a73e4822 100644--- a/tests/snapshots/integration__integration_tests__merge__step_commit_nothing_to_commit.snap+++ b/tests/snapshots/integration__integration_tests__merge__step_commit_nothing_to_commit.snap@@ -16,7 +16,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_COMMIT_GENERATION__ARGS: "feat: this should fail"WORKTRUNK_COMMIT_GENERATION__COMMAND: echo@@ -27,9 +27,9 @@ exit_code: 1----- stdout -----🔄 [36mCommitting changes with default message...[0m💡 [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m++----- stderr -----[107m [0m [1mWIP: Changes[0m❌ [31mFailed to commit[0m[107m [0m On branch main[107m [0m nothing to commit, working tree clean------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__step_commit_stage_tracked.snap b/tests/snapshots/integration__integration_tests__merge__step_commit_stage_tracked.snapindex 1c127e17d..1827abec8 100644--- a/tests/snapshots/integration__integration_tests__merge__step_commit_stage_tracked.snap+++ b/tests/snapshots/integration__integration_tests__merge__step_commit_stage_tracked.snap@@ -16,7 +16,8 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_COMMIT_GENERATION__ARGS: "fix: update tracked file"WORKTRUNK_COMMIT_GENERATION__COMMAND: echoWORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"@@ -26,7 +27,7 @@ exit_code: 0----- stdout -----🔄 [36mCommitting tracked changes with default message...[0m (1 file, [32m+1[0m, [31m-1[0m)💡 [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m-[107m [0m [1mChanges to tracked.txt[0m✅ [32mCommitted changes @ [2m[SHA][0m----- stderr -----+[107m [0m [1mChanges to tracked.txt[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__step_squash_both_flags.snap b/tests/snapshots/integration__integration_tests__merge__step_squash_both_flags.snapindex 7b308a940..580d48bf2 100644--- a/tests/snapshots/integration__integration_tests__merge__step_squash_both_flags.snap+++ b/tests/snapshots/integration__integration_tests__merge__step_squash_both_flags.snap@@ -17,7 +17,8 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_COMMIT_GENERATION__ARGS: "squash: combined commits"WORKTRUNK_COMMIT_GENERATION__COMMAND: echoWORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"@@ -30,11 +31,11 @@ exit_code: 0💡 [2mBackup created @ [SHA][0m🔄 [36mGenerating squash commit message...[0m💡 [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m+✅ [32mSquashed @ [2m[SHA][0m++----- stderr -----[107m [0m [1mSquash commits from main[0m[107m [0m[107m [0m Combined commits:[107m [0m - feat: add file 1[107m [0m - feat: add file 2-✅ [32mSquashed @ [2m[SHA][0m------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__step_squash_no_verify.snap b/tests/snapshots/integration__integration_tests__merge__step_squash_no_verify.snapindex 87b9d2416..c5ce27399 100644--- a/tests/snapshots/integration__integration_tests__merge__step_squash_no_verify.snap+++ b/tests/snapshots/integration__integration_tests__merge__step_squash_no_verify.snap@@ -16,7 +16,8 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_COMMIT_GENERATION__ARGS: "squash: combined commits"WORKTRUNK_COMMIT_GENERATION__COMMAND: echoWORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"@@ -28,11 +29,11 @@ exit_code: 0🔄 [36mSquashing 2 commits into a single commit[0m (3 files, [32m+3[0m)...🔄 [36mGenerating squash commit message...[0m💡 [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m+✅ [32mSquashed @ [2m[SHA][0m++----- stderr -----[107m [0m [1mSquash commits from main[0m[107m [0m[107m [0m Combined commits:[107m [0m - feat: add file 1[107m [0m - feat: add file 2-✅ [32mSquashed @ [2m[SHA][0m------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__step_squash_stage_tracked.snap b/tests/snapshots/integration__integration_tests__merge__step_squash_stage_tracked.snapindex 4d62f4ed9..4504a08ac 100644--- a/tests/snapshots/integration__integration_tests__merge__step_squash_stage_tracked.snap+++ b/tests/snapshots/integration__integration_tests__merge__step_squash_stage_tracked.snap@@ -16,7 +16,8 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_COMMIT_GENERATION__ARGS: "squash: combined commits"WORKTRUNK_COMMIT_GENERATION__COMMAND: echoWORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"@@ -28,11 +29,11 @@ exit_code: 0💡 [2mBackup created @ [SHA][0m🔄 [36mGenerating squash commit message...[0m💡 [2m[2mUsing fallback commit message. Run 'wt config --help' for LLM setup guide[0m[0m+✅ [32mSquashed @ [2m[SHA][0m++----- stderr -----[107m [0m [1mSquash commits from main[0m[107m [0m[107m [0m Combined commits:[107m [0m - feat: add file 1[107m [0m - feat: add file 2-✅ [32mSquashed @ [2m[SHA][0m------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap b/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snapindex 6dd9f0957..a5ca7415e 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap@@ -17,7 +17,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -25,11 +25,10 @@ success: trueexit_code: 0----- stdout -----🔄 [36mRunning post-create:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Setup done'[0m[2m [0m[2m[36m>[0m[2m setup.txt[0m✅ [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0m💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m🔄 [36mRunning post-start [1mserver[0m:[0m-[107m [0m [2m[0m[2m[34msleep[0m[2m 0.05 [0m[2m[36m&&[0m[2m [0m[2m[34mecho[0m[2m [0m[2m[32m'Server running'[0m[2m [0m[2m[36m>[0m[2m server.txt[0m----- stderr ------[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Setup done'[0m[2m [0m[2m[36m>[0m[2m setup.txt[0m+[0m[107m [0m [2m[0m[2m[34msleep[0m[2m 0.05 [0m[2m[36m&&[0m[2m [0m[2m[34mecho[0m[2m [0m[2m[32m'Server running'[0m[2m [0m[2m[36m>[0m[2m server.txt[0mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__execute_with_post_start.snap b/tests/snapshots/integration__integration_tests__post_start_commands__execute_with_post_start.snapindex 4b7a414bf..89218bb42 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__execute_with_post_start.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__execute_with_post_start.snap@@ -19,7 +19,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -28,8 +28,8 @@ exit_code: 0----- stdout -----✅ [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0m🔄 [36mRunning post-start:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Background task'[0m[2m [0m[2m[36m>[0m[2m background.txt[0m🔄 [36mExecuting (--execute):[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Execute flag'[0m[2m [0m[2m[36m>[0m[2m execute.txt[0m----- stderr -----+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Background task'[0m[2m [0m[2m[36m>[0m[2m background.txt[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Execute flag'[0m[2m [0m[2m[36m>[0m[2m execute.txt[0mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__invalid_toml.snap b/tests/snapshots/integration__integration_tests__post_start_commands__invalid_toml.snapindex 81df5e2e5..56e530504 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__invalid_toml.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__invalid_toml.snap@@ -17,18 +17,18 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: falseexit_code: 1----- stdout -----++----- stderr -----❌ [31mFailed to load project config[0m[107m [0m Failed to parse TOML: TOML parse error at line 1, column 31[107m [0m |[107m [0m 1 | post-create = [invalid syntax[107m [0m | ^[107m [0m unclosed array, expected `]`------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snapindex 68c19458a..92a95b5e3 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap@@ -17,7 +17,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -25,10 +25,10 @@ success: trueexit_code: 0----- stdout -----🔄 [36mRunning post-create:[0m-[107m [0m [2m[0m[2m[34mexit[0m[2m 1[0m🟡 [33mCommand failed: exit status: 1[0m✅ [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0m💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m----- stderr -----+[107m [0m [2m[0m[2m[34mexit[0m[2m 1[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snapindex 373de87c7..27609b84f 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snap@@ -17,7 +17,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -25,13 +25,13 @@ success: trueexit_code: 0----- stdout -----🔄 [36mRunning post-create:[0m+✅ [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0m+💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m++----- stderr -----[107m [0m [2m[0m[2m[35mif[0m[2m [ ! -f test.txt ]; [0m[2m[35mthen[0m[2m[0m[2m[0m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'File does not exist'[0m[2m [0m[2m[36m>[0m[2m result.txt[0m[107m [0m [2m[0m[2m[34melse[0m[2m[0m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'File exists'[0m[2m [0m[2m[36m>[0m[2m result.txt[0m[107m [0m [2m[0m[2m[34mfi[0m[2m[0m-✅ [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0m-💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m------- stderr -----[0mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snapindex a747877a5..e1d356234 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snap@@ -17,7 +17,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -25,12 +25,12 @@ success: trueexit_code: 0----- stdout -----🔄 [36mRunning post-create:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First'[0m[2m[0m🔄 [36mRunning post-create:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Second'[0m[2m[0m✅ [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0m💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m----- stderr -----+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First'[0m[2m[0m[0mFirst+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Second'[0m[2m[0m[0mSeconddiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snapindex 3077e2fc1..865499dc3 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap@@ -17,7 +17,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -25,12 +25,12 @@ success: trueexit_code: 0----- stdout -----🔄 [36mRunning post-create [1minstall[0m:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Installing deps'[0m[2m[0m🔄 [36mRunning post-create [1msetup[0m:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Running setup'[0m[2m[0m✅ [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0m💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m----- stderr -----+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Installing deps'[0m[2m[0m[0mInstalling deps+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Running setup'[0m[2m[0m[0mRunning setupdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snapindex 79b6fe125..9c54034ae 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snap@@ -17,7 +17,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -25,9 +25,9 @@ success: trueexit_code: 0----- stdout -----🔄 [36mRunning post-create:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Setup complete'[0m[2m[0m✅ [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0m💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m----- stderr -----+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Setup complete'[0m[2m[0m[0mSetup completediff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snapindex 5e6f12492..4bacde493 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap@@ -17,7 +17,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -25,15 +25,15 @@ success: trueexit_code: 0----- stdout -----🔄 [36mRunning post-create:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Repo: repo'[0m[2m [0m[2m[36m>[0m[2m info.txt[0m🔄 [36mRunning post-create:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Branch: feature-test'[0m[2m [0m[2m[36m>>[0m[2m info.txt[0m🔄 [36mRunning post-create:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Worktree: [REPO].feature-test'[0m[2m [0m[2m[36m>>[0m[2m info.txt[0m🔄 [36mRunning post-create:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Root: [REPO]'[0m[2m [0m[2m[36m>>[0m[2m info.txt[0m✅ [32mCreated new worktree for [1m[32mfeature/test[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature-test[0m[0m💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m----- stderr ------[0m[0m[0m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Repo: repo'[0m[2m [0m[2m[36m>[0m[2m info.txt[0m+[0m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Branch: feature-test'[0m[2m [0m[2m[36m>>[0m[2m info.txt[0m+[0m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Worktree: [REPO].feature-test'[0m[2m [0m[2m[36m>>[0m[2m info.txt[0m+[0m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Root: [REPO]'[0m[2m [0m[2m[36m>>[0m[2m info.txt[0m+[0mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snapindex 642d8abce..60aa063b3 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap@@ -17,7 +17,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -27,8 +27,8 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0m💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m🔄 [36mRunning post-start:[0m++----- stderr -----[107m [0m [2m[0m[2m[34mecho[0m[2m 'line1[0m[107m [0m [2m[0m[2m[34mline2[0m[2m[0m[107m [0m [2m[0m[2m[34mline3[0m[2m' | grep line2 > filtered.txt[0m------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snapindex c035106cc..33e40fed1 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap@@ -17,7 +17,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -27,6 +27,6 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0m💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m🔄 [36mRunning post-start:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'POST-START-RAN'[0m[2m [0m[2m[36m>[0m[2m post_start_marker.txt[0m----- stderr -----+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'POST-START-RAN'[0m[2m [0m[2m[36m>[0m[2m post_start_marker.txt[0mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snapindex 0832a5f83..847a3dda3 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap@@ -17,7 +17,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -27,6 +27,6 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0m💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m🔄 [36mRunning post-start:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m 'unclosed quote[0m----- stderr -----+[107m [0m [2m[0m[2m[34mecho[0m[2m 'unclosed quote[0mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snapindex 8329c3ee5..ce558b57c 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap@@ -17,7 +17,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -27,6 +27,6 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0m💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m🔄 [36mRunning post-start:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'stdout output'[0m[2m [0m[2m[36m&&[0m[2m [0m[2m[34mecho[0m[2m [0m[2m[32m'stderr output'[0m[2m >&2[0m----- stderr -----+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'stdout output'[0m[2m [0m[2m[36m&&[0m[2m [0m[2m[34mecho[0m[2m [0m[2m[32m'stderr output'[0m[2m >&2[0mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snapindex 1589d8b07..b2ca9dc73 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap@@ -17,7 +17,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -27,8 +27,8 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0m💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m🔄 [36mRunning post-start:[0m++----- stderr -----[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'first line'[0m[2m [0m[2m[36m>[0m[2m multiline.txt[0m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'second line'[0m[2m [0m[2m[36m>>[0m[2m multiline.txt[0m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'third line'[0m[2m [0m[2m[36m>>[0m[2m multiline.txt[0m------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snapindex caf9382ca..6a3e6faa0 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap@@ -17,7 +17,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -27,8 +27,8 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0m💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m🔄 [36mRunning post-start [1mtask1[0m:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Task 1 running'[0m[2m [0m[2m[36m>[0m[2m task1.txt[0m🔄 [36mRunning post-start [1mtask2[0m:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Task 2 running'[0m[2m [0m[2m[36m>[0m[2m task2.txt[0m----- stderr -----+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Task 1 running'[0m[2m [0m[2m[36m>[0m[2m task1.txt[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Task 2 running'[0m[2m [0m[2m[36m>[0m[2m task2.txt[0mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snapindex 9f07e3433..f19214e14 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap@@ -17,7 +17,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -27,10 +27,10 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0m💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m🔄 [36mRunning post-start [1mtask1[0m:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'TASK1_OUTPUT'[0m[2m[0m🔄 [36mRunning post-start [1mtask2[0m:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'TASK2_OUTPUT'[0m[2m[0m🔄 [36mRunning post-start [1mtask3[0m:[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'TASK3_OUTPUT'[0m[2m[0m----- stderr -----+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'TASK1_OUTPUT'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'TASK2_OUTPUT'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'TASK3_OUTPUT'[0m[2m[0mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snapindex f21dd84b9..51c25e824 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap@@ -17,7 +17,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -27,6 +27,6 @@ exit_code: 0✅ [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0m💡 [2m[2mRun `wt config shell install` to enable automatic cd[0m[0m🔄 [36mRunning post-start:[0m-[107m [0m [2m[0m[2m[34msleep[0m[2m 0.1 [0m[2m[36m&&[0m[2m [0m[2m[34mecho[0m[2m [0m[2m[32m'Background task done'[0m[2m [0m[2m[36m>[0m[2m background.txt[0m----- stderr -----+[107m [0m [2m[0m[2m[34msleep[0m[2m 0.1 [0m[2m[36m&&[0m[2m [0m[2m[34mecho[0m[2m [0m[2m[32m'Background task done'[0m[2m [0m[2m[36m>[0m[2m background.txt[0mdiff --git a/tests/snapshots/integration__integration_tests__push__push_dirty_target_autostash.snap b/tests/snapshots/integration__integration_tests__push__push_dirty_target_autostash.snapindex a8eda5eca..6f27f6889 100644--- a/tests/snapshots/integration__integration_tests__push__push_dirty_target_autostash.snap+++ b/tests/snapshots/integration__integration_tests__push__push_dirty_target_autostash.snap@@ -16,7 +16,8 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: true@@ -24,10 +25,10 @@ exit_code: 0----- stdout -----🔄 [36mStashing changes in [1m[36m[REPO][0m[36m...[0m🔄 [36mPushing 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)🔄 [36mRestoring stashed changes in [1m[36m[REPO][0m[36m...[0m✅ [32mPushed to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)----- stderr -----+[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__push__push_dirty_target_overlap.snap b/tests/snapshots/integration__integration_tests__push__push_dirty_target_overlap.snapindex 46dfe315f..8bfdc6cf3 100644--- a/tests/snapshots/integration__integration_tests__push__push_dirty_target_overlap.snap+++ b/tests/snapshots/integration__integration_tests__push__push_dirty_target_overlap.snap@@ -16,16 +16,17 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: falseexit_code: 1----- stdout -----++----- stderr -----❌ [31mCannot push: conflicting uncommitted changes in:[0m[107m [0m conflict.txt💡 [2mCommit or stash these changes in [REPO] first[0m------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__push__push_error_not_fast_forward.snap b/tests/snapshots/integration__integration_tests__push__push_error_not_fast_forward.snapindex 70aa42b8e..ae8fcb24f 100644--- a/tests/snapshots/integration__integration_tests__push__push_error_not_fast_forward.snap+++ b/tests/snapshots/integration__integration_tests__push__push_error_not_fast_forward.snap@@ -16,16 +16,16 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: falseexit_code: 1----- stdout -----++----- stderr -----❌ [31mCan't push to local [1m[31mmain[0m[31m branch: it has newer commits[0m[107m [0m * [SHA] Main commit💡 [2mUse 'wt step rebase' or 'wt merge' to rebase onto main[0m------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__push__push_error_with_merge_commits.snap b/tests/snapshots/integration__integration_tests__push__push_error_with_merge_commits.snapindex 3cacc93a3..05f22d18e 100644--- a/tests/snapshots/integration__integration_tests__push__push_error_with_merge_commits.snap+++ b/tests/snapshots/integration__integration_tests__push__push_error_with_merge_commits.snap@@ -16,14 +16,15 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: falseexit_code: 1----- stdout -----++----- stderr -----❌ [31mFound merge commits in push range[0m💡 [2mUse --allow-merge-commits to push non-linear history[0m------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__push__push_fast_forward.snap b/tests/snapshots/integration__integration_tests__push__push_fast_forward.snapindex 3da685fa6..e943f8a66 100644--- a/tests/snapshots/integration__integration_tests__push__push_fast_forward.snap+++ b/tests/snapshots/integration__integration_tests__push__push_fast_forward.snap@@ -16,16 +16,17 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🔄 [36mPushing 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m-[107m [0m * [SHA] Add test file-[107m [0m test.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mPushed to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)----- stderr -----+[107m [0m * [SHA] Add test file+[107m [0m test.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__push__push_no_remote.snap b/tests/snapshots/integration__integration_tests__push__push_no_remote.snapindex ba56952f1..f86400927 100644--- a/tests/snapshots/integration__integration_tests__push__push_no_remote.snap+++ b/tests/snapshots/integration__integration_tests__push__push_no_remote.snap@@ -15,16 +15,17 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🔄 [36mPushing 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mPushed to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)----- stderr -----+[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)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.snapindex 1c3a50c1e..059163a91 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@@ -16,16 +16,17 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🔄 [36mPushing 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mPushed to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)----- stderr -----+[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__push__push_to_default.snap b/tests/snapshots/integration__integration_tests__push__push_to_default.snapindex ba56952f1..f86400927 100644--- a/tests/snapshots/integration__integration_tests__push__push_to_default.snap+++ b/tests/snapshots/integration__integration_tests__push__push_to_default.snap@@ -15,16 +15,17 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🔄 [36mPushing 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m-[107m [0m * [SHA] Add feature file-[107m [0m feature.txt | 1 [32m+[m-[107m [0m 1 file changed, 1 insertion(+)✅ [32mPushed to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)----- stderr -----+[107m [0m * [SHA] Add feature file+[107m [0m feature.txt | 1 [32m+[m+[107m [0m 1 file changed, 1 insertion(+)diff --git a/tests/snapshots/integration__integration_tests__push__push_with_merge_commits_allowed.snap b/tests/snapshots/integration__integration_tests__push__push_with_merge_commits_allowed.snapindex dcc8bc512..7b4cdb9a2 100644--- a/tests/snapshots/integration__integration_tests__push__push_with_merge_commits_allowed.snap+++ b/tests/snapshots/integration__integration_tests__push__push_with_merge_commits_allowed.snap@@ -17,13 +17,17 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: trueexit_code: 0----- stdout -----🔄 [36mPushing 3 commits to [1m[36mmain[0m[36m @ [2m[SHA][0m (merge commits allowed)+✅ [32mPushed to [1m[32mmain[0m[0m (3 commits, 2 files, [32m+2[0m)++----- stderr -----[107m [0m * [SHA] Merge temp[107m [0m [31m|[m[32m/[m[107m [0m [31m|[m * [SHA] Commit 2@@ -32,6 +36,3 @@ exit_code: 0[107m [0m file1.txt | 1 [32m+[m[107m [0m file2.txt | 1 [32m+[m[107m [0m 2 files changed, 2 insertions(+)-✅ [32mPushed to [1m[32mmain[0m[0m (3 commits, 2 files, [32m+2[0m)------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__remove__remove_branch_only_unmerged.snap b/tests/snapshots/integration__integration_tests__remove__remove_branch_only_unmerged.snapindex d0db604a5..2eccdc2cc 100644--- a/tests/snapshots/integration__integration_tests__remove__remove_branch_only_unmerged.snap+++ b/tests/snapshots/integration__integration_tests__remove__remove_branch_only_unmerged.snap@@ -15,7 +15,7 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -24,6 +24,6 @@ exit_code: 0----- stdout -----⚪ [90mNo worktree found for branch feature-unmerged[0m🟡 [33mCould not delete branch [1m[33mfeature-unmerged[0m[0m-[107m [0m error: the branch 'feature-unmerged' is not fully merged----- stderr -----+[107m [0m error: the branch 'feature-unmerged' is not fully mergeddiff --git a/tests/snapshots/integration__integration_tests__remove__remove_by_name_dirty_target.snap b/tests/snapshots/integration__integration_tests__remove__remove_by_name_dirty_target.snapindex 6215d97f8..04982ecc4 100644--- a/tests/snapshots/integration__integration_tests__remove__remove_by_name_dirty_target.snap+++ b/tests/snapshots/integration__integration_tests__remove__remove_by_name_dirty_target.snap@@ -15,14 +15,15 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: falseexit_code: 1----- stdout -----++----- stderr -----❌ [31mCannot remove worktree: working tree has uncommitted changes[0m💡 [2mCommit or stash them first[0m------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__remove__remove_dirty_working_tree.snap b/tests/snapshots/integration__integration_tests__remove__remove_dirty_working_tree.snapindex 6dbfa7bda..e62325adf 100644--- a/tests/snapshots/integration__integration_tests__remove__remove_dirty_working_tree.snap+++ b/tests/snapshots/integration__integration_tests__remove__remove_dirty_working_tree.snap@@ -14,14 +14,15 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: falseexit_code: 1----- stdout -----++----- stderr -----❌ [31mCannot remove worktree: working tree has uncommitted changes[0m💡 [2mCommit or stash them first[0m------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__remove__remove_nonexistent_worktree.snap b/tests/snapshots/integration__integration_tests__remove__remove_nonexistent_worktree.snapindex 166daa8b3..f66f84d2a 100644--- a/tests/snapshots/integration__integration_tests__remove__remove_nonexistent_worktree.snap+++ b/tests/snapshots/integration__integration_tests__remove__remove_nonexistent_worktree.snap@@ -15,12 +15,13 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: falseexit_code: 1----- stdout ------❌ [31mNo worktree found for branch [1m[31mnonexistent[0m[0m----- stderr -----+❌ [31mNo worktree found for branch [1m[31mnonexistent[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_create_existing_error.snap b/tests/snapshots/integration__integration_tests__switch__switch_create_existing_error.snapindex 11e107c80..9cf45fabb 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_create_existing_error.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_create_existing_error.snap@@ -14,16 +14,18 @@ info:GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/nullGIT_EDITOR: ""+ HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: falseexit_code: 1----- stdout -----++----- stderr -----❌ [31mBranch [1m[31mfeature-y[0m[31m already exists[0m💡 [2mRemove --create flag to switch to it[0m------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__switch__switch_error_missing_directory.snap b/tests/snapshots/integration__integration_tests__switch__switch_error_missing_directory.snapindex 50dc5e4da..f9482b5c1 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_error_missing_directory.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_error_missing_directory.snap@@ -13,16 +13,18 @@ info:GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/nullGIT_EDITOR: ""+ HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: falseexit_code: 1----- stdout -----++----- stderr -----❌ [31mWorktree directory missing for [1m[31mmissing-wt[0m[0m💡 [2mRun 'git worktree prune' to clean up[0m------- stderr -----diff --git a/tests/snapshots/integration__integration_tests__switch__switch_error_path_occupied.snap b/tests/snapshots/integration__integration_tests__switch__switch_error_path_occupied.snapnew file mode 100644index 000000000..15af8da73--- /dev/null+++ b/tests/snapshots/integration__integration_tests__switch__switch_error_path_occupied.snap@@ -0,0 +1,31 @@+---+source: tests/integration_tests/switch.rs+info:+ program: wt+ args:+ - switch+ - "--create"+ - occupied-branch+ env:+ CLICOLOR_FORCE: "1"+ COLUMNS: "150"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+---+success: false+exit_code: 1+----- stdout -----++----- stderr -----+❌ [31mCannot create worktree for [1m[31moccupied-branch[0m[31m: target path already exists[0m++💡 [2mReuse the existing worktree at [REPO]/../repo.occupied-branch or remove it before retrying[0mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_execute_creates_file.snap b/tests/snapshots/integration__integration_tests__switch__switch_execute_creates_file.snapindex fd826da07..5363d0e21 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_execute_creates_file.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_execute_creates_file.snap@@ -19,7 +19,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -28,6 +28,6 @@ exit_code: 0----- stdout -----✅ [32mCreated new worktree for [1m[32mfile-test[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].file-test[0m[0m🔄 [36mExecuting (--execute):[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test content'[0m[2m [0m[2m[36m>[0m[2m test.txt[0m----- stderr -----+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test content'[0m[2m [0m[2m[36m>[0m[2m test.txt[0mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_execute_existing.snap b/tests/snapshots/integration__integration_tests__switch__switch_execute_existing.snapindex fcd0bcb5e..7d1113890 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_execute_existing.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_execute_existing.snap@@ -18,7 +18,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -27,6 +27,6 @@ exit_code: 0----- stdout -----✅ [32mSwitched to worktree for [1m[32mexisting-exec[0m[32m at [1m[32m[REPO].existing-exec[0m[0m🔄 [36mExecuting (--execute):[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'existing worktree'[0m[2m [0m[2m[36m>[0m[2m existing.txt[0m----- stderr -----+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'existing worktree'[0m[2m [0m[2m[36m>[0m[2m existing.txt[0mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_execute_failure.snap b/tests/snapshots/integration__integration_tests__switch__switch_execute_failure.snapindex f61d03668..f8872a706 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_execute_failure.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_execute_failure.snap@@ -19,7 +19,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -28,6 +28,6 @@ exit_code: 1----- stdout -----✅ [32mCreated new worktree for [1m[32mfail-test[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].fail-test[0m[0m🔄 [36mExecuting (--execute):[0m-[107m [0m [2m[0m[2m[34mexit[0m[2m 1[0m----- stderr -----+[107m [0m [2m[0m[2m[34mexit[0m[2m 1[0mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_execute_multiline.snap b/tests/snapshots/integration__integration_tests__switch__switch_execute_multiline.snapindex bbac93bae..81db844b7 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_execute_multiline.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_execute_multiline.snap@@ -19,7 +19,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -28,11 +28,11 @@ exit_code: 0----- stdout -----✅ [32mCreated new worktree for [1m[32mmultiline-test[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].multiline-test[0m[0m🔄 [36mExecuting (--execute):[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'line1'[0m[2m[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'line2'[0m[2m[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'line3'[0m[2m[0mline1line2line3----- stderr -----+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'line1'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'line2'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'line3'[0m[2m[0mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_execute_success.snap b/tests/snapshots/integration__integration_tests__switch__switch_execute_success.snapindex 0c6d25aaa..f3af2a7a4 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_execute_success.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_execute_success.snap@@ -19,7 +19,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---@@ -28,7 +28,7 @@ exit_code: 0----- stdout -----✅ [32mCreated new worktree for [1m[32mexec-test[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].exec-test[0m[0m🔄 [36mExecuting (--execute):[0m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test output'[0m[2m[0mtest output----- stderr -----+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test output'[0m[2m[0mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_no_history.snap b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_no_history.snapindex c29a6fac7..6f8bd9c24 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_no_history.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_no_history.snap@@ -13,14 +13,16 @@ info:GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/nullGIT_EDITOR: ""+ HOME: "[TEST_HOME]"LANG: CLC_ALL: C- SOURCE_DATE_EPOCH: "1761609600"+ SOURCE_DATE_EPOCH: "1735776000"+ WORKTRUNK_BIN: ""WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"---success: falseexit_code: 1----- stdout ------❌ [31mNo previous branch found in history. Use 'wt list' to see available worktrees.[0m----- stderr -----+❌ [31mNo previous branch found in history. Use 'wt list' to see available worktrees.[0m