Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
refactor: simplify test normalization by using insta filters (#672)
Maximilian Roosffe2d41b424a
diff --git a/tests/common/mod.rs b/tests/common/mod.rsindex 86b5fc704..aadc2d098 100644--- a/tests/common/mod.rs+++ b/tests/common/mod.rs@@ -2358,13 +2358,11 @@ pub fn setup_temp_snapshot_settings(temp_path: &std::path::Path) -> insta::Setti/// Add filters for PTY-specific artifacts that vary between platforms.////// This handles:-/// - CRLF line endings (PTYs use \r\n)/// - macOS PTY control sequences (^D followed by backspaces)/// - Leading ANSI reset codes that vary between macOS and Linux+///+/// Note: CRLF normalization is done eagerly in PTY exec functions, not here.pub fn add_pty_filters(settings: &mut insta::Settings) {- // PTYs use \r\n line endings, normalize to \n- settings.add_filter(r"\r\n", "\n");-// macOS PTYs emit ^D (literal caret-D) followed by backspaces (0x08)// when EOF is signaled. Linux PTYs don't. Strip these for consistency.settings.add_filter(r"\^D\x08+", "");@@ -2375,36 +2373,6 @@ pub fn add_pty_filters(settings: &mut insta::Settings) {settings.add_filter(r"(?m)^\x1b\[0m", "");}-/// Add filters for temporary directory paths in PTY output.-///-/// PTY tests create temp directories that appear in output. These paths vary-/// per test run and need normalization.-///-/// # Arguments-/// * `settings` - The insta Settings to add filters to-/// * `placeholder` - The placeholder text to use (e.g., "[TMPDIR]", "_REPO_")-pub fn add_pty_tmpdir_filters(settings: &mut insta::Settings, placeholder: &str) {- // macOS temp paths: /private/var/folders/.../T/.tmpXXX or /var/folders/.../T/.tmpXXX- settings.add_filter(- r"(?:/private)?/var/folders/[^/]+/[^/]+/T/\.tmp[^\s/'\x1b\)]+",- placeholder,- );-- // Linux temp paths: /tmp/.tmpXXX- settings.add_filter(r"/tmp/\.tmp[^\s/'\x1b\)]+", placeholder);-- // Fish shell temp paths: /tmp/.psubXXX (process substitution)- settings.add_filter(r"/tmp/\.psub[^\s/'\x1b\)]+", placeholder);-- // Collapse duplicate placeholders that can appear with nested mktemp paths.- // e.g., [TMPDIR]/[TMPDIR]/foo -> [TMPDIR]/foo- let collapse_pattern = format!(- r"\[{0}](?:/?\[{0}])+",- regex::escape(placeholder.trim_matches(|c| c == '[' || c == ']'))- );- settings.add_filter(&collapse_pattern, placeholder);-}-/// Add filters for binary paths (target/debug/wt) in PTY output.////// Test binaries are run from the cargo target directory, which varies.diff --git a/tests/common/shell.rs b/tests/common/shell.rsindex 18eecf29b..eb18a236d 100644--- a/tests/common/shell.rs+++ b/tests/common/shell.rs@@ -130,7 +130,8 @@ pub fn execute_shell_script(repo: &TestRepo, shell: &str, script: &str) -> Strin);}- buf+ // Normalize CRLF to LF (PTYs use CRLF on some platforms)+ buf.replace("\r\n", "\n")}/// Generate `wt config shell init <shell>` output for the repo.diff --git a/tests/integration_tests/approval_pty.rs b/tests/integration_tests/approval_pty.rsindex 47b7984c5..a86c86b10 100644--- a/tests/integration_tests/approval_pty.rs+++ b/tests/integration_tests/approval_pty.rs@@ -62,7 +62,10 @@ fn exec_in_pty_with_input(let exit_status = child.wait().unwrap();let exit_code = exit_status.exit_code() as i32;- (buf, exit_code)+ // Normalize CRLF to LF (PTYs use CRLF on some platforms)+ let normalized = buf.replace("\r\n", "\n");++ (normalized, exit_code)}/// Create insta settings for approval PTY tests.diff --git a/tests/integration_tests/config_state.rs b/tests/integration_tests/config_state.rsindex 8393f15fb..a133b1aac 100644--- a/tests/integration_tests/config_state.rs+++ b/tests/integration_tests/config_state.rs@@ -1,15 +1,14 @@use crate::common::{TEST_EPOCH, TestRepo, repo, wt_command};use insta::assert_snapshot;-use regex::Regex;use rstest::rstest;use std::process::Command;-/// Normalize LOG FILES path in output for stable snapshots (temp dir varies per test)-fn normalize_log_path(output: &str) -> String {- // Match "LOG FILES" followed by ANSI codes, spaces, and "@ " then the path- // Pattern: LOG FILES + optional ANSI reset + spaces + @ + path until newline- let re = Regex::new(r"(LOG FILES\x1b\[39m\s+@ )[^\n]+").unwrap();- re.replace_all(output, "${1}<PATH>").to_string()+/// Settings for `wt config state get` snapshots (normalizes log paths)+fn state_get_settings() -> insta::Settings {+ let mut settings = insta::Settings::clone_current();+ // LOG FILES path varies per test (temp dir), normalize for stable snapshots+ settings.add_filter(r"(LOG FILES\x1b\[39m\s+@ )[^\n]+", "${1}<PATH>");+ settings}/// Write CI status to the file-based cache at .git/wt-cache/ci-status/<branch>.json@@ -652,7 +651,8 @@ fn test_state_clear_all_nothing_to_clear(repo: TestRepo) {fn test_state_get_empty(repo: TestRepo) {let output = wt_state_get_cmd(&repo).output().unwrap();assert!(output.status.success());- assert_snapshot!(normalize_log_path(&String::from_utf8_lossy(&output.stderr)), @"+ state_get_settings().bind(|| {+ assert_snapshot!(String::from_utf8_lossy(&output.stderr), @"[36mDEFAULT BRANCH[39m[107m [0m main@@ -671,6 +671,7 @@ fn test_state_get_empty(repo: TestRepo) {[36mLOG FILES[39m @ <PATH>[107m [0m (none)");+ });}#[rstest]@@ -700,7 +701,9 @@ fn test_state_get_with_ci_entries(repo: TestRepo) {let output = wt_state_get_cmd(&repo).output().unwrap();assert!(output.status.success());- assert_snapshot!(normalize_log_path(&String::from_utf8_lossy(&output.stderr)));+ state_get_settings().bind(|| {+ assert_snapshot!(String::from_utf8_lossy(&output.stderr));+ });}#[rstest]@@ -747,7 +750,9 @@ fn test_state_get_comprehensive(repo: TestRepo) {let output = wt_state_get_cmd(&repo).output().unwrap();assert!(output.status.success());- assert_snapshot!(normalize_log_path(&String::from_utf8_lossy(&output.stderr)));+ state_get_settings().bind(|| {+ assert_snapshot!(String::from_utf8_lossy(&output.stderr));+ });}#[rstest]diff --git a/tests/integration_tests/configure_shell.rs b/tests/integration_tests/configure_shell.rsindex 1764ffcdf..6394b2788 100644--- a/tests/integration_tests/configure_shell.rs+++ b/tests/integration_tests/configure_shell.rs@@ -1532,7 +1532,9 @@ fn test_uninstall_shell_dry_run_multiple(repo: TestRepo, temp_home: TempDir) {// PTY-based tests for interactive install preview#[cfg(all(unix, feature = "shell-integration-tests"))]mod pty_tests {- use crate::common::{TestRepo, configure_pty_command, open_pty, repo, temp_home};+ use crate::common::{+ TestRepo, add_pty_filters, configure_pty_command, open_pty, repo, temp_home,+ };use insta::assert_snapshot;use insta_cmd::get_cargo_bin;use portable_pty::CommandBuilder;@@ -1580,42 +1582,33 @@ mod pty_tests {let exit_status = child.wait().unwrap();let exit_code = exit_status.exit_code() as i32;- (buf, exit_code)+ // Normalize CRLF to LF (PTYs use CRLF on some platforms)+ let normalized = buf.replace("\r\n", "\n");++ (normalized, exit_code)}- /// Normalize output for snapshot testing- fn normalize_output(output: &str, temp_home: &TempDir) -> String {- // PTYs use \r\n line endings, normalize to \n- let output = output.replace("\r\n", "\n");+ /// Create insta settings for install PTY tests.+ fn install_pty_settings(temp_home: &TempDir) -> insta::Settings {+ let mut settings = insta::Settings::clone_current();- // Remove ^D control sequence that appears on macOS- let output = regex::Regex::new(r"\^D\x08+")- .unwrap()- .replace_all(&output, "");+ // Add PTY filters (CRLF, ^D, leading ANSI resets)+ add_pty_filters(&mut settings);// Remove echoed user input at end of prompt line (PTY echo timing varies).- // The prompt ends with [y/N/?][22m and then the echoed input appears.- // Normalize to just the prompt without echoed input.- let output = regex::Regex::new(r"(\[y/N/\?\]\x1b\[22m) [yn]")- .unwrap()- .replace_all(&output, "$1 ");+ // The prompt ends with [y/N/?][22m and then the echoed input appears.+ settings.add_filter(r"(\[y/N/\?\]\x1b\[22m) [yn]", "$1 ");// Remove standalone echoed input lines (just y or n on their own line)- // that appear due to PTY timing differences- let output = regex::Regex::new(r"^[yn]\n").unwrap().replace(&output, "");-- // Normalize blank lines caused by PTY echo timing variations.- // The newline from user input can appear at different positions relative- // to the prompt text depending on the system. Collapse consecutive newlines- // to a single newline, then strip any leading newline.- let output = regex::Regex::new(r"\n{2,}")- .unwrap()- .replace_all(&output, "\n");- let output = output.trim_start_matches('\n');+ settings.add_filter(r"^[yn]\n", "");++ // Collapse consecutive newlines (PTY timing variations)+ settings.add_filter(r"\n{2,}", "\n");// Replace temp home path with ~/- let home_path = temp_home.path().to_string_lossy();- output.replace(&*home_path, "~").to_string()+ settings.add_filter(®ex::escape(&temp_home.path().to_string_lossy()), "~");++ settings}/// Test that `wt config shell install` shows preview with gutter-formatted config lines@@ -1626,10 +1619,11 @@ mod pty_tests {fs::write(&zshrc_path, "# Existing config\n").unwrap();let (output, exit_code) = exec_install_in_pty(&temp_home, &repo, "y\n");- let normalized = normalize_output(&output, &temp_home);assert_eq!(exit_code, 0);- assert_snapshot!(normalized);+ install_pty_settings(&temp_home).bind(|| {+ assert_snapshot!(output.trim_start_matches('\n'));+ });}/// Test that declining install shows preview but doesn't modify files@@ -1639,11 +1633,12 @@ mod pty_tests {fs::write(&zshrc_path, "# Existing config\n").unwrap();let (output, exit_code) = exec_install_in_pty(&temp_home, &repo, "n\n");- let normalized = normalize_output(&output, &temp_home);// User declined, so exit code is 1assert_eq!(exit_code, 1);- assert_snapshot!(normalized);+ install_pty_settings(&temp_home).bind(|| {+ assert_snapshot!(output.trim_start_matches('\n'));+ });// Verify file was not modifiedlet content = fs::read_to_string(&zshrc_path).unwrap();diff --git a/tests/integration_tests/shell_integration_prompt.rs b/tests/integration_tests/shell_integration_prompt.rsindex 4a0d66278..12e80375d 100644--- a/tests/integration_tests/shell_integration_prompt.rs+++ b/tests/integration_tests/shell_integration_prompt.rs@@ -262,7 +262,10 @@ mod pty_tests {let exit_status = child.wait().unwrap();let exit_code = exit_status.exit_code() as i32;- (buf, exit_code)+ // Normalize CRLF to LF (PTYs use CRLF on some platforms)+ let normalized = buf.replace("\r\n", "\n");++ (normalized, exit_code)}/// Normalize output for snapshot testing@@ -279,10 +282,7 @@ mod pty_tests {// Remove home directory pathslet home_str = home_dir.display().to_string();- let output = output.replace(&home_str, "[HOME]");-- // PTYs use \r\n line endings, normalize to \n- output.replace("\r\n", "\n")+ output.replace(&home_str, "[HOME]")}/// Test: Already installed (config line exists) → skip promptdiff --git a/tests/integration_tests/shell_wrapper.rs b/tests/integration_tests/shell_wrapper.rsindex 74ad768f4..88d4ef9cc 100644--- a/tests/integration_tests/shell_wrapper.rs+++ b/tests/integration_tests/shell_wrapper.rs@@ -38,7 +38,7 @@ use std::process::Command;// Unix-only imports#[cfg(unix)]use {- crate::common::{add_pty_filters, add_pty_tmpdir_filters, canonicalize, wait_for_file_content},+ crate::common::{add_pty_filters, canonicalize, wait_for_file_content},insta::assert_snapshot,std::{fs, path::PathBuf, sync::LazyLock},worktrunk::shell,@@ -99,28 +99,14 @@ impl ShellOutput {}}-/// Create insta settings configured for shell wrapper snapshot tests.+/// Insta settings for shell wrapper tests.///-/// This sets up filters for:-/// - PTY-specific artifacts (CRLF, ^D control sequences, ANSI resets)-/// - Temporary directory paths-/// - Project root paths (for fixture references)+/// Inherits snapshot_path and path filters from TestRepo (bound to scope),+/// then adds PTY-specific filters for cross-platform consistency.#[cfg(unix)]fn shell_wrapper_settings() -> insta::Settings {let mut settings = insta::Settings::clone_current();- settings.set_snapshot_path("../snapshots");-- // Add common PTY filters (CRLF, ^D, leading ANSI resets)add_pty_filters(&mut settings);-- // Add temp directory path filters- add_pty_tmpdir_filters(&mut settings, "[TMPDIR]");-- // Normalize project root paths (for fixture references like tests/fixtures/)- if let Ok(manifest_dir) = std::env::var("CARGO_MANIFEST_DIR") {- settings.add_filter(®ex::escape(&manifest_dir), "[PROJECT_ROOT]");- }-settings}@@ -320,11 +306,6 @@ fn build_shell_script(shell: &str, repo: &TestRepo, subcommand: &str, args: &[&s}}-/// Normalize line endings (CRLF -> LF)-fn normalize_newlines(s: &str) -> String {- s.replace("\r\n", "\n")-}-/// Execute a command in a PTY with interactive input support////// This is similar to `exec_in_pty` but allows sending input during execution.@@ -462,7 +443,10 @@ fn exec_in_pty_interactive(let status = child.wait().unwrap();- (normalize_newlines(&buf), status.exit_code() as i32)+ // Normalize CRLF to LF (PTYs use CRLF on some platforms)+ let normalized = buf.replace("\r\n", "\n");++ (normalized, status.exit_code() as i32)}/// Execute bash in true interactive mode by writing commands to the PTY@@ -569,7 +553,10 @@ fn exec_bash_truly_interactive(// Get the captured outputlet buf = reader_thread.join().unwrap();- (normalize_newlines(&buf), status.exit_code() as i32)+ // Normalize CRLF to LF (same as exec_in_pty_interactive)+ let normalized = buf.replace("\r\n", "\n");++ (normalized, status.exit_code() as i32)}/// Execute a command through a shell wrapperdiff --git a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snap b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snapindex 55325896b..629d7adb3 100644--- a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snap+++ b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snap@@ -7,10 +7,10 @@ y[33m▲[39m [33m[1mrepo[22m needs approval to execute [1m1[22m command:[39m[2m○[22m post-create:-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[36m❯[39m Allow and remember? [1m[y/N][22m[36m◎[39m [36mRunning post-create project hook @ [1m_REPO_.test-approve[22m:[39m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2mtest command[32m✓[39m [32mCreated branch [1mtest-approve[22m from [1mmain[22m and worktree @ [1m_REPO_.test-approve[22m[39m[2m↳[22m [2mTo customize worktree locations, run [90mwt config create[39m[22mdiff --git a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snap b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snapindex 128cd02f2..954317af0 100644--- a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snap+++ b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snap@@ -7,7 +7,7 @@ n[33m▲[39m [33m[1mrepo[22m needs approval to execute [1m1[22m command:[39m[2m○[22m post-create:-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[36m❯[39m Allow and remember? [1m[y/N][22m[2m○[22m Commands declined, continuing worktree creation[32m✓[39m [32mCreated branch [1mtest-decline[22m from [1mmain[22m and worktree @ [1m_REPO_.test-decline[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snap b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snapindex aed1d0a6a..368f06003 100644--- a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snap+++ b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snap@@ -7,18 +7,18 @@ y[33m▲[39m [33m[1mrepo[22m needs approval to execute [1m2[22m commands:[39m[2m○[22m post-create [1mfirst[22m:-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m[2m○[22m post-create [1mthird[22m:-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2m[36m❯[39m Allow and remember? [1m[y/N][22m[36m◎[39m [36mRunning post-create [1mproject:first[22m @ [1m_REPO_.test-mixed-accept[22m:[39m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2mFirst command[36m◎[39m [36mRunning post-create [1mproject:second[22m @ [1m_REPO_.test-mixed-accept[22m:[39m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Second command'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Second command'[0m[2mSecond command[36m◎[39m [36mRunning post-create [1mproject:third[22m @ [1m_REPO_.test-mixed-accept[22m:[39m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2mThird command[32m✓[39m [32mCreated branch [1mtest-mixed-accept[22m from [1mmain[22m and worktree @ [1m_REPO_.test-mixed-accept[22m[39m[2m↳[22m [2mTo customize worktree locations, run [90mwt config create[39m[22mdiff --git a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snap b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snapindex 8a310f1e8..73d51cf3d 100644--- a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snap+++ b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snap@@ -7,9 +7,9 @@ n[33m▲[39m [33m[1mrepo[22m needs approval to execute [1m2[22m commands:[39m[2m○[22m post-create [1mfirst[22m:-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m[2m○[22m post-create [1mthird[22m:-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2m[36m❯[39m Allow and remember? [1m[y/N][22m[2m○[22m Commands declined, continuing worktree creation[32m✓[39m [32mCreated branch [1mtest-mixed-decline[22m from [1mmain[22m and worktree @ [1m_REPO_.test-mixed-decline[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snap b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snapindex d649e76d5..53cd2dc28 100644--- a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snap+++ b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snap@@ -7,20 +7,20 @@ y[33m▲[39m [33m[1mrepo[22m needs approval to execute [1m3[22m commands:[39m[2m○[22m post-create [1mfirst[22m:-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m[2m○[22m post-create [1msecond[22m:-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Second command'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Second command'[0m[2m[2m○[22m post-create [1mthird[22m:-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2m[36m❯[39m Allow and remember? [1m[y/N][22m[36m◎[39m [36mRunning post-create [1mproject:first[22m @ [1m_REPO_.test-multi[22m:[39m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2mFirst command[36m◎[39m [36mRunning post-create [1mproject:second[22m @ [1m_REPO_.test-multi[22m:[39m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Second command'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Second command'[0m[2mSecond command[36m◎[39m [36mRunning post-create [1mproject:third[22m @ [1m_REPO_.test-multi[22m:[39m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2mThird command[32m✓[39m [32mCreated branch [1mtest-multi[22m from [1mmain[22m and worktree @ [1m_REPO_.test-multi[22m[39m[2m↳[22m [2mTo customize worktree locations, run [90mwt config create[39m[22mdiff --git a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snap b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snapindex 358ff7a79..dfed37a2b 100644--- a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snap+++ b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snap@@ -7,20 +7,20 @@ y[33m▲[39m [33m[1mrepo[22m needs approval to execute [1m3[22m commands:[39m[2m○[22m post-create [1minstall[22m:-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Installing dependencies...'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Installing dependencies...'[0m[2m[2m○[22m post-create [1mbuild[22m:-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Building project...'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Building project...'[0m[2m[2m○[22m post-create [1mtest[22m:-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Running tests...'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Running tests...'[0m[2m[36m❯[39m Allow and remember? [1m[y/N][22m[36m◎[39m [36mRunning post-create [1mproject:install[22m @ [1m_REPO_.test-named[22m:[39m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Installing dependencies...'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Installing dependencies...'[0m[2mInstalling dependencies...[36m◎[39m [36mRunning post-create [1mproject:build[22m @ [1m_REPO_.test-named[22m:[39m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Building project...'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Building project...'[0m[2mBuilding project...[36m◎[39m [36mRunning post-create [1mproject:test[22m @ [1m_REPO_.test-named[22m:[39m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Running tests...'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Running tests...'[0m[2mRunning tests...[32m✓[39m [32mCreated branch [1mtest-named[22m from [1mmain[22m and worktree @ [1m_REPO_.test-named[22m[39m[2m↳[22m [2mTo customize worktree locations, run [90mwt config create[39m[22mdiff --git a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snap b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snapindex d81b9102d..b97f10265 100644--- a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snap+++ b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snap@@ -7,12 +7,12 @@ y[33m▲[39m [33m[1mrepo[22m needs approval to execute [1m1[22m command:[39m[2m○[22m post-create:-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[36m❯[39m Allow and remember? [1m[y/N][22m[33m▲[39m [33mFailed to save command approval: Failed to write config file: Permission denied (os error 13)[39m[2m↳[22m [2mApproval will be requested again next time.[22m[36m◎[39m [36mRunning post-create project hook @ [1m_REPO_.test-permission[22m:[39m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2mtest command[32m✓[39m [32mCreated branch [1mtest-permission[22m from [1mmain[22m and worktree @ [1m_REPO_.test-permission[22m[39m[2m↳[22m [2mTo customize worktree locations, run [90mwt config create[39m[22mdiff --git a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_remove_decline.snap b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_remove_decline.snapindex 0a8590552..380582b6c 100644--- a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_remove_decline.snap+++ b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_remove_decline.snap@@ -7,7 +7,7 @@ n[33m▲[39m [33m[1mrepo[22m needs approval to execute [1m1[22m command:[39m[2m○[22m pre-remove:-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'pre-remove hook'[0m[2m[0m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'pre-remove hook'[0m[2m[36m❯[39m Allow and remember? [1m[y/N][22m[2m○[22m Commands declined, continuing removal[36m◎ Removing [1mto-remove[22m worktree & branch in background (ancestor of [1mmain[22m,[39m [2m⊂[22m[36m)[39mdiff --git a/tests/snapshots/integration__integration_tests__configure_shell__pty_tests__install_preview_declined.snap b/tests/snapshots/integration__integration_tests__configure_shell__pty_tests__install_preview_declined.snapindex d763e4b33..097e8d61a 100644--- a/tests/snapshots/integration__integration_tests__configure_shell__pty_tests__install_preview_declined.snap+++ b/tests/snapshots/integration__integration_tests__configure_shell__pty_tests__install_preview_declined.snap@@ -1,6 +1,7 @@---source: tests/integration_tests/configure_shell.rs-expression: normalized+expression: "output.trim_start_matches('\\n')"---+[36m❯[39m Install shell integration? [1m[y/N/?][22m✗ Cancelled by userdiff --git a/tests/snapshots/integration__integration_tests__configure_shell__pty_tests__install_preview_with_gutter.snap b/tests/snapshots/integration__integration_tests__configure_shell__pty_tests__install_preview_with_gutter.snapindex ea53af0fc..ced466a2c 100644--- a/tests/snapshots/integration__integration_tests__configure_shell__pty_tests__install_preview_with_gutter.snap+++ b/tests/snapshots/integration__integration_tests__configure_shell__pty_tests__install_preview_with_gutter.snap@@ -1,7 +1,8 @@---source: tests/integration_tests/configure_shell.rs-expression: normalized+expression: "output.trim_start_matches('\\n')"---+[36m❯[39m Install shell integration? [1m[y/N/?][22m✓ Added shell extension & completions for zsh @ ~/.zshrc↳ Skipped bash; ~/.bashrc not found