Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
feat: Unify approval prompt messages
Maximilian Roosf160f44f926f
diff --git a/src/commands/command_approval.rs b/src/commands/command_approval.rsindex c30707da2..b1974c1bc 100644--- a/src/commands/command_approval.rs+++ b/src/commands/command_approval.rs@@ -87,18 +87,14 @@ fn prompt_for_batch_approval(commands: &[&Command], project_id: &str) -> std::iolet project_name = project_id.split('/').next_back().unwrap_or(project_id);let bold = AnstyleStyle::new().bold();- let dim = AnstyleStyle::new().dimmed();let warning_bold = WARNING.bold();+ let warning_dim = WARNING.dimmed();let count = commands.len();let plural = if count == 1 { "" } else { "s" };eprintln!();eprintln!(- "{WARNING_EMOJI} {WARNING}Permission required to execute {warning_bold}{count}{warning_bold:#} command{plural}{WARNING:#}",- );- eprintln!();- eprintln!(- "{INFO_EMOJI} {bold}{project_name}{bold:#} ({dim}{project_id}{dim:#}) wants to execute:"+ "{WARNING_EMOJI} {WARNING}{warning_bold}{project_name}{warning_bold:#} ({warning_dim}{project_id}{warning_dim:#}) wants to execute {warning_bold}{count}{warning_bold:#} command{plural}:{WARNING:#}");eprintln!();diff --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 757976f8f..d19f78948 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@@ -11,9 +11,7 @@ exit_code: 0----- stderr ------π‘ [33mPermission required to execute [1m[33m2[0m commands[0m--βͺ [1mtest-repo[0m ([2mtest-repo[0m) wants to execute:+π‘ [33m[1m[33mtest-repo[0m ([2m[33mtest-repo[0m) wants to execute [1m[33m2[0m commands:[0mπ post-create:[40m [0m [1m[34mecho[0m [32m'First command'[0m[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 27392b344..b934735f1 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@@ -11,9 +11,7 @@ exit_code: 0----- stderr ------π‘ [33mPermission required to execute [1m[33m4[0m commands[0m--βͺ [1mtest-repo[0m ([2mtest-repo[0m) wants to execute:+π‘ [33m[1m[33mtest-repo[0m ([2m[33mtest-repo[0m) wants to execute [1m[33m4[0m commands:[0mπ post-create:[40m [0m [1m[34mecho[0m [32m'Branch: test-nested-branch'[0m[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 e20ae7e63..f81ed3b7c 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@@ -11,9 +11,7 @@ exit_code: 0----- stderr ------π‘ [33mPermission required to execute [1m[33m3[0m commands[0m--βͺ [1mtest-repo[0m ([2mtest-repo[0m) wants to execute:+π‘ [33m[1m[33mtest-repo[0m ([2m[33mtest-repo[0m) wants to execute [1m[33m3[0m commands:[0mπ post-create [1minstall[0m:[40m [0m [1m[34mecho[0m [32m'Installing dependencies...'[0m[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 27197247c..ed78e3791 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@@ -11,9 +11,7 @@ exit_code: 0----- stderr ------π‘ [33mPermission required to execute [1m[33m1[0m command[0m--βͺ [1mtest-repo[0m ([2mtest-repo[0m) wants to execute:+π‘ [33m[1m[33mtest-repo[0m ([2m[33mtest-repo[0m) wants to execute [1m[33m1[0m command:[0mπ post-create:[40m [0m [1m[34mecho[0m [32m'Worktree path: [REPO].feature-test-approval'[0m[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 a88b2eec2..adc97eed9 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@@ -11,9 +11,7 @@ exit_code: 0----- stderr ------π‘ [33mPermission required to execute [1m[33m2[0m commands[0m--βͺ [1mtest-repo[0m ([2mtest-repo[0m) wants to execute:+π‘ [33m[1m[33mtest-repo[0m ([2m[33mtest-repo[0m) wants to execute [1m[33m2[0m commands:[0mπ post-create:[40m [0m [1m[34mecho[0m [32m'First command'[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 11fdd2b7b..9ad39b392 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@@ -11,9 +11,7 @@ exit_code: 0----- stderr ------π‘ [33mPermission required to execute [1m[33m1[0m command[0m--βͺ [1mtest-repo[0m ([2mtest-repo[0m) wants to execute:+π‘ [33m[1m[33mtest-repo[0m ([2m[33mtest-repo[0m) wants to execute [1m[33m1[0m command:[0mπ post-create:[40m [0m [1m[34mecho[0m [32m'test command'[0m [36m>[0m output.txt[0m