Skip to content

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

feat(status): Consolidate and refine worktree status symbols

Maximilian Roos6d6e28bedb1b
diff --git a/.claude-plugin/skills/worktrunk/reference/README.md b/.claude-plugin/skills/worktrunk/reference/README.md
index d511dea2f..b37a94419 100644
--- a/.claude-plugin/skills/worktrunk/reference/README.md
+++ b/.claude-plugin/skills/worktrunk/reference/README.md
@@ -587,7 +587,7 @@ Options:
**STATUS SYMBOLS:**
-Order: `=≠ ≡∅ ↻⋈ ⎇⊠⚠ ↑↓ ⇡⇣ ?!+»✘`
+Order: `=≠ ≡∅ ↻⋈ ⎇⌫⊠ ↑↓ ⇡⇣ ?!+»✘`
- `·` Branch without worktree (no working directory to check)
- `=` **Merge conflicts** (unmerged paths in working tree)
@@ -597,8 +597,8 @@ Order: `=≠ ≡∅ ↻⋈ ⎇⊠⚠ ↑↓ ⇡⇣ ?!+»✘`
- `↻` Rebase in progress
- `⋈` Merge in progress
- `⎇` Branch indicator (shown for branches without worktrees)
-- `⊠` Locked worktree
-- `⚠` Prunable worktree
+- `⌫` Prunable worktree (directory missing, can be pruned)
+- `⊠` Locked worktree (protected from auto-removal)
- `↑` Ahead of main branch
- `↓` Behind main branch
- `⇡` Ahead of remote tracking branch
@@ -613,31 +613,50 @@ Order: `=≠ ≡∅ ↻⋈ ⎇⊠⚠ ↑↓ ⇡⇣ ?!+»✘`
**JSON OUTPUT:**
-Use `--format=json` for structured data. The `status_symbols` object provides:
-
-- `has_conflicts`: boolean - true when branch has conflicts with main
-- `branch_state`: "" | "=" (conflicts) | "≠" (potential) | "≡" (matches main) | "∅" (no commits)
-- `git_operation`: "" | "↻" (rebase) | "⋈" (merge)
-- `worktree_attrs`: "⎇" (branch) or combination of "⊠" (locked), "⚠" (prunable)
-- `main_divergence`: "" | "↑" (ahead) | "↓" (behind) | "↕" (diverged)
-- `upstream_divergence`: "" | "⇡" (ahead) | "⇣" (behind) | "⇅" (diverged)
-- `working_tree`: combination of "?" (untracked), "!" (modified), "+" (staged), "»" (renamed), "✘" (deleted)
-- `user_status`: custom status from git config (optional)
+Use `--format=json` for structured data. Each object contains two status maps:
+
+**`status` (variant names for querying):**
+- `branch_state`: "" | "Conflicts" | "PotentialConflicts" | "MatchesMain" | "NoCommits"
+- `git_operation`: "" | "Rebase" | "Merge"
+- `worktree_attrs`: object (worktrees only) with:
+ - `locked`: null | "reason string"
+ - `prunable`: null | "reason string"
+- `main_divergence`: "" | "Ahead" | "Behind" | "Diverged"
+- `upstream_divergence`: "" | "Ahead" | "Behind" | "Diverged"
+- `working_tree`: object with booleans
+ - `untracked`: boolean - untracked files present
+ - `modified`: boolean - unstaged changes
+ - `staged`: boolean - staged changes
+ - `renamed`: boolean - renamed files
+ - `deleted`: boolean - deleted files
+- `user_status`: string (optional) - custom status from git config
+
+**`status_symbols` (display symbols for rendering):**
+- `branch_state`: "" | "=" | "≠" | "≡" | "∅"
+- `git_operation`: "" | "↻" | "⋈"
+- `worktree_attrs`: "⎇" (branch) | "⌫" (prunable) | "⊠" (locked) | ""
+- `main_divergence`: "" | "↑" | "↓" | "↕"
+- `upstream_divergence`: "" | "⇡" | "⇣" | "⇅"
+- `working_tree`: string - combination of "?!+»✘"
+- `user_status`: string (optional) - same as status.user_status
**Query examples:**
```bash
# Find worktrees with conflicts
-jq '.[] | select(.type == "worktree" and .status_symbols.has_conflicts)'
+jq '.[] | select(.status.branch_state == "Conflicts")'
+
+# Find locked worktrees
+jq '.[] | select(.status.worktree_attrs.locked != null)'
-# Find worktrees with uncommitted changes
-jq '.[] | select(.type == "worktree" and .working_tree_diff.added > 0)'
+# Find worktrees with untracked files
+jq '.[] | select(.status.working_tree.untracked == true)'
# Find worktrees in rebase or merge
-jq '.[] | select(.type == "worktree" and .status_symbols.git_operation != "")'
+jq '.[] | select(.status.git_operation != "")'
# Get branches ahead of main
-jq '.[] | select(.ahead > 0) | {branch: (.branch // .name), ahead}'
+jq '.[] | select(.status.main_divergence == "Ahead")'
```
</details>
diff --git a/README.md b/README.md
index d511dea2f..b37a94419 100644
--- a/README.md
+++ b/README.md
@@ -587,7 +587,7 @@ Options:
**STATUS SYMBOLS:**
-Order: `=≠ ≡∅ ↻⋈ ⎇⊠⚠ ↑↓ ⇡⇣ ?!+»✘`
+Order: `=≠ ≡∅ ↻⋈ ⎇⌫⊠ ↑↓ ⇡⇣ ?!+»✘`
- `·` Branch without worktree (no working directory to check)
- `=` **Merge conflicts** (unmerged paths in working tree)
@@ -597,8 +597,8 @@ Order: `=≠ ≡∅ ↻⋈ ⎇⊠⚠ ↑↓ ⇡⇣ ?!+»✘`
- `↻` Rebase in progress
- `⋈` Merge in progress
- `⎇` Branch indicator (shown for branches without worktrees)
-- `⊠` Locked worktree
-- `⚠` Prunable worktree
+- `⌫` Prunable worktree (directory missing, can be pruned)
+- `⊠` Locked worktree (protected from auto-removal)
- `↑` Ahead of main branch
- `↓` Behind main branch
- `⇡` Ahead of remote tracking branch
@@ -613,31 +613,50 @@ Order: `=≠ ≡∅ ↻⋈ ⎇⊠⚠ ↑↓ ⇡⇣ ?!+»✘`
**JSON OUTPUT:**
-Use `--format=json` for structured data. The `status_symbols` object provides:
-
-- `has_conflicts`: boolean - true when branch has conflicts with main
-- `branch_state`: "" | "=" (conflicts) | "≠" (potential) | "≡" (matches main) | "∅" (no commits)
-- `git_operation`: "" | "↻" (rebase) | "⋈" (merge)
-- `worktree_attrs`: "⎇" (branch) or combination of "⊠" (locked), "⚠" (prunable)
-- `main_divergence`: "" | "↑" (ahead) | "↓" (behind) | "↕" (diverged)
-- `upstream_divergence`: "" | "⇡" (ahead) | "⇣" (behind) | "⇅" (diverged)
-- `working_tree`: combination of "?" (untracked), "!" (modified), "+" (staged), "»" (renamed), "✘" (deleted)
-- `user_status`: custom status from git config (optional)
+Use `--format=json` for structured data. Each object contains two status maps:
+
+**`status` (variant names for querying):**
+- `branch_state`: "" | "Conflicts" | "PotentialConflicts" | "MatchesMain" | "NoCommits"
+- `git_operation`: "" | "Rebase" | "Merge"
+- `worktree_attrs`: object (worktrees only) with:
+ - `locked`: null | "reason string"
+ - `prunable`: null | "reason string"
+- `main_divergence`: "" | "Ahead" | "Behind" | "Diverged"
+- `upstream_divergence`: "" | "Ahead" | "Behind" | "Diverged"
+- `working_tree`: object with booleans
+ - `untracked`: boolean - untracked files present
+ - `modified`: boolean - unstaged changes
+ - `staged`: boolean - staged changes
+ - `renamed`: boolean - renamed files
+ - `deleted`: boolean - deleted files
+- `user_status`: string (optional) - custom status from git config
+
+**`status_symbols` (display symbols for rendering):**
+- `branch_state`: "" | "=" | "≠" | "≡" | "∅"
+- `git_operation`: "" | "↻" | "⋈"
+- `worktree_attrs`: "⎇" (branch) | "⌫" (prunable) | "⊠" (locked) | ""
+- `main_divergence`: "" | "↑" | "↓" | "↕"
+- `upstream_divergence`: "" | "⇡" | "⇣" | "⇅"
+- `working_tree`: string - combination of "?!+»✘"
+- `user_status`: string (optional) - same as status.user_status
**Query examples:**
```bash
# Find worktrees with conflicts
-jq '.[] | select(.type == "worktree" and .status_symbols.has_conflicts)'
+jq '.[] | select(.status.branch_state == "Conflicts")'
+
+# Find locked worktrees
+jq '.[] | select(.status.worktree_attrs.locked != null)'
-# Find worktrees with uncommitted changes
-jq '.[] | select(.type == "worktree" and .working_tree_diff.added > 0)'
+# Find worktrees with untracked files
+jq '.[] | select(.status.working_tree.untracked == true)'
# Find worktrees in rebase or merge
-jq '.[] | select(.type == "worktree" and .status_symbols.git_operation != "")'
+jq '.[] | select(.status.git_operation != "")'
# Get branches ahead of main
-jq '.[] | select(.ahead > 0) | {branch: (.branch // .name), ahead}'
+jq '.[] | select(.status.main_divergence == "Ahead")'
```
</details>
diff --git a/src/cli.rs b/src/cli.rs
index 31f205f86..dfeeffa04 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -361,7 +361,7 @@ Displays worktrees in a table format with status information, commit details, an
## STATUS SYMBOLS
-Order: `=≠ ≡∅ ↻⋈ ⎇⊠⚠ ↑↓ ⇡⇣ ?!+»✘`
+Order: `=≠ ≡∅ ↻⋈ ⎇⌫⊠ ↑↓ ⇡⇣ ?!+»✘`
- `·` Branch without worktree (no working directory to check)
- `=` **Merge conflicts** (unmerged paths in working tree)
@@ -371,8 +371,8 @@ Order: `=≠ ≡∅ ↻⋈ ⎇⊠⚠ ↑↓ ⇡⇣ ?!+»✘`
- `↻` Rebase in progress
- `⋈` Merge in progress
- `⎇` Branch indicator (shown for branches without worktrees)
-- `⊠` Locked worktree
-- `⚠` Prunable worktree
+- `⌫` Prunable worktree (directory missing, can be pruned)
+- `⊠` Locked worktree (protected from auto-removal)
- `↑` Ahead of main branch
- `↓` Behind main branch
- `⇡` Ahead of remote tracking branch
@@ -387,11 +387,14 @@ Order: `=≠ ≡∅ ↻⋈ ⎇⊠⚠ ↑↓ ⇡⇣ ?!+»✘`
## JSON OUTPUT
-Use `--format=json` for structured data. The `status_symbols` field contains two maps:
+Use `--format=json` for structured data. Each object contains two status maps:
**`status` (variant names for querying):**
- `branch_state`: \"\" | \"Conflicts\" | \"PotentialConflicts\" | \"MatchesMain\" | \"NoCommits\"
- `git_operation`: \"\" | \"Rebase\" | \"Merge\"
+- `worktree_attrs`: object (worktrees only) with:
+ - `locked`: null | \"reason string\"
+ - `prunable`: null | \"reason string\"
- `main_divergence`: \"\" | \"Ahead\" | \"Behind\" | \"Diverged\"
- `upstream_divergence`: \"\" | \"Ahead\" | \"Behind\" | \"Diverged\"
- `working_tree`: object with booleans
@@ -405,6 +408,7 @@ Use `--format=json` for structured data. The `status_symbols` field contains two
**`status_symbols` (display symbols for rendering):**
- `branch_state`: \"\" | \"=\" | \"≠\" | \"≡\" | \"∅\"
- `git_operation`: \"\" | \"↻\" | \"⋈\"
+- `worktree_attrs`: \"⎇\" (branch) | \"⌫\" (prunable) | \"⊠\" (locked) | \"\"
- `main_divergence`: \"\" | \"↑\" | \"↓\" | \"↕\"
- `upstream_divergence`: \"\" | \"⇡\" | \"⇣\" | \"⇅\"
- `working_tree`: string - combination of \"?!+»✘\"
@@ -413,16 +417,19 @@ Use `--format=json` for structured data. The `status_symbols` field contains two
**Query examples:**
# Find worktrees with conflicts
- jq '.[] | select(.status_symbols.status.branch_state == \"Conflicts\")'
+ jq '.[] | select(.status.branch_state == \"Conflicts\")'
+
+ # Find locked worktrees
+ jq '.[] | select(.status.worktree_attrs.locked != null)'
# Find worktrees with untracked files
- jq '.[] | select(.status_symbols.status.working_tree.untracked == true)'
+ jq '.[] | select(.status.working_tree.untracked == true)'
# Find worktrees in rebase or merge
- jq '.[] | select(.status_symbols.status.git_operation != \"\")'
+ jq '.[] | select(.status.git_operation != \"\")'
# Get branches ahead of main
- jq '.[] | select(.status_symbols.status.main_divergence == \"Ahead\")'")]
+ jq '.[] | select(.status.main_divergence == \"Ahead\")'")]
List {
/// Output format
#[arg(long, value_enum, default_value = "table")]
diff --git a/src/commands/list/collect.rs b/src/commands/list/collect.rs
index ba8e11ec1..8fc01cd14 100644
--- a/src/commands/list/collect.rs
+++ b/src/commands/list/collect.rs
@@ -194,14 +194,14 @@ fn compute_item_status_symbols(
// Full status computation for worktrees
// Use base_branch directly (None for primary worktree)
- // Worktree attributes (used directly from data instead of separate Worktree)
- let mut worktree_attrs = String::new();
- if data.locked.is_some() {
- worktree_attrs.push('⊠');
- }
- if data.prunable.is_some() {
- worktree_attrs.push('⚠');
- }
+ // Worktree attributes - priority: prunable > locked (1 char max)
+ let worktree_attrs = if data.prunable.is_some() {
+ "⌫".to_string() // Prunable (directory missing)
+ } else if data.locked.is_some() {
+ "⊠".to_string() // Locked (protected)
+ } else {
+ String::new()
+ };
// Determine branch state (only for non-primary worktrees with base branch)
let branch_state = determine_worktree_branch_state(
@@ -240,6 +240,8 @@ fn compute_item_status_symbols(
branch_state,
git_operation,
worktree_attrs,
+ locked: data.locked.clone(),
+ prunable: data.prunable.clone(),
main_divergence,
upstream_divergence,
working_tree: data
@@ -280,6 +282,8 @@ fn compute_item_status_symbols(
branch_state,
git_operation: GitOperation::None,
worktree_attrs: "⎇".to_string(), // Branch indicator
+ locked: None,
+ prunable: None,
main_divergence,
upstream_divergence,
working_tree: String::new(),
diff --git a/src/commands/list/model.rs b/src/commands/list/model.rs
index 73eef6e2f..ad793f9f1 100644
--- a/src/commands/list/model.rs
+++ b/src/commands/list/model.rs
@@ -61,7 +61,9 @@ pub struct WorktreeData {
pub path: PathBuf,
pub bare: bool,
pub detached: bool,
+ #[serde(skip)]
pub locked: Option<String>,
+ #[serde(skip)]
pub prunable: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub working_tree_diff: Option<LineDiff>,
@@ -186,7 +188,7 @@ pub struct ListItem {
/// CI/PR status: None = not loaded, Some(None) = no CI, Some(Some(status)) = has CI
pub pr_status: Option<Option<PrStatus>>,
/// Git status symbols - None until all dependencies are ready
- #[serde(skip_serializing_if = "Option::is_none")]
+ #[serde(flatten, skip_serializing_if = "Option::is_none")]
pub status_symbols: Option<StatusSymbols>,
// Display fields for json-pretty format (with ANSI colors)
@@ -455,7 +457,7 @@ impl PositionMask {
1, // POS_0C_GIT_OPERATION: ↻ or ⋈ (1 char)
1, // POS_1_MAIN_DIVERGENCE: ↑, ↓, ↕ (1 char)
1, // POS_2_UPSTREAM_DIVERGENCE: ⇡, ⇣, ⇅ (1 char)
- 2, // POS_0D_WORKTREE_ATTRS: ⎇ for branches (1 char), ⊠⚠ for worktrees (max 2, bare filtered out)
+ 1, // POS_0D_WORKTREE_ATTRS: ⎇ for branches, ⌫⊠ for worktrees (priority-only: prunable > locked)
2, // POS_4_USER_STATUS: single emoji or two chars (allocate 2)
],
};
@@ -471,7 +473,7 @@ impl PositionMask {
/// Symbols are categorized to enable vertical alignment in table output:
/// - Position 0a: Conflicts or branch state (=, ≠, ≡, ∅) - mutually exclusive
/// - Position 0c: Git operation (↻, ⋈)
-/// - Position 0d: Item attributes (⎇ for branches, ⊠⚠ for worktrees)
+/// - Position 0d: Item attributes (⎇ for branches, ⌫⊠ for worktrees - priority-only)
/// - Position 1: Main branch divergence (↑, ↓, ↕)
/// - Position 2: Remote/upstream divergence (⇡, ⇣, ⇅)
/// - Position 3: Working tree symbols (?, !, +, », ✘)
@@ -480,14 +482,16 @@ impl PositionMask {
/// ## Mutual Exclusivity
///
/// **Mutually exclusive (enforced by type system):**
-/// - = vs ≠ vs ≡ vs ∅: ConflictsOrBranchState enum (combined position)
+/// - = vs ≠ vs ≡ vs ∅: BranchState enum (combined position)
/// - ↻ vs ⋈: Git operation (GitOperation enum)
/// - ↑ vs ↓ vs ↕: Main divergence (MainDivergence enum)
/// - ⇡ vs ⇣ vs ⇅: Upstream divergence (UpstreamDivergence enum)
///
+/// **Priority-only (can co-occur but only highest priority shown):**
+/// - ⌫ vs ⊠: Worktree attrs (priority: prunable ⌫ > locked ⊠)
+/// - ⎇: Branch indicator (mutually exclusive with ⌫⊠ as branches can't have worktree attrs)
+///
/// **NOT mutually exclusive (can co-occur):**
-/// - ⊠, ⚠: Worktree can be locked+prunable (bare is filtered out)
-/// - ⎇: Branch indicator (mutually exclusive with ⊠⚠ as branches can't have worktree attrs)
/// - All working tree symbols (?!+»✘): Can have multiple types of changes
#[derive(Debug, Clone, Default)]
pub struct StatusSymbols {
@@ -500,10 +504,16 @@ pub struct StatusSymbols {
/// Position 0c - MUTUALLY EXCLUSIVE (enforced by enum)
pub(crate) git_operation: GitOperation,
- /// Item type attributes: ⎇ for branches, ⊠⚠ for worktree attrs (locked/prunable)
- /// Position 0d - NOT mutually exclusive (worktree attrs can combine like "⊠⚠")
+ /// Item type attributes: ⎇ for branches, ⌫⊠ for worktrees (priority-only: prunable > locked)
+ /// Position 0d - Priority-only rendering (shows highest priority symbol when multiple states exist)
pub(crate) worktree_attrs: String,
+ /// Worktree locked status - None for branches, Some("reason") or None for worktrees
+ pub(crate) locked: Option<String>,
+
+ /// Worktree prunable status - None for branches, Some("reason") or None for worktrees
+ pub(crate) prunable: Option<String>,
+
/// Main branch divergence state
/// Position 1 - MUTUALLY EXCLUSIVE (enforced by enum)
pub(crate) main_divergence: MainDivergence,
@@ -581,7 +591,7 @@ impl StatusSymbols {
String::new()
};
let worktree_attrs_str = if !self.worktree_attrs.is_empty() {
- // Branch indicator (⎇) is informational (dimmed), worktree attrs (⊠⚠) are warnings (yellow)
+ // Branch indicator (⎇) is informational (dimmed), worktree attrs (⌫⊠) are warnings (yellow)
if self.worktree_attrs == "⎇" {
format!("{HINT}{}{HINT:#}", self.worktree_attrs)
} else {
@@ -706,11 +716,20 @@ impl WorkingTreeChanges {
}
}
+/// Worktree attributes in status (locked/prunable info)
+#[derive(Debug, Clone, serde::Serialize)]
+struct WorktreeAttrsStatus {
+ locked: Option<String>,
+ prunable: Option<String>,
+}
+
/// Status variant names (for queryability)
#[derive(Debug, Clone, serde::Serialize)]
struct StatusValues {
branch_state: &'static str,
git_operation: &'static str,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ worktree_attrs: Option<WorktreeAttrsStatus>,
main_divergence: &'static str,
upstream_divergence: &'static str,
working_tree: WorkingTreeChanges,
@@ -723,6 +742,7 @@ struct StatusValues {
struct StatusSymbolsOnly {
branch_state: String,
git_operation: String,
+ worktree_attrs: String,
main_divergence: String,
upstream_divergence: String,
working_tree: String,
@@ -767,9 +787,20 @@ impl serde::Serialize for StatusSymbols {
UpstreamDivergence::Diverged => "Diverged",
};
+ // Create worktree_attrs status if this is a worktree (has locked/prunable)
+ let worktree_attrs_status = if self.locked.is_some() || self.prunable.is_some() {
+ Some(WorktreeAttrsStatus {
+ locked: self.locked.clone(),
+ prunable: self.prunable.clone(),
+ })
+ } else {
+ None
+ };
+
let status_values = StatusValues {
branch_state: branch_state_variant,
git_operation: git_operation_variant,
+ worktree_attrs: worktree_attrs_status,
main_divergence: main_divergence_variant,
upstream_divergence: upstream_divergence_variant,
working_tree: WorkingTreeChanges::from_symbols(&self.working_tree),
@@ -779,6 +810,7 @@ impl serde::Serialize for StatusSymbols {
let status_symbols = StatusSymbolsOnly {
branch_state: self.branch_state.to_string(),
git_operation: self.git_operation.to_string(),
+ worktree_attrs: self.worktree_attrs.clone(),
main_divergence: self.main_divergence.to_string(),
upstream_divergence: self.upstream_divergence.to_string(),
working_tree: self.working_tree.clone(),
diff --git a/tests/snapshots/integration__integration_tests__list__json_with_display_fields.snap b/tests/snapshots/integration__integration_tests__list__json_with_display_fields.snap
index 2134fe9c1..ffe18e2cc 100644
--- a/tests/snapshots/integration__integration_tests__list__json_with_display_fields.snap
+++ b/tests/snapshots/integration__integration_tests__list__json_with_display_fields.snap
@@ -16,7 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp3ZxZaG/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpxzd3Tx/test-config.toml
---
success: true
exit_code: 0
@@ -31,34 +31,31 @@ exit_code: 0
"upstream_ahead": 0,
"upstream_behind": 0,
"pr_status": null,
- "status_symbols": {
- "status": {
- "branch_state": "",
- "git_operation": "",
- "main_divergence": "",
- "upstream_divergence": "",
- "working_tree": {
- "untracked": false,
- "modified": false,
- "staged": false,
- "renamed": false,
- "deleted": false
- }
- },
- "status_symbols": {
- "branch_state": "",
- "git_operation": "",
- "main_divergence": "",
- "upstream_divergence": "",
- "working_tree": ""
+ "status": {
+ "branch_state": "",
+ "git_operation": "",
+ "main_divergence": "",
+ "upstream_divergence": "",
+ "working_tree": {
+ "untracked": false,
+ "modified": false,
+ "staged": false,
+ "renamed": false,
+ "deleted": false
}
},
+ "status_symbols": {
+ "branch_state": "",
+ "git_operation": "",
+ "worktree_attrs": "",
+ "main_divergence": "",
+ "upstream_divergence": "",
+ "working_tree": ""
+ },
"type": "worktree",
"path": "[REPO]",
"bare": false,
"detached": false,
- "locked": null,
- "prunable": null,
"working_tree_diff": {
"added": 0,
"deleted": 0
@@ -85,36 +82,33 @@ exit_code: 0
"upstream_ahead": 0,
"upstream_behind": 0,
"pr_status": null,
- "status_symbols": {
- "status": {
- "branch_state": "",
- "git_operation": "",
- "main_divergence": "Diverged",
- "upstream_divergence": "",
- "working_tree": {
- "untracked": true,
- "modified": true,
- "staged": false,
- "renamed": false,
- "deleted": false
- }
- },
- "status_symbols": {
- "branch_state": "",
- "git_operation": "",
- "main_divergence": "↕",
- "upstream_divergence": "",
- "working_tree": "?!"
+ "status": {
+ "branch_state": "",
+ "git_operation": "",
+ "main_divergence": "Diverged",
+ "upstream_divergence": "",
+ "working_tree": {
+ "untracked": true,
+ "modified": true,
+ "staged": false,
+ "renamed": false,
+ "deleted": false
}
},
+ "status_symbols": {
+ "branch_state": "",
+ "git_operation": "",
+ "worktree_attrs": "",
+ "main_divergence": "↕",
+ "upstream_divergence": "",
+ "working_tree": "?!"
+ },
"commits_display": "/u001b[32m↑2/u001b[0m /u001b[2m/u001b[31m↓2/u001b[0m",
"branch_diff_display": "/u001b[32m+1/u001b[0m",
"type": "worktree",
"path": "[WORKTREE_FEATURE_AHEAD]",
"bare": false,
"detached": false,
- "locked": null,
- "prunable": null,
"working_tree_diff": {
"added": 1,
"deleted": 1
@@ -139,35 +133,32 @@ exit_code: 0
"upstream_ahead": 0,
"upstream_behind": 0,
"pr_status": null,
- "status_symbols": {
- "status": {
- "branch_state": "NoCommits",
- "git_operation": "",
- "main_divergence": "Behind",
- "upstream_divergence": "",
- "working_tree": {
- "untracked": false,
- "modified": false,
- "staged": false,
- "renamed": false,
- "deleted": false
- }
- },
- "status_symbols": {
- "branch_state": "∅",
- "git_operation": "",
- "main_divergence": "↓",
- "upstream_divergence": "",
- "working_tree": ""
+ "status": {
+ "branch_state": "NoCommits",
+ "git_operation": "",
+ "main_divergence": "Behind",
+ "upstream_divergence": "",
+ "working_tree": {
+ "untracked": false,
+ "modified": false,
+ "staged": false,
+ "renamed": false,
+ "deleted": false
}
},
+ "status_symbols": {
+ "branch_state": "∅",
+ "git_operation": "",
+ "worktree_attrs": "",
+ "main_divergence": "↓",
+ "upstream_divergence": "",
+ "working_tree": ""
+ },
"commits_display": "/u001b[2m/u001b[31m↓2/u001b[0m",
"type": "worktree",
"path": "[WORKTREE_FEATURE_BEHIND]",
"bare": false,
"detached": false,
- "locked": null,
- "prunable": null,
"working_tree_diff": {
"added": 0,
"deleted": 0
diff --git a/tests/snapshots/integration__integration_tests__list__json_with_metadata.snap b/tests/snapshots/integration__integration_tests__list__json_with_metadata.snap
index 269aa821e..b3e9036ce 100644
--- a/tests/snapshots/integration__integration_tests__list__json_with_metadata.snap
+++ b/tests/snapshots/integration__integration_tests__list__json_with_metadata.snap
@@ -16,7 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpoIbuZx/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpbe2hMc/test-config.toml
---
success: true
exit_code: 0
@@ -31,34 +31,31 @@ exit_code: 0
"upstream_ahead": 0,
"upstream_behind": 0,
"pr_status": null,
- "status_symbols": {
- "status": {
- "branch_state": "",
- "git_operation": "",
- "main_divergence": "",
- "upstream_divergence": "",
- "working_tree": {
- "untracked": false,
- "modified": false,
- "staged": false,
- "renamed": false,
- "deleted": false
- }
- },
- "status_symbols": {
- "branch_state": "",
- "git_operation": "",
- "main_divergence": "",
- "upstream_divergence": "",
- "working_tree": ""
+ "status": {
+ "branch_state": "",
+ "git_operation": "",
+ "main_divergence": "",
+ "upstream_divergence": "",
+ "working_tree": {
+ "untracked": false,
+ "modified": false,
+ "staged": false,
+ "renamed": false,
+ "deleted": false
}
},
+ "status_symbols": {
+ "branch_state": "",
+ "git_operation": "",
+ "worktree_attrs": "",
+ "main_divergence": "",
+ "upstream_divergence": "",
+ "working_tree": ""
+ },
"type": "worktree",
"path": "[REPO]",
"bare": false,
"detached": false,
- "locked": null,
- "prunable": null,
"working_tree_diff": {
"added": 0,
"deleted": 0
@@ -85,34 +82,31 @@ exit_code: 0
"upstream_ahead": 0,
"upstream_behind": 0,
"pr_status": null,
- "status_symbols": {
- "status": {
- "branch_state": "MatchesMain",
- "git_operation": "",
- "main_divergence": "",
- "upstream_divergence": "",
- "working_tree": {
- "untracked": false,
- "modified": false,
- "staged": false,
- "renamed": false,
- "deleted": false
- }
- },
- "status_symbols": {
- "branch_state": "≡",
- "git_operation": "",
- "main_divergence": "",
- "upstream_divergence": "",
- "working_tree": ""
+ "status": {
+ "branch_state": "MatchesMain",
+ "git_operation": "",
+ "main_divergence": "",
+ "upstream_divergence": "",
+ "working_tree": {
+ "untracked": false,
+ "modified": false,
+ "staged": false,
+ "renamed": false,
+ "deleted": false
}
},
+ "status_symbols": {
+ "branch_state": "≡",
+ "git_operation": "",
+ "worktree_attrs": "",
+ "main_divergence": "",
+ "upstream_divergence": "",
+ "working_tree": ""
+ },
"type": "worktree",
"path": "[WORKTREE_FEATURE_DETACHED]",
"bare": false,
"detached": false,
- "locked": null,
- "prunable": null,
"working_tree_diff": {
"added": 0,
"deleted": 0
@@ -139,34 +133,35 @@ exit_code: 0
"upstream_ahead": 0,
"upstream_behind": 0,
"pr_status": null,
- "status_symbols": {
- "status": {
- "branch_state": "MatchesMain",
- "git_operation": "",
- "main_divergence": "",
- "upstream_divergence": "",
- "working_tree": {
- "untracked": false,
- "modified": false,
- "staged": false,
- "renamed": false,
- "deleted": false
- }
+ "status": {
+ "branch_state": "MatchesMain",
+ "git_operation": "",
+ "worktree_attrs": {
+ "locked": "Testing",
+ "prunable": null
},
- "status_symbols": {
- "branch_state": "≡",
- "git_operation": "",
- "main_divergence": "",
- "upstream_divergence": "",
- "working_tree": ""
+ "main_divergence": "",
+ "upstream_divergence": "",
+ "working_tree": {
+ "untracked": false,
+ "modified": false,
+ "staged": false,
+ "renamed": false,
+ "deleted": false
}
},
+ "status_symbols": {
+ "branch_state": "≡",
+ "git_operation": "",
+ "worktree_attrs": "⊠",
+ "main_divergence": "",
+ "upstream_divergence": "",
+ "working_tree": ""
+ },
"type": "worktree",
"path": "[WORKTREE_LOCKED_FEATURE]",
"bare": false,
"detached": false,
- "locked": "Testing",
- "prunable": null,
"working_tree_diff": {
"added": 0,
"deleted": 0
diff --git a/tests/snapshots/integration__integration_tests__list__json_with_user_status.snap b/tests/snapshots/integration__integration_tests__list__json_with_user_status.snap
index c4b0994cc..32d624c78 100644
--- a/tests/snapshots/integration__integration_tests__list__json_with_user_status.snap
+++ b/tests/snapshots/integration__integration_tests__list__json_with_user_status.snap
@@ -16,7 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpQuUWBO/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp82oCWF/test-config.toml
---
success: true
exit_code: 0
@@ -31,34 +31,31 @@ exit_code: 0
"upstream_ahead": 0,
"upstream_behind": 0,
"pr_status": null,
- "status_symbols": {
- "status": {
- "branch_state": "",
- "git_operation": "",
- "main_divergence": "",
- "upstream_divergence": "",
- "working_tree": {
- "untracked": false,
- "modified": false,
- "staged": false,
- "renamed": false,
- "deleted": false
- }
- },
- "status_symbols": {
- "branch_state": "",
- "git_operation": "",
- "main_divergence": "",
- "upstream_divergence": "",
- "working_tree": ""
+ "status": {
+ "branch_state": "",
+ "git_operation": "",
+ "main_divergence": "",
+ "upstream_divergence": "",
+ "working_tree": {
+ "untracked": false,
+ "modified": false,
+ "staged": false,
+ "renamed": false,
+ "deleted": false
}
},
+ "status_symbols": {
+ "branch_state": "",
+ "git_operation": "",
+ "worktree_attrs": "",
+ "main_divergence": "",
+ "upstream_divergence": "",
+ "working_tree": ""
+ },
"type": "worktree",
"path": "[REPO]",
"bare": false,
"detached": false,
- "locked": null,
- "prunable": null,
"working_tree_diff": {
"added": 0,
"deleted": 0
@@ -85,36 +82,33 @@ exit_code: 0
"upstream_ahead": 0,
"upstream_behind": 0,
"pr_status": null,
- "status_symbols": {
- "status": {
- "branch_state": "MatchesMain",
- "git_operation": "",
- "main_divergence": "",
- "upstream_divergence": "",
- "working_tree": {
- "untracked": false,
- "modified": false,
- "staged": false,
- "renamed": false,
- "deleted": false
- },
- "user_status": "🔧"
+ "status": {
+ "branch_state": "MatchesMain",
+ "git_operation": "",
+ "main_divergence": "",
+ "upstream_divergence": "",
+ "working_tree": {
+ "untracked": false,
+ "modified": false,
+ "staged": false,
+ "renamed": false,
+ "deleted": false
},
- "status_symbols": {
- "branch_state": "≡",
- "git_operation": "",
- "main_divergence": "",
- "upstream_divergence": "",
- "working_tree": "",
- "user_status": "🔧"
- }
+ "user_status": "🔧"
+ },
+ "status_symbols": {
+ "branch_state": "≡",
+ "git_operation": "",
+ "worktree_attrs": "",
+ "main_divergence": "",
+ "upstream_divergence": "",
+ "working_tree": "",
+ "user_status": "🔧"
},
"type": "worktree",
"path": "[WORKTREE_WITH_STATUS]",
"bare": false,
"detached": false,
- "locked": null,
- "prunable": null,
"working_tree_diff": {
"added": 0,
"deleted": 0
@@ -141,34 +135,31 @@ exit_code: 0
"upstream_ahead": 0,
"upstream_behind": 0,
"pr_status": null,
- "status_symbols": {
- "status": {
- "branch_state": "MatchesMain",
- "git_operation": "",
- "main_divergence": "",
- "upstream_divergence": "",
- "working_tree": {
- "untracked": false,
- "modified": false,
- "staged": false,
- "renamed": false,
- "deleted": false
- }
- },
- "status_symbols": {
- "branch_state": "≡",
- "git_operation": "",
- "main_divergence": "",
- "upstream_divergence": "",
- "working_tree": ""
+ "status": {
+ "branch_state": "MatchesMain",
+ "git_operation": "",
+ "main_divergence": "",
+ "upstream_divergence": "",
+ "working_tree": {
+ "untracked": false,
+ "modified": false,
+ "staged": false,
+ "renamed": false,
+ "deleted": false
}
},
+ "status_symbols": {
+ "branch_state": "≡",
+ "git_operation": "",
+ "worktree_attrs": "",
+ "main_divergence": "",
+ "upstream_divergence": "",
+ "working_tree": ""
+ },
"type": "worktree",
"path": "[WORKTREE_WITHOUT_STATUS]",
"bare": false,
"detached": false,
- "locked": null,
- "prunable": null,
"working_tree_diff": {
"added": 0,
"deleted": 0
diff --git a/tests/snapshots/integration__integration_tests__list__large_diffs_alignment.snap b/tests/snapshots/integration__integration_tests__list__large_diffs_alignment.snap
index c66f99463..06014ea67 100644
--- a/tests/snapshots/integration__integration_tests__list__large_diffs_alignment.snap
+++ b/tests/snapshots/integration__integration_tests__list__large_diffs_alignment.snap
@@ -15,7 +15,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpxDz88E/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpI9FtJQ/test-config.toml
---
success: true
exit_code: 0
@@ -24,8 +24,8 @@ exit_code: 0
----- stderr -----
Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
main ./test-repo b834638e 10 months ago Initial commit
-diverged ! ↑ 💬 +40 -60 ↑1 ./diverged 8ba5aa92 10 months ago Diverged commit
-feature-changes ?! ↑ 🤖 +50 -100 ↑1 ./feature-changes b854b166 10 months ago Add 100 lines
-fix ? ≡ 💬 ./fix b834638e 10 months ago Initial commit
+diverged ! ↑ 💬 +40 -60 ↑1 ./diverged 8ba5aa92 10 months ago Diverged commit
+feature-changes ?! ↑ 🤖 +50 -100 ↑1 ./feature-changes b854b166 10 months ago Add 100 lines
+fix ? ≡ 💬 ./fix b834638e 10 months ago Initial commit
⚪ Showing 4 worktrees, 2 with changes, 2 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__maximum_status_symbols.snap b/tests/snapshots/integration__integration_tests__list__maximum_status_symbols.snap
index d241c1b44..cdf328d1b 100644
--- a/tests/snapshots/integration__integration_tests__list__maximum_status_symbols.snap
+++ b/tests/snapshots/integration__integration_tests__list__maximum_status_symbols.snap
@@ -16,7 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpIcYH1R/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpLJgbF4/test-config.toml
---
success: true
exit_code: 0
@@ -25,6 +25,6 @@ exit_code: 0
----- stderr -----
Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
main ./test-repo 85ed6d3d 10 months ago Main advances
-feature ?!+»✘= ↕[UPSTREAM]⊠ 🤖 +2 -2 ↑2 ↓[N] +3 -1 ./feature ↑1 ↓[N] 4afb2b9e 10 months ago Local commit
+feature ?!+»✘= ↕[UPSTREAM]⊠🤖 +2 -2 ↑2 ↓[N] +3 -1 ./feature ↑1 ↓[N] 4afb2b9e 10 months ago Local commit
⚪ Showing 2 worktrees, 1 with changes, 1 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__maximum_status_with_git_operation.snap b/tests/snapshots/integration__integration_tests__list__maximum_status_with_git_operation.snap
index b7fec3954..39c13037f 100644
--- a/tests/snapshots/integration__integration_tests__list__maximum_status_with_git_operation.snap
+++ b/tests/snapshots/integration__integration_tests__list__maximum_status_with_git_operation.snap
@@ -16,7 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpAe8Z2r/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpzM5YDA/test-config.toml
---
success: true
exit_code: 0
@@ -25,6 +25,6 @@ exit_code: 0
----- stderr -----
Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
main ./test-repo b7c14ce1 10 months ago Main conflicting changes
-feature ?!+ ↻ ⊠ 🤖 +7 ./feature b7c14ce1 10 months ago Main conflicting changes
+feature ?!+ ↻ ⊠🤖 +7 ./feature b7c14ce1 10 months ago Main conflicting changes
⚪ Showing 2 worktrees, 1 with changes
diff --git a/tests/snapshots/integration__integration_tests__list__status_column_padding_emoji.snap b/tests/snapshots/integration__integration_tests__list__status_column_padding_emoji.snap
index 57ac3da68..1e531c4cb 100644
--- a/tests/snapshots/integration__integration_tests__list__status_column_padding_emoji.snap
+++ b/tests/snapshots/integration__integration_tests__list__status_column_padding_emoji.snap
@@ -15,7 +15,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpb8va56/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpnstGyk/test-config.toml
---
success: true
exit_code: 0
@@ -24,8 +24,8 @@ exit_code: 0
----- stderr -----
Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
main ./test-repo b834638e 10 months ago Initial commit
-main-symbol ↑ 💬 ↑1 ./main-symbol 579fcd0b 10 months ago Symbol commit
-pr-link ↑ 🤖 ↑1 ./pr-link e17e7d2d 10 months ago PR commit
-wli-sequence ?! ↑ 🤖 +1 -112 ↑1 ./wli-sequence a2483ffd 10 months ago Initial content
+main-symbol ↑ 💬 ↑1 ./main-symbol 579fcd0b 10 months ago Symbol commit
+pr-link ↑ 🤖 ↑1 ./pr-link e17e7d2d 10 months ago PR commit
+wli-sequence ?! ↑ 🤖 +1 -112 ↑1 ./wli-sequence a2483ffd 10 months ago Initial content
⚪ Showing 4 worktrees, 1 with changes, 3 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__user_status_special_chars.snap b/tests/snapshots/integration__integration_tests__list__user_status_special_chars.snap
index eaf56c3ab..a4b3541c0 100644
--- a/tests/snapshots/integration__integration_tests__list__user_status_special_chars.snap
+++ b/tests/snapshots/integration__integration_tests__list__user_status_special_chars.snap
@@ -15,7 +15,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpF2UQYP/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp5xtvvU/test-config.toml
---
success: true
exit_code: 0
@@ -24,7 +24,7 @@ exit_code: 0
----- stderr -----
Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
main ./test-repo b834638e 10 months ago Initial commit
-emoji ≡ 🔄 ./emoji b834638e 10 months ago Initial commit
-multi ≡ 👨‍💻 ./multi b834638e 10 months ago Initial commit
+emoji ≡ 🔄 ./emoji b834638e 10 months ago Initial commit
+multi ≡ 👨‍💻 ./multi b834638e 10 months ago Initial commit
⚪ Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__with_user_status.snap b/tests/snapshots/integration__integration_tests__list__with_user_status.snap
index 3916b1e2e..518004810 100644
--- a/tests/snapshots/integration__integration_tests__list__with_user_status.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_user_status.snap
@@ -15,7 +15,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpnByLU2/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp5RlB2P/test-config.toml
---
success: true
exit_code: 0
@@ -25,8 +25,8 @@ exit_code: 0
Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
main ./test-repo b834638e 10 months ago Initial commit
clean-no-status ≡ ./clean-no-status b834638e 10 months ago Initial commit
-clean-with-status ≡ 💬 ./clean-with-status b834638e 10 months ago Initial commit
+clean-with-status ≡ 💬 ./clean-with-status b834638e 10 months ago Initial commit
dirty-no-status ! +1 -1 ./dirty-no-status b834638e 10 months ago Initial commit
-dirty-with-status ? ≡ 🤖 ./dirty-with-status b834638e 10 months ago Initial commit
+dirty-with-status ? ≡ 🤖 ./dirty-with-status b834638e 10 months ago Initial commit
⚪ Showing 5 worktrees, 1 with changes