Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
feat: Add Status column to list command and update upstream tracking
Maximilian Roos5be77b7f9641
diff --git a/src/commands/list/columns.rs b/src/commands/list/columns.rsindex ed4b70a57..94f67faa1 100644--- a/src/commands/list/columns.rs+++ b/src/commands/list/columns.rs@@ -2,6 +2,7 @@#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]pub enum ColumnKind {Branch,+ Status,WorkingDiff,AheadBehind,BranchDiff,@@ -63,83 +64,91 @@ pub const COLUMN_SPECS: &[ColumnSpec] = &[0,),ColumnSpec::new(- ColumnKind::WorkingDiff,- super::layout::HEADER_WORKING_DIFF,+ ColumnKind::Status,+ super::layout::HEADER_STATUS,2,false,false,1,),ColumnSpec::new(- ColumnKind::AheadBehind,- super::layout::HEADER_AHEAD_BEHIND,+ ColumnKind::WorkingDiff,+ super::layout::HEADER_WORKING_DIFF,3,false,false,2,),+ ColumnSpec::new(+ ColumnKind::AheadBehind,+ super::layout::HEADER_AHEAD_BEHIND,+ 4,+ false,+ false,+ 3,+ ),ColumnSpec::new(ColumnKind::BranchDiff,super::layout::HEADER_BRANCH_DIFF,- 4,+ 5,true,false,- 3,+ 4,),ColumnSpec::new(ColumnKind::States,super::layout::HEADER_STATE,- 5,+ 6,false,false,- 4,+ 5,),ColumnSpec::new(ColumnKind::Path,super::layout::HEADER_PATH,- 6,+ 7,false,false,- 5,+ 6,),ColumnSpec::new(ColumnKind::Upstream,super::layout::HEADER_UPSTREAM,- 7,+ 8,false,false,- 6,+ 7,),ColumnSpec::new(ColumnKind::CiStatus,super::layout::HEADER_CI,- 8,+ 9,false,true,- 7,+ 8,),ColumnSpec::new(ColumnKind::Commit,super::layout::HEADER_COMMIT,- 9,+ 10,false,false,- 8,+ 9,),ColumnSpec::new(ColumnKind::Time,super::layout::HEADER_AGE,- 10,+ 11,false,false,- 9,+ 10,),ColumnSpec::new(ColumnKind::Message,super::layout::HEADER_MESSAGE,- 11,+ 12,false,false,- 10,+ 11,),];diff --git a/src/commands/list/layout.rs b/src/commands/list/layout.rsindex 12d15fe0c..ae3e28368 100644--- a/src/commands/list/layout.rs+++ b/src/commands/list/layout.rs@@ -128,6 +128,7 @@ const COMMIT_HASH_WIDTH: usize = 8;/// Column header labels - single source of truth for all column headers./// Both layout calculations and rendering use these constants.pub const HEADER_BRANCH: &str = "Branch";+pub const HEADER_STATUS: &str = "Status";pub const HEADER_WORKING_DIFF: &str = "Working ±";pub const HEADER_AHEAD_BEHIND: &str = "Main ↕";pub const HEADER_BRANCH_DIFF: &str = "Main ±";@@ -221,6 +222,7 @@ pub struct DiffWidths {pub struct ColumnWidths {pub branch: usize,+ pub status: usize,pub time: usize,pub ci_status: usize,pub message: usize,@@ -234,6 +236,7 @@ pub struct ColumnWidths {/// Tracks which columns have actual data (vs just headers)#[derive(Clone, Copy, Debug)]pub struct ColumnDataFlags {+ pub status: bool,pub working_diff: bool,pub ahead_behind: bool,pub branch_diff: bool,@@ -247,6 +250,7 @@ const EMPTY_PENALTY: u8 = 10;fn column_has_data(kind: ColumnKind, flags: &ColumnDataFlags) -> bool {match kind {ColumnKind::Branch => true,+ ColumnKind::Status => flags.status,ColumnKind::WorkingDiff => flags.working_diff,ColumnKind::AheadBehind => flags.ahead_behind,ColumnKind::BranchDiff => flags.branch_diff,@@ -353,6 +357,7 @@ fn ideal_for_column() -> Option<ColumnIdeal> {match spec.kind {ColumnKind::Branch => ColumnIdeal::text(widths.branch),+ ColumnKind::Status => ColumnIdeal::text(widths.status),ColumnKind::States => ColumnIdeal::text(widths.states),ColumnKind::Path => ColumnIdeal::text(max_path_width),ColumnKind::Time => ColumnIdeal::text(widths.time),@@ -372,6 +377,7 @@ pub fn calculate_column_widths() -> (ColumnWidths, ColumnDataFlags) {// Track maximum data widths (headers are enforced via fit_header() later)let mut max_branch = 0;+ let mut max_status = 0;let mut max_time = 0;let mut max_message = 0;let mut max_states = 0;@@ -398,6 +404,13 @@ pub fn calculate_column_widths(// Branch namemax_branch = max_branch.max(item.branch_name().width());+ // Status symbols (worktrees only)+ if let Some(info) = worktree_info+ && !info.status_symbols.is_empty()+ {+ max_status = max_status.max(info.status_symbols.width());+ }+// Timelet time_str = crate::display::format_relative_time(commit.timestamp);max_time = max_time.max(time_str.width());@@ -464,6 +477,9 @@ pub fn calculate_column_widths(max_upstream_behind_digits,);+ let has_status_data = max_status > 0;+ let final_status = fit_header(HEADER_STATUS, max_status);+let has_states_data = max_states > 0;let final_states = fit_header(HEADER_STATE, max_states);@@ -474,6 +490,7 @@ pub fn calculate_column_widths(let widths = ColumnWidths {branch: fit_header(HEADER_BRANCH, max_branch),+ status: final_status,time: fit_header(HEADER_AGE, max_time),ci_status: fit_header(HEADER_CI, ci_status_width),message: fit_header(HEADER_MESSAGE, max_message),@@ -485,6 +502,7 @@ pub fn calculate_column_widths(};let data_flags = ColumnDataFlags {+ status: has_status_data,working_diff: working_diff.added_digits > 0 || working_diff.deleted_digits > 0,ahead_behind: ahead_behind.added_digits > 0 || ahead_behind.deleted_digits > 0,branch_diff: branch_diff.added_digits > 0 || branch_diff.deleted_digits > 0,@@ -681,6 +699,7 @@ mod tests {worktree_state: None,pr_status: None,has_conflicts: false,+ status_symbols: String::new(),display: DisplayFields::default(),working_diff_display: None,};@@ -755,6 +774,7 @@ mod tests {worktree_state: None,pr_status: None,has_conflicts: false,+ status_symbols: String::new(),display: DisplayFields::default(),working_diff_display: None,};@@ -828,6 +848,7 @@ mod tests {worktree_state: None,pr_status: None,has_conflicts: false,+ status_symbols: String::new(),display: DisplayFields::default(),working_diff_display: None,};@@ -902,6 +923,7 @@ mod tests {worktree_state: None, // Hidden: no statepr_status: None,has_conflicts: false,+ status_symbols: String::new(),display: DisplayFields::default(),working_diff_display: None,};diff --git a/src/commands/list/model.rs b/src/commands/list/model.rsindex 3c75f8866..4254399e4 100644--- a/src/commands/list/model.rs+++ b/src/commands/list/model.rs@@ -41,6 +41,8 @@ pub struct WorktreeInfo {pub worktree_state: Option<String>,pub pr_status: Option<PrStatus>,pub has_conflicts: bool,+ /// Git status symbols (=, ↑, ↓, ⇡, ⇣, ?, !, +, », ✘) indicating working tree state+ pub status_symbols: String,// Display fields for json-pretty format (with ANSI colors)#[serde(flatten)]@@ -308,6 +310,126 @@ impl BranchInfo {}}+/// Git status information parsed from `git status --porcelain`+// TODO: Consider using a struct with bool fields instead of String for symbols+// (has_untracked, has_modified, has_staged, has_renamed, has_deleted, has_conflicts,+// main_ahead, main_behind, upstream_ahead, upstream_behind)+// Would enable querying individual states, but currently only used for display.+struct GitStatusInfo {+ /// Whether the working tree has any changes (staged or unstaged)+ is_dirty: bool,+ /// Status symbols: = (conflicts), ↑ (ahead of main), ↓ (behind main), ⇡ (ahead of remote), ⇣ (behind remote), ? (untracked), ! (modified), + (staged), » (renamed), ✘ (deleted)+ symbols: String,+}++/// Parse git status --porcelain output to determine dirty state and status symbols+/// This combines the dirty check and symbol computation in a single git command+fn parse_git_status(+ repo: &Repository,+ main_ahead: usize,+ main_behind: usize,+ upstream_ahead: usize,+ upstream_behind: usize,+) -> Result<GitStatusInfo, GitError> {+ let status_output = repo.run_command(&["status", "--porcelain"])?;++ let mut has_conflicts = false;+ let mut has_untracked = false;+ let mut has_modified = false;+ let mut has_staged = false;+ let mut has_renamed = false;+ let mut has_deleted = false;+ let mut is_dirty = false;++ for line in status_output.lines() {+ if line.len() < 2 {+ continue;+ }++ is_dirty = true; // Any line means changes exist++ // Get status codes (first two bytes for ASCII compatibility)+ let bytes = line.as_bytes();+ let index_status = bytes[0] as char;+ let worktree_status = bytes[1] as char;++ // Unmerged paths (actual conflicts in working tree)+ // U = unmerged, D = both deleted, A = both added+ if index_status == 'U'+ || worktree_status == 'U'+ || (index_status == 'D' && worktree_status == 'D')+ || (index_status == 'A' && worktree_status == 'A')+ {+ has_conflicts = true;+ }++ // Untracked files+ if index_status == '?' && worktree_status == '?' {+ has_untracked = true;+ }++ // Modified (unstaged changes in working tree)+ if worktree_status == 'M' {+ has_modified = true;+ }++ // Staged files (changes in index)+ // Includes: A (added), M (modified), C (copied), but excludes D/R+ if index_status == 'A' || index_status == 'M' || index_status == 'C' {+ has_staged = true;+ }++ // Renamed files (staged rename)+ if index_status == 'R' {+ has_renamed = true;+ }++ // Deleted files (staged or unstaged)+ if index_status == 'D' || worktree_status == 'D' {+ has_deleted = true;+ }+ }++ let mut symbols = String::with_capacity(10);++ // Symbol order: conflicts (blocking) → branch divergence → working tree changes+ // = (conflicts), ↑↓ (vs main), ⇡⇣ (vs remote), ?!+»✘ (working tree state)+ if has_conflicts {+ symbols.push('=');+ }+ // Main branch: simple arrows+ if main_ahead > 0 {+ symbols.push('↑');+ }+ if main_behind > 0 {+ symbols.push('↓');+ }+ // Upstream/remote: double arrows+ if upstream_ahead > 0 {+ symbols.push('⇡');+ }+ if upstream_behind > 0 {+ symbols.push('⇣');+ }+ if has_untracked {+ symbols.push('?');+ }+ if has_modified {+ symbols.push('!');+ }+ if has_staged {+ symbols.push('+');+ }+ if has_renamed {+ symbols.push('»');+ }+ if has_deleted {+ symbols.push('✘');+ }++ Ok(GitStatusInfo { is_dirty, symbols })+}+impl WorktreeInfo {/// Create WorktreeInfo from a Worktree, enriching it with git metadatafn from_worktree(@@ -322,13 +444,23 @@ impl WorktreeInfo {let commit = CommitDetails::gather(&wt_repo, &wt.head)?;let base_branch = primary.branch.as_deref().filter(|_| !is_primary);let counts = AheadBehind::compute(&wt_repo, base_branch, &wt.head)?;+ let upstream = UpstreamStatus::calculate(&wt_repo, wt.branch.as_deref(), &wt.head)?;- // Fast dirty check - only compute expensive numstat if working tree is dirty- let is_dirty = wt_repo- .run_command(&["diff-index", "--quiet", "HEAD", "--"])- .is_err(); // Exit code 1 = dirty-- let working_tree_diff = if is_dirty {+ // Parse git status once for both dirty check and status symbols+ // Pass both main and upstream ahead/behind counts+ let (upstream_ahead, upstream_behind) = upstream+ .active()+ .map(|(_, ahead, behind)| (ahead, behind))+ .unwrap_or((0, 0));+ let status_info = parse_git_status(+ &wt_repo,+ counts.ahead,+ counts.behind,+ upstream_ahead,+ upstream_behind,+ )?;++ let working_tree_diff = if status_info.is_dirty {wt_repo.working_tree_diff_stats()?} else {(0, 0) // Clean working tree@@ -348,7 +480,7 @@ impl WorktreeInfo {if head_tree == base_tree {// Trees are identical - check if working tree is also clean- if is_dirty {+ if status_info.is_dirty {// Rare case: trees match but working tree has uncommitted changes// Need to compute actual diff to get accurate line countsSome(wt_repo.working_tree_diff_vs_ref(base)?)@@ -365,7 +497,6 @@ impl WorktreeInfo {Some((0, 0)) // Primary worktree always matches itself};let branch_diff = BranchDiffTotals::compute(&wt_repo, base_branch, &wt.head)?;- let upstream = UpstreamStatus::calculate(&wt_repo, wt.branch.as_deref(), &wt.head)?;// Get worktree state (merge/rebase/etc)let worktree_state = wt_repo.worktree_state()?;@@ -400,6 +531,7 @@ impl WorktreeInfo {worktree_state,pr_status,has_conflicts,+ status_symbols: status_info.symbols,display: DisplayFields::default(),working_diff_display: None,})diff --git a/src/commands/list/render.rs b/src/commands/list/render.rsindex 0ff24079d..05edac8d8 100644--- a/src/commands/list/render.rs+++ b/src/commands/list/render.rs@@ -355,6 +355,22 @@ pub fn format_list_item_line(line.push_raw(branch_text);}}+ (ColumnKind::Status, _) => {+ if let Some(info) = worktree_info {+ let status_text = if is_last {+ info.status_symbols.clone()+ } else {+ format!("{:width$}", info.status_symbols, width = column.width)+ };+ if let Some(style) = text_style {+ line.push_styled(status_text, style);+ } else {+ line.push_raw(status_text);+ }+ } else if !is_last {+ push_blank(&mut line, column.width);+ }+ }(ColumnKind::WorkingDiff, ColumnFormat::Diff { digits, variant }) => {if let Some(info) = worktree_info {let (wt_added, wt_deleted) = info.working_tree_diff;diff --git a/src/main.rs b/src/main.rsindex 0c949ed09..374f65afe 100644--- a/src/main.rs+++ b/src/main.rs@@ -147,10 +147,11 @@ enum Commands {#[command(after_help = "\COLUMNS:Branch: Branch name+ Status: Quick status symbols (see STATUS SYMBOLS below)Working ±: Uncommitted changes vs HEAD (+added -deleted lines, staged + unstaged)Main ↕: Commit count ahead↑/behind↓ relative to main (commits in HEAD vs main)Main ± (--full): Line diffs in commits ahead of main (+added -deleted)- State: Status indicators (see STATE VALUES below)+ State: Status indicators (see STATE COLUMN below)Path: Worktree directory locationRemote ↕: Commits ahead↑/behind↓ relative to tracking branch (e.g. origin/branch)CI (--full): CI pipeline status (tries PR/MR checks first, falls back to branch workflows)@@ -165,7 +166,19 @@ COLUMNS:Age: Time since last commit (relative)Message: Last commit message (truncated)-STATE VALUES:+STATUS SYMBOLS:+ = Merge conflicts (unmerged paths in working tree)+ ↑ Ahead of main branch+ ↓ Behind main branch+ ⇡ Ahead of remote tracking branch+ ⇣ Behind remote tracking branch+ ? Untracked files present+ ! Modified files (unstaged changes)+ + Staged files (ready to commit)+ » Renamed files+ ✘ Deleted files++STATE COLUMN:(matches main): Working tree identical to main(no commits): No commits ahead, clean working tree(conflicts): Merge conflicts with maindiff --git a/tests/snapshots/integration__integration_tests__list__json_with_display_fields.snap b/tests/snapshots/integration__integration_tests__list__json_with_display_fields.snapindex 68f2cd70f..5636cfe64 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@@ -1,6 +1,5 @@---source: tests/integration_tests/list.rs-assertion_line: 73info:program: wtargs:@@ -17,7 +16,7 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpTx0Jtg/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpPhSJmc/test-config.toml---success: trueexit_code: 0@@ -56,7 +55,8 @@ exit_code: 0"upstream_behind": 0,"worktree_state": null,"pr_status": null,- "has_conflicts": false+ "has_conflicts": false,+ "status_symbols": ""},{"type": "worktree",@@ -88,6 +88,7 @@ exit_code: 0"worktree_state": null,"pr_status": null,"has_conflicts": false,+ "status_symbols": "↑↓?!","commits_display": "[GREEN]↑2[RESET] [DIM][RED]↓2[RESET]","branch_diff_display": "[GREEN]+1[RESET]","working_diff_display": "[GREEN]+1[RESET] [RED]-1[RESET]"@@ -122,6 +123,7 @@ exit_code: 0"worktree_state": null,"pr_status": null,"has_conflicts": false,+ "status_symbols": "↓","commits_display": "[DIM][RED]↓2[RESET]"}]diff --git a/tests/snapshots/integration__integration_tests__list__json_with_metadata.snap b/tests/snapshots/integration__integration_tests__list__json_with_metadata.snapindex ddc2022ec..0d6c29c51 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: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpRq4uUS/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpoJBBgK/test-config.toml---success: trueexit_code: 0@@ -55,7 +55,8 @@ exit_code: 0"upstream_behind": 0,"worktree_state": null,"pr_status": null,- "has_conflicts": false+ "has_conflicts": false,+ "status_symbols": ""},{"type": "worktree",@@ -90,7 +91,8 @@ exit_code: 0"upstream_behind": 0,"worktree_state": null,"pr_status": null,- "has_conflicts": false+ "has_conflicts": false,+ "status_symbols": ""},{"type": "worktree",@@ -125,7 +127,8 @@ exit_code: 0"upstream_behind": 0,"worktree_state": null,"pr_status": null,- "has_conflicts": false+ "has_conflicts": false,+ "status_symbols": ""}]diff --git a/tests/snapshots/integration__integration_tests__list__list_ordering_rules.snap b/tests/snapshots/integration__integration_tests__list__list_ordering_rules.snapindex 54b4d8b97..7f5313241 100644--- a/tests/snapshots/integration__integration_tests__list__list_ordering_rules.snap+++ b/tests/snapshots/integration__integration_tests__list__list_ordering_rules.snap@@ -15,17 +15,17 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp9tgp6m/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpaEk7w8/test-config.toml---success: trueexit_code: 0----- stdout ------Branch Main ↕ Path Commit Age Message-[36mmain [0m [36m./test-repo [0m [2m6c3da842[0m [2m10 months ago[0m [2mInitial commit on main[0m-[1m[35mfeature-current[0m [32m↑1[0m [1m[35m./feature-current[0m [2mfc28a4d1[0m [2m9 months ago [0m [2mCommit at 01:00[0m-feature-newest [32m↑1[0m ./feature-newest [2m136358eb[0m [2m9 months ago [0m [2mCommit at 03:00[0m-feature-middle [32m↑1[0m ./feature-middle [2ma0a4851a[0m [2m9 months ago [0m [2mCommit at 02:00[0m-feature-oldest [32m↑1[0m ./feature-oldest [2m1b1a2d78[0m [2m9 months ago [0m [2mCommit at 00:30[0m+Branch Status Main ↕ Path Commit Age Message+[36mmain [0m [36m [0m [36m./test-repo [0m [2m6c3da842[0m [2m10 months ago[0m [2mInitial commit on main[0m+[1m[35mfeature-current[0m [1m[35m↑ [0m [32m↑1[0m [1m[35m./feature-current[0m [2mfc28a4d1[0m [2m9 months ago [0m [2mCommit at 01:00[0m+feature-newest ↑ [32m↑1[0m ./feature-newest [2m136358eb[0m [2m9 months ago [0m [2mCommit at 03:00[0m+feature-middle ↑ [32m↑1[0m ./feature-middle [2ma0a4851a[0m [2m9 months ago [0m [2mCommit at 02:00[0m+feature-oldest ↑ [32m↑1[0m ./feature-oldest [2m1b1a2d78[0m [2m9 months ago [0m [2mCommit at 00:30[0m[2mShowing 5 worktrees, 4 ahead[0mdiff --git a/tests/snapshots/integration__integration_tests__list__long_commit_message.snap b/tests/snapshots/integration__integration_tests__list__long_commit_message.snapindex f579a767d..f28643009 100644--- a/tests/snapshots/integration__integration_tests__list__long_commit_message.snap+++ b/tests/snapshots/integration__integration_tests__list__long_commit_message.snap@@ -15,14 +15,14 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpbOZfFC/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpXZn9qK/test-config.toml---success: trueexit_code: 0----- stdout ------Branch Main ↕ State Path Commit Age Message-[1m[35mmain [0m [1m[35m./test-repo[0m [2m1310bfb9[0m [2m10 months ago[0m [2mShort message[0m-[2mfeature-a[0m [2m[31m↓1[0m [2m(no commits)[0m [2m./feature-a[0m [2mf078644e[0m [2m10 months ago[0m [2mThis is a very long commit message that should test how the message column...[0m+Branch Status Main ↕ State Path Commit Age Message+[1m[35mmain [0m [1m[35m [0m [1m[35m./test-repo[0m [2m1310bfb9[0m [2m10 months ago[0m [2mShort message[0m+[2mfeature-a[0m [2m↓ [0m [2m[31m↓1[0m [2m(no commits)[0m [2m./feature-a[0m [2mf078644e[0m [2m10 months ago[0m [2mThis is a very long commit message that should test how the message...[0m[2mShowing 2 worktrees, 1 behind[0mdiff --git a/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap b/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snapindex 5c35d480f..bd4840872 100644--- a/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap+++ b/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap@@ -15,14 +15,14 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpCkMNDp/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpPvipjc/test-config.toml---success: trueexit_code: 0----- stdout ------Branch Main ↕ State Path Commit Age Message-[1m[35mmain [0m [1m[35m./test-repo [0m [2me4614cb7[0m [2m10 months ago[0m [2mFix bug with café ☕ handling[0m-[2mfeature-test[0m [2m[31m↓1[0m [2m(no commits)[0m [2m./feature-test[0m [2m0c53695b[0m [2m10 months ago[0m [2mAdd support for 日本語 and émoji 🎉[0m+Branch Status Main ↕ State Path Commit Age Message+[1m[35mmain [0m [1m[35m [0m [1m[35m./test-repo [0m [2me4614cb7[0m [2m10 months ago[0m [2mFix bug with café ☕ handling[0m+[2mfeature-test[0m [2m↓ [0m [2m[31m↓1[0m [2m(no commits)[0m [2m./feature-test[0m [2m0c53695b[0m [2m10 months ago[0m [2mAdd support for 日本語 and émoji 🎉[0m[2mShowing 2 worktrees, 1 behind[0mdiff --git a/tests/snapshots/integration__integration_tests__list__with_upstream_tracking.snap b/tests/snapshots/integration__integration_tests__list__with_upstream_tracking.snapindex c2b47f7b1..42aa0be92 100644--- a/tests/snapshots/integration__integration_tests__list__with_upstream_tracking.snap+++ b/tests/snapshots/integration__integration_tests__list__with_upstream_tracking.snap@@ -17,18 +17,18 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpdwCP3X/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpXRweA4/test-config.toml---success: trueexit_code: 0----- stdout ------Branch Main ↕ Main ± State Path Remote ↕ CI Commit Age Message-[1m[35mmain [0m [1m[35m./test-repo [0m [32m↑0[0m [2m[31m↓0[0m [2m6c3da842[0m [2m10 months ago[0m [2mInitial commit on main[0m-ahead [32m↑2[0m [32m+2[0m ./ahead [32m↑2[0m [2m[31m↓0[0m [2m8d8f4673[0m [2m10 months ago[0m [2mAhead commit 2[0m-[2mbehind [0m [2m(matches main)[0m [2m./behind [0m [32m↑0[0m [2m[31m↓1[0m [2m6c3da842[0m [2m10 months ago[0m [2mInitial commit on main[0m-diverged [32m↑1[0m [32m+1[0m ./diverged [32m↑1[0m [2m[31m↓1[0m [2mca7cb696[0m [2m10 months ago[0m [2mDiverged local commit[0m-[2min-sync [0m [2m(matches main)[0m [2m./in-sync [0m [32m↑0[0m [2m[31m↓0[0m [2m6c3da842[0m [2m10 months ago[0m [2mInitial commit on main[0m-[2mno-upstream[0m [2m(matches main)[0m [2m./no-upstream[0m [2m6c3da842[0m [2m10 months ago[0m [2mInitial commit on main[0m+Branch Status Main ↕ Main ± State Path Remote ↕ CI Commit Age Message+[1m[35mmain [0m [1m[35m [0m [1m[35m./test-repo [0m [32m↑0[0m [2m[31m↓0[0m [2m6c3da842[0m [2m10 months ago[0m [2mInitial commit on main[0m+ahead ↑⇡ [32m↑2[0m [32m+2[0m ./ahead [32m↑2[0m [2m[31m↓0[0m [2m8d8f4673[0m [2m10 months ago[0m [2mAhead commit 2[0m+[2mbehind [0m [2m⇣ [0m [2m(matches main)[0m [2m./behind [0m [32m↑0[0m [2m[31m↓1[0m [2m6c3da842[0m [2m10 months ago[0m [2mInitial commit on main[0m+diverged ↑⇡⇣ [32m↑1[0m [32m+1[0m ./diverged [32m↑1[0m [2m[31m↓1[0m [2mca7cb696[0m [2m10 months ago[0m [2mDiverged local commit[0m+[2min-sync [0m [2m [0m [2m(matches main)[0m [2m./in-sync [0m [32m↑0[0m [2m[31m↓0[0m [2m6c3da842[0m [2m10 months ago[0m [2mInitial commit on main[0m+[2mno-upstream[0m [2m [0m [2m(matches main)[0m [2m./no-upstream[0m [2m6c3da842[0m [2m10 months ago[0m [2mInitial commit on main[0m[2mShowing 6 worktrees, 2 ahead[0mdiff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snapindex b8af05aa4..096dabac9 100644--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snap+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snap@@ -15,16 +15,16 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpkunaMG/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpaM0HGS/test-config.toml---success: trueexit_code: 0----- stdout ------Branch Working ± State Path Commit Age Message-[1m[35mmain [0m [1m[35m./test-repo [0m [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m-[2malso-no-changes[0m [2m(matches main)[0m [2m./also-no-changes[0m [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m-[2mno-changes [0m [2m(matches main)[0m [2m./no-changes [0m [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m-with-changes [32m+1[0m [31m-1[0m ./with-changes [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m+Branch Status Working ± State Path Commit Age Message+[1m[35mmain [0m [1m[35m [0m [1m[35m./test-repo [0m [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m+[2malso-no-changes[0m [2m [0m [2m(matches main)[0m [2m./also-no-changes[0m [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m+[2mno-changes [0m [2m [0m [2m(matches main)[0m [2m./no-changes [0m [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m+with-changes ! [32m+1[0m [31m-1[0m ./with-changes [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m[2mShowing 4 worktrees, 1 with changes[0mdiff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snapindex 0a2ba4c82..dcbf8fd77 100644--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snap+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snap@@ -15,15 +15,15 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpZQeFoQ/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpdfdCKu/test-config.toml---success: trueexit_code: 0----- stdout ------Branch Working ± State Path Commit Age Message-[1m[35mmain [0m [1m[35m./test-repo[0m [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m-[2mhuge [0m [2m(matches main)[0m [2m./huge [0m [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m-tiny [32m+1[0m [31m-1[0m ./tiny [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m+Branch Status Working ± State Path Commit Age Message+[1m[35mmain [0m [1m[35m [0m [1m[35m./test-repo[0m [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m+[2mhuge [0m [2m? [0m [2m(matches main)[0m [2m./huge [0m [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m+tiny ! [32m+1[0m [31m-1[0m ./tiny [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m[2mShowing 3 worktrees, 1 with changes[0mdiff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snapindex 5f6c08a27..568b0d05f 100644--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snap+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snap@@ -15,16 +15,16 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpfdJXms/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp88zb63/test-config.toml---success: trueexit_code: 0----- stdout ------Branch State Path Commit Age Message-[1m[35mmain [0m [1m[35m./test-repo [0m [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m-[2mfeature-large [0m [2m(matches main)[0m [2m./feature-large [0m [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m-[2mfeature-medium[0m [2m(matches main)[0m [2m./feature-medium[0m [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m-[2mfeature-small [0m [2m(matches main)[0m [2m./feature-small [0m [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m+Branch Status State Path Commit Age Message+[1m[35mmain [0m [1m[35m [0m [1m[35m./test-repo [0m [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m+[2mfeature-large [0m [2m? [0m [2m(matches main)[0m [2m./feature-large [0m [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m+[2mfeature-medium[0m [2m? [0m [2m(matches main)[0m [2m./feature-medium[0m [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m+[2mfeature-small [0m [2m? [0m [2m(matches main)[0m [2m./feature-small [0m [2mb834638e[0m [2m10 months ago[0m [2mInitial commit[0m[2mShowing 4 worktrees[0m