Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
fix: improve hook pipeline summary display (#1994)
Maximilian Roos1408c59ecccc
diff --git a/src/commands/hooks.rs b/src/commands/hooks.rsindex 6c881e48b..00ffacd84 100644--- a/src/commands/hooks.rs+++ b/src/commands/hooks.rs@@ -169,37 +169,57 @@ pub struct SourcedStep {/// Format a summary description of a pipeline for display.///-/// Shows step names/counts with `→` separating serial steps.-/// Named steps show their name; unnamed steps show their source (`user`/`project`).-/// Example: "install → build, lint"+/// Named steps show as `source:name`; unnamed steps are collapsed into a single+/// `source ×N` count. Serial steps are separated by `;`, concurrent steps by `,`.+/// Example: "user:install; user:build, user:lint"///-/// TODO: Rethink hook display presentation. Current issues:-/// - Arrows (`→`) add visual noise and aren't obviously meaningful to users-/// - Multiple unnamed steps from the same source repeat the label (`user → user`)-/// - Source prefix was dropped for named steps (`user:bg` → `bg`) — less-/// informative when both user and project hooks are present+/// TODO: The `source:` prefix on named steps may be too verbose when only one+/// source is present (e.g., `user:bg` vs just `bg`). Consider prefixing only+/// when both user and project hooks exist for the same hook type.fn format_pipeline_summary(steps: &[SourcedStep]) -> String {- let mut parts = Vec::new();+ // All steps in a group share the same source.+ let source_label = steps[0].source.to_string();++ // Collect named labels per step (None = unnamed).+ let mut parts: Vec<String> = Vec::new();+ let mut unnamed_count: usize = 0;+for step in steps {- let source_label = step.source.to_string();- match &step.step {- PreparedStep::Single(cmd) => {- let label = cmd.name.as_deref().unwrap_or(&source_label);- parts.push(cformat!("<bold>{}</>", label));- }- PreparedStep::Concurrent(cmds) => {- let names: Vec<String> = cmds- .iter()- .map(|c| {- let label = c.name.as_deref().unwrap_or(&source_label);- cformat!("<bold>{}</>", label)- })- .collect();- parts.push(names.join(", "));+ let step_names: Vec<Option<&str>> = match &step.step {+ PreparedStep::Single(cmd) => vec![cmd.name.as_deref()],+ PreparedStep::Concurrent(cmds) => cmds.iter().map(|c| c.name.as_deref()).collect(),+ };++ let named: Vec<_> = step_names+ .iter()+ .filter_map(|n| n.map(|name| cformat!("<bold>{source_label}:{name}</>")))+ .collect();+ unnamed_count += step_names.iter().filter(|n| n.is_none()).count();++ if !named.is_empty() {+ // Flush any pending unnamed count before named labels.+ if unnamed_count > 0 {+ parts.push(format_unnamed(&source_label, unnamed_count));+ unnamed_count = 0;}+ parts.push(named.join(", "));}}- parts.join(" → ")++ // Flush trailing unnamed count.+ if unnamed_count > 0 {+ parts.push(format_unnamed(&source_label, unnamed_count));+ }++ parts.join("; ")+}++fn format_unnamed(source_label: &str, count: usize) -> String {+ if count == 1 {+ cformat!("<bold>{source_label}</>")+ } else {+ cformat!("<bold>{source_label}</> ×{count}")+ }}/// Announce and spawn background hooks for one or more hook types.@@ -617,6 +637,8 @@ fn expand_lazy_template(#[cfg(test)]mod tests {use super::*;+ use ansi_str::AnsiStr;+ use insta::assert_snapshot;#[test]fn test_hook_source_display() {@@ -703,11 +725,7 @@ mod tests {])),];let summary = format_pipeline_summary(&steps);- // Contains arrow and names (stripped of ANSI for assertion)- assert!(summary.contains("→"));- assert!(summary.contains("install"));- assert!(summary.contains("build"));- assert!(summary.contains("lint"));+ assert_snapshot!(summary.ansi_strip(), @"user:install; user:build, user:lint");}#[test]@@ -717,9 +735,48 @@ mod tests {make_sourced_step(PreparedStep::Single(make_cmd(None, "npm run build"))),];let summary = format_pipeline_summary(&steps);- // Unnamed steps show source name ("user" from make_sourced_step)- assert!(summary.contains("user"));- assert!(summary.contains("→"));+ assert_snapshot!(summary.ansi_strip(), @"user ×2");+ }++ #[test]+ fn test_format_pipeline_summary_mixed_named_unnamed() {+ let steps = vec![+ make_sourced_step(PreparedStep::Single(make_cmd(None, "npm install"))),+ make_sourced_step(PreparedStep::Single(make_cmd(Some("bg"), "npm run dev"))),+ ];+ let summary = format_pipeline_summary(&steps);+ assert_snapshot!(summary.ansi_strip(), @"user; user:bg");+ }++ #[test]+ fn test_format_pipeline_summary_single_unnamed() {+ let steps = vec![make_sourced_step(PreparedStep::Single(make_cmd(+ None,+ "npm install",+ )))];+ let summary = format_pipeline_summary(&steps);+ assert_snapshot!(summary.ansi_strip(), @"user");+ }++ #[test]+ fn test_format_pipeline_summary_concurrent_then_concurrent() {+ // The canonical pipeline: two concurrent groups in sequence.+ // post-start = [+ // { install = "npm install", setup = "setup-db" },+ // { build = "npm run build", lint = "npm run lint" },+ // ]+ let steps = vec![+ make_sourced_step(PreparedStep::Concurrent(vec![+ make_cmd(Some("install"), "npm install"),+ make_cmd(Some("setup"), "setup-db"),+ ])),+ make_sourced_step(PreparedStep::Concurrent(vec![+ make_cmd(Some("build"), "npm run build"),+ make_cmd(Some("lint"), "npm run lint"),+ ])),+ ];+ let summary = format_pipeline_summary(&steps);+ assert_snapshot!(summary.ansi_strip(), @"user:install, user:setup; user:build, user:lint");}#[test]diff --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 94f55b884..353f96618 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@@ -53,4 +53,4 @@ exit_code: 0[36m◎[39m [36mRemoving [1mfeature[22m worktree & branch in background (same commit as [1mmain[22m,[39m [2m_[22m[36m)[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-merge: [1mnotify[22m, [1mdeploy[22m @ [1m_REPO_[22m[39m+[36m◎[39m [36mRunning post-merge: [1mproject:notify[22m, [1mproject:deploy[22m @ [1m_REPO_[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_pipeline_serial_ordering.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_pipeline_serial_ordering.snapindex 9317ddcef..223b6e041 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_pipeline_serial_ordering.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_pipeline_serial_ordering.snap@@ -53,4 +53,4 @@ exit_code: 0[36m◎[39m [36mRemoving [1mfeature[22m worktree & branch in background (same commit as [1mmain[22m,[39m [2m_[22m[36m)[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-merge: [1mproject[22m → [1mproject[22m @ [1m_REPO_[22m[39m+[36m◎[39m [36mRunning post-merge: [1mproject[22m ×2 @ [1m_REPO_[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snapindex 0f31bf17a..2d33e2f17 100644--- a/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap@@ -83,4 +83,4 @@ test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; fin[36m◎[39m [36mRemoving [1mfeature-auth[22m worktree & branch in background (same commit as [1mmain[22m,[39m [2m_[22m[36m)[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-merge: [1minstall[22m @ [1m_REPO_[22m[39m+[36m◎[39m [36mRunning post-merge: [1mproject:install[22m @ [1m_REPO_[22m[39mdiff --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 c7e3c14c6..a57ee1b3a 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@@ -52,4 +52,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1mserver[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [1mproject:server[22m @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_mixed_user_pipeline_project_flat.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_mixed_user_pipeline_project_flat.snapindex 7087b6e91..d0106784e 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_mixed_user_pipeline_project_flat.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_mixed_user_pipeline_project_flat.snap@@ -49,4 +49,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1muser[22m → [1muser_bg[22m, [1mproj[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [1muser[22m; [1muser:user_bg[22m, [1mproject:proj[22m @ [1m_REPO_.feature[22m[39mdiff --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 b730b7e1a..22a0c03d6 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@@ -49,4 +49,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1mtask1[22m, [1mtask2[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [1mproject:task1[22m, [1mproject:task2[22m @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_pipeline_template_vars.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_pipeline_template_vars.snapindex 37ec8c478..08efd6838 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_pipeline_template_vars.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_pipeline_template_vars.snap@@ -49,4 +49,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1mproject[22m → [1mcheck[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [1mproject[22m; [1mproject:check[22m @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_project_pipeline.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_project_pipeline.snapindex 7cfe29211..ad1454599 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_project_pipeline.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_project_pipeline.snap@@ -49,4 +49,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1mproject[22m → [1mtask1[22m, [1mtask2[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [1mproject[22m; [1mproject:task1[22m, [1mproject:task2[22m @ [1m_REPO_.feature[22m[39mdiff --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 cfb52bc23..976a9bb78 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@@ -49,4 +49,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1mtask1[22m, [1mtask2[22m, [1mtask3[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [1mproject:task1[22m, [1mproject:task2[22m, [1mproject:task3[22m @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_verbose_output.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_verbose_output.snapindex 37ba589bf..1b85130ae 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_verbose_output.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_verbose_output.snap@@ -58,4 +58,4 @@ exit_code: 0[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'verbose test'[0m[2m [0m[2m[36m>[0m[2m verbose.txt[107m [0m [2m→[22m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'verbose test'[0m[2m [0m[2m[36m>[0m[2m verbose.txt-[36m◎[39m [36mRunning post-start: [1msetup[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [1mproject:setup[22m @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_hooks_pre_start.snap b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_hooks_pre_start.snapindex 196a71415..61d8e4fa8 100644--- a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_hooks_pre_start.snap+++ b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_hooks_pre_start.snap@@ -10,4 +10,4 @@ expression: "&output.combined"Installed 24 packages in 1.2s[32m✓[39m [32mCreated branch [1mfeature-x[22m from [1mmain[22m and worktree @ [1m_REPO_.feature-x[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[36m◎[39m [36mRunning post-start: [1mdev[22m[39m+[36m◎[39m [36mRunning post-start: [1mproject:dev[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_hooks_zsh.snap b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_hooks_zsh.snapindex 4e40b132a..3c5c142fc 100644--- a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_hooks_zsh.snap+++ b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_hooks_zsh.snap@@ -11,4 +11,4 @@ Installing dependencies...Building project...[32m✓[39m [32mCreated branch [1mfeature-hooks[22m from [1mmain[22m and worktree @ [1m_REPO_.feature-hooks[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[36m◎[39m [36mRunning post-start: [1mserver[22m, [1mwatch[22m[39m+[36m◎[39m [36mRunning post-start: [1mproject:server[22m, [1mproject:watch[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__combined_post_remove_and_post_switch.snap b/tests/snapshots/integration__integration_tests__user_hooks__combined_post_remove_and_post_switch.snapindex 16f7c14c7..9d27593b0 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__combined_post_remove_and_post_switch.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__combined_post_remove_and_post_switch.snap@@ -48,4 +48,4 @@ exit_code: 0[36m◎[39m [36mRemoving [1mfeature[22m worktree & branch in background (--force-delete)[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-remove: [1mcleanup[22m; post-switch: [1mnotify[22m @ [1m_REPO_[22m[39m+[36m◎[39m [36mRunning post-remove: [1muser:cleanup[22m; post-switch: [1muser:notify[22m @ [1m_REPO_[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__post_remove_runs_at_primary.snap b/tests/snapshots/integration__integration_tests__user_hooks__post_remove_runs_at_primary.snapindex 5ef34f6dc..88368fa60 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__post_remove_runs_at_primary.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__post_remove_runs_at_primary.snap@@ -46,4 +46,4 @@ exit_code: 0----- stderr -----[36m◎[39m [36mRemoving [1mfeature[22m worktree & branch in background (--force-delete)[39m-[36m◎[39m [36mRunning post-remove: [1mcleanup[22m @ [1m_REPO_[22m[39m+[36m◎[39m [36mRunning post-remove: [1muser:cleanup[22m @ [1m_REPO_[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__standalone_hook_name_filtered_lazy_template.snap b/tests/snapshots/integration__integration_tests__user_hooks__standalone_hook_name_filtered_lazy_template.snapindex 6150da142..46dccbfaf 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__standalone_hook_name_filtered_lazy_template.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__standalone_hook_name_filtered_lazy_template.snap@@ -45,4 +45,4 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning post-start: [1mdb[22m[39m+[36m◎[39m [36mRunning post-start: [1muser:db[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_start.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_start.snapindex e2d57d04c..1ff903a71 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_start.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_start.snap@@ -49,4 +49,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1mbg[22m, [1mproject[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [1muser:bg[22m, [1mproject[22m @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_commit_executes.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_commit_executes.snapindex f11cf3113..4db1aafd9 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_commit_executes.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_commit_executes.snap@@ -50,4 +50,4 @@ exit_code: 0[36m◎[39m [36mGenerating commit message and committing changes... [90m(1 file, [32m+1[39m[39m[90m)[39m[39m[107m [0m [1mfeat: test commit[22m[32m✓[39m [32mCommitted changes @ [2m[HASH][22m[39m-[36m◎[39m [36mRunning post-commit: [1mnotify[22m[39m+[36m◎[39m [36mRunning post-commit: [1muser:notify[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_commit_failure.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_commit_failure.snapindex 7a01dbb0b..9b3826deb 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_commit_failure.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_commit_failure.snap@@ -50,4 +50,4 @@ exit_code: 0[36m◎[39m [36mGenerating commit message and committing changes... [90m(1 file, [32m+1[39m[39m[90m)[39m[39m[107m [0m [1mfeat: test commit[22m[32m✓[39m [32mCommitted changes @ [2m[HASH][22m[39m-[36m◎[39m [36mRunning post-commit: [1mfailing[22m[39m+[36m◎[39m [36mRunning post-commit: [1muser:failing[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_merge_executes.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_merge_executes.snapindex eb1ad2e54..c154b86f9 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_merge_executes.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_merge_executes.snap@@ -52,4 +52,4 @@ exit_code: 0[107m [0m 1 file changed, 1 insertion(+)[32m✓[39m [32mMerged to [1mmain[22m [90m(1 commit, 1 file, [32m+1[39m[39m[90m)[39m[39m[2m○[22m Worktree preserved (--no-remove)-[36m◎[39m [36mRunning post-merge: [1mnotify[22m @ [1m_REPO_[22m[39m+[36m◎[39m [36mRunning post-merge: [1muser:notify[22m @ [1m_REPO_[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_remove_executes.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_remove_executes.snapindex 993d71cdc..b255ffb2c 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_remove_executes.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_remove_executes.snap@@ -46,4 +46,4 @@ exit_code: 0----- stderr -----[36m◎[39m [36mRemoving [1mfeature[22m worktree & branch in background (--force-delete)[39m-[36m◎[39m [36mRunning post-remove: [1mcleanup[22m[39m+[36m◎[39m [36mRunning post-remove: [1muser:cleanup[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_remove_pipeline_ordering.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_remove_pipeline_ordering.snapindex c1586f3f9..688ee8b62 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_remove_pipeline_ordering.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_remove_pipeline_ordering.snap@@ -46,4 +46,4 @@ exit_code: 0----- stderr -----[36m◎[39m [36mRemoving [1mfeature[22m worktree & branch in background (--force-delete)[39m-[36m◎[39m [36mRunning post-remove: [1muser[22m → [1muser[22m[39m+[36m◎[39m [36mRunning post-remove: [1muser[22m ×2[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_executes.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_executes.snapindex 39f2f66a0..e682574bf 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_executes.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_executes.snap@@ -49,4 +49,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1mbg[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [1muser:bg[22m @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_concurrent_all.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_concurrent_all.snapindex 5571d5a41..b6af9045e 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_concurrent_all.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_concurrent_all.snap@@ -49,4 +49,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1ma[22m, [1mb[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [1muser:a[22m, [1muser:b[22m @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_concurrent_failure.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_concurrent_failure.snapindex 5fcf7ec54..ac1479c2d 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_concurrent_failure.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_concurrent_failure.snap@@ -49,4 +49,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1mfail[22m, [1mok[22m → [1muser[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [1muser:fail[22m, [1muser:ok[22m; [1muser[22m @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_failure.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_failure.snapindex 1d9ce99f8..5a7b150b6 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_failure.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_failure.snap@@ -49,4 +49,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1muser[22m → [1mbg[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [1muser[22m; [1muser:bg[22m @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_hook_name_per_step.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_hook_name_per_step.snapindex 049094810..6d5a7b681 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_hook_name_per_step.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_hook_name_per_step.snap@@ -49,4 +49,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1mstep_one[22m → [1mstep_two[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [1muser:step_one[22m; [1muser:step_two[22m @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_lazy_vars_bg.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_lazy_vars_bg.snapindex adce18655..270646637 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_lazy_vars_bg.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_lazy_vars_bg.snap@@ -49,4 +49,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1muser[22m → [1mdb[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [1muser[22m; [1muser:db[22m @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_ordering.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_ordering.snapindex 1d9ce99f8..5a7b150b6 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_ordering.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_ordering.snap@@ -49,4 +49,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1muser[22m → [1mbg[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [1muser[22m; [1muser:bg[22m @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_switch_pipeline_via_create.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_switch_pipeline_via_create.snapindex 6d3b7a47d..b18fb48ae 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_switch_pipeline_via_create.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_switch_pipeline_via_create.snap@@ -49,4 +49,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-switch: [1muser[22m → [1mcheck[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-switch: [1muser[22m; [1muser:check[22m @ [1m_REPO_.feature[22m[39m