Skip to content

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

Changes to 10 files

Maximilian Roosca448ab8f8e0
diff --git a/CLAUDE.md b/CLAUDE.md
index 1b4aad4f2..f4cb01360 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -100,7 +100,9 @@ Six canonical message patterns with their emojis:
3. **Errors**: ❌ + red text (failures, invalid states)
4. **Warnings**: 🟑 + yellow text (non-blocking issues)
5. **Hints**: πŸ’‘ + dimmed text (actionable suggestions, tips for user)
-6. **Info**: βšͺ + dimmed text (neutral status, system feedback, metadata)
+6. **Info**: βšͺ + text (neutral status, system feedback, metadata)
+ - **NOT dimmed**: Primary status messages that answer the user's question
+ - **Dimmed**: Supplementary metadata and contextual information
**Core Principle: Every user-facing message must have EITHER an emoji OR a gutter.**
@@ -114,8 +116,13 @@ This provides consistent visual separation and hierarchy:
// βœ… GOOD - standalone message with emoji
println!("{SUCCESS_EMOJI} {GREEN}Created worktree{GREEN:#}");
-// βœ… GOOD - info message for neutral status
-println!("{INFO_EMOJI} {dim}post-create declined{dim:#}");
+// βœ… GOOD - info message for primary status (NOT dimmed - answers user's question)
+output::info("All commands already approved")?;
+output::info("Commands declined")?;
+
+// βœ… GOOD - info message for supplementary metadata (dimmed)
+let dim = AnstyleStyle::new().dimmed();
+println!("{INFO_EMOJI} {dim}Showing 5 worktrees, 2 with changes...{dim:#}");
// βœ… GOOD - quoted content with gutter
print!("{}", format_with_gutter(&command));
@@ -133,6 +140,9 @@ println!("{dim}Operation declined{dim:#}");
// ❌ BAD - section header without emoji
println!("Config: {bold}{}{bold:#}", path); // Should have INFO_EMOJI
+
+// ❌ BAD - dimming primary status that answers user's question
+output::info(format!("{dim}Commands declined{dim:#}"))?; // Should NOT be dim
```
### stdout vs stderr: Separation by Source
diff --git a/src/commands/command_approval.rs b/src/commands/command_approval.rs
index 1c496fa4b..2a10b891b 100644
--- a/src/commands/command_approval.rs
+++ b/src/commands/command_approval.rs
@@ -46,7 +46,6 @@ pub fn approve_command_batch(
};
if !approved {
- let dim = AnstyleStyle::new().dimmed();
// Derive phase from commands - if all same phase, show it; otherwise show generic message
let phase_str = if commands.len() == 1 {
commands[0].phase.to_string()
@@ -58,7 +57,7 @@ pub fn approve_command_batch(
"commands".to_string()
}
};
- println!("{INFO_EMOJI} {dim}{phase_str} declined{dim:#}");
+ println!("{INFO_EMOJI} {phase_str} declined");
return Ok(false);
}
diff --git a/src/commands/standalone.rs b/src/commands/standalone.rs
index 491670dc6..0bbd665e7 100644
--- a/src/commands/standalone.rs
+++ b/src/commands/standalone.rs
@@ -324,8 +324,7 @@ pub fn handle_standalone_ask_approvals(force: bool, show_all: bool) -> Result<()
let commands = collect_commands_for_hooks(&project_config, &all_hooks);
if commands.is_empty() {
- let dim = worktrunk::styling::AnstyleStyle::new().dimmed();
- crate::output::info(format!("{dim}No commands configured in project{dim:#}"))?;
+ crate::output::info("No commands configured in project")?;
return Ok(());
}
@@ -337,8 +336,7 @@ pub fn handle_standalone_ask_approvals(force: bool, show_all: bool) -> Result<()
.collect();
if unapproved.is_empty() {
- let dim = worktrunk::styling::AnstyleStyle::new().dimmed();
- crate::output::info(format!("{dim}All commands already approved{dim:#}"))?;
+ crate::output::info("All commands already approved")?;
return Ok(());
}
@@ -369,8 +367,7 @@ pub fn handle_standalone_ask_approvals(force: bool, show_all: bool) -> Result<()
))?;
}
} else {
- let dim = worktrunk::styling::AnstyleStyle::new().dimmed();
- crate::output::info(format!("{dim}Commands declined{dim:#}"))?;
+ crate::output::info("Commands declined")?;
}
Ok(())
diff --git a/src/styling/constants.rs b/src/styling/constants.rs
index 0bb77322f..792803436 100644
--- a/src/styling/constants.rs
+++ b/src/styling/constants.rs
@@ -76,5 +76,7 @@ pub const WARNING_EMOJI: &str = "🟑";
/// Hint emoji - use with HINT style: `println!("{HINT_EMOJI} {HINT}message{HINT:#}");`
pub const HINT_EMOJI: &str = "πŸ’‘";
-/// Info emoji - use with dimmed style: `println!("{INFO_EMOJI} {dim}message{dim:#}");`
+/// Info emoji - use for neutral status (primary status NOT dimmed, metadata may be dimmed)
+/// Primary status: `output::info("All commands already approved")?;`
+/// Metadata: `println!("{INFO_EMOJI} {dim}Showing 5 worktrees...{dim:#}");`
pub const INFO_EMOJI: &str = "βšͺ";
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.snap
index 0a032c367..d02a8ca7d 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,7 +4,7 @@ expression: combined
---
exit_code: 0
----- stdout -----
-βšͺ post-create declined
+βšͺ post-create declined
βœ… Created new worktree for test-mixed from main at [REPO].test-mixed
πŸ’‘ To enable automatic cd, run: wt config shell
diff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snap
index a6bd8e5f2..c49db2e60 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,7 +4,7 @@ expression: combined
---
exit_code: 0
----- stdout -----
-βšͺ post-create declined
+βšͺ post-create declined
βœ… Created new worktree for test/nested-branch from main at [REPO].test-nested-branch
πŸ’‘ To enable automatic cd, run: wt config shell
diff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snap
index da36a7bc4..4d7fc0bb5 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,7 +4,7 @@ expression: combined
---
exit_code: 0
----- stdout -----
-βšͺ post-create declined
+βšͺ post-create declined
βœ… Created new worktree for test-named from main at [REPO].test-named
πŸ’‘ To enable automatic cd, run: wt config shell
diff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snap
index e14ec6651..d9da6f7b5 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,7 +4,7 @@ expression: combined
---
exit_code: 0
----- stdout -----
-βšͺ post-create declined
+βšͺ post-create declined
βœ… Created new worktree for feature/test-approval from main at [REPO].feature-test-approval
πŸ’‘ To enable automatic cd, run: wt config shell
diff --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.snap
index aa84dc388..81018d718 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,7 +4,7 @@ expression: combined
---
exit_code: 0
----- stdout -----
-βšͺ post-create declined
+βšͺ post-create declined
βœ… Created new worktree for test-decline from main at [REPO].test-decline
πŸ’‘ To enable automatic cd, run: wt config shell
diff --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.snap
index e13c93d82..046d236dc 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,7 +4,7 @@ expression: combined
---
exit_code: 0
----- stdout -----
-βšͺ post-create declined
+βšͺ post-create declined
βœ… Created new worktree for test-force-2 from main at [REPO].test-force-2
πŸ’‘ To enable automatic cd, run: wt config shell