Skip to content

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

feat(list): Simplify column width calculation and rendering

Maximilian Roos8928439f764c
diff --git a/src/commands/list/layout.rs b/src/commands/list/layout.rs
index 4108e41b0..91d46bcd5 100644
--- a/src/commands/list/layout.rs
+++ b/src/commands/list/layout.rs
@@ -165,7 +165,6 @@
//!
//! ## Helper Functions
//!
-//! - `calculate_diff_width()`: Computes width for diff-style columns ("+added -deleted")
//! - `fit_header()`: Ensures column width ≥ header width to prevent overflow
//! - `try_allocate()`: Attempts to allocate space, returns 0 if insufficient
@@ -208,20 +207,6 @@ pub fn get_safe_list_width() -> usize {
get_terminal_width().saturating_sub(2)
}
-/// Calculate maximum display width for a value using compact notation.
-/// Returns the character width (including suffix) when the value is formatted.
-///
-/// Invariant: All values return either 1 or 2, ensuring consistent column width.
-///
-/// Examples: 0 -> 1, 5 -> 1, 42 -> 2, 100 -> 2 (displays as "1C"), 1000 -> 2 (displays as "1K")
-fn max_display_width(value: usize) -> usize {
- if value < 10 {
- 1 // Single digit (0-9)
- } else {
- 2 // All values >= 10 display as 2 chars (either "42" or "4C" or "4K")
- }
-}
-
/// Ensures a column width is at least as wide as its header.
///
/// This is the general solution for preventing header overflow: pass the header
@@ -235,30 +220,6 @@ fn fit_header(header: &str, data_width: usize) -> usize {
data_width.max(header.width())
}
-/// Calculates width for a diff-style column (format: "+added -deleted" or "↑ahead ↓behind").
-///
-/// Returns DiffWidths with:
-/// - total: width including header minimum ("+{added} -{deleted}"), or just header width if no data
-/// - added_digits/deleted_digits: number of digits for each part
-///
-/// Empty columns (both digits = 0) get header width and are allocated at low priority
-/// (base_priority + EMPTY_PENALTY) for visual consistency on wide terminals.
-fn calculate_diff_width(header: &str, added_digits: usize, deleted_digits: usize) -> DiffWidths {
- let has_data = added_digits > 0 || deleted_digits > 0;
- let data_width = if has_data {
- 1 + added_digits + 1 + 1 + deleted_digits // "+added -deleted"
- } else {
- 0 // fit_header will use header width for empty columns
- };
- let total = fit_header(header, data_width);
-
- DiffWidths {
- total,
- added_digits,
- deleted_digits,
- }
-}
-
/// Helper: Try to allocate space for a column. Returns the allocated width if successful.
/// Updates `remaining` by subtracting the allocated width + spacing.
/// If is_first is true, doesn't require spacing before the column.
@@ -482,143 +443,64 @@ fn ideal_for_column(
}
}
-pub fn calculate_column_widths(items: &[ListItem], fetch_ci: bool) -> LayoutMetadata {
- // Track maximum data widths (headers are enforced via fit_header() later)
- let mut max_branch = 0;
- let mut max_time = 0;
- let mut max_message = 0;
-
- // Track diff component widths separately
- let mut max_wt_added_digits = 0;
- let mut max_wt_deleted_digits = 0;
- let mut max_br_added_digits = 0;
- let mut max_br_deleted_digits = 0;
-
- // Track ahead/behind digit widths separately for alignment
- let mut max_ahead_digits = 0;
- let mut max_behind_digits = 0;
- let mut max_upstream_ahead_digits = 0;
- let mut max_upstream_behind_digits = 0;
-
- // Track which status positions are used across all items
- // Always use PositionMask::FULL for consistent spacing with progressive mode
- // (progressive mode uses FULL because it doesn't have all data upfront)
-
- for item in items {
- let commit = item.commit_details();
- let counts = item.counts();
- let branch_diff = item.branch_diff().diff;
- let upstream = item.upstream();
- let worktree_info = item.worktree_data();
-
- // Branch name
- max_branch = max_branch.max(item.branch_name().width());
-
- // Status column: git status symbols (worktrees only)
- // Note: We always use PositionMask::FULL for rendering (see below),
- // so we don't need to collect position masks from items anymore.
-
- // Time
- let time_str = crate::display::format_relative_time(commit.timestamp);
- max_time = max_time.max(time_str.width());
-
- // Message (truncate to 50 chars max)
- let msg_len = commit.commit_message.chars().take(50).count();
- max_message = max_message.max(msg_len);
-
- // Ahead/behind (only for non-primary items) - track digits separately
- if !item.is_primary() && (counts.ahead > 0 || counts.behind > 0) {
- max_ahead_digits = max_ahead_digits.max(max_display_width(counts.ahead));
- max_behind_digits = max_behind_digits.max(max_display_width(counts.behind));
- }
-
- // Working tree diff (worktrees only) - track digits separately
- if let Some(info) = worktree_info
- && let Some(ref working_tree_diff) = info.working_tree_diff
- && !working_tree_diff.is_empty()
- {
- max_wt_added_digits =
- max_wt_added_digits.max(max_display_width(working_tree_diff.added));
- max_wt_deleted_digits =
- max_wt_deleted_digits.max(max_display_width(working_tree_diff.deleted));
- }
-
- // Branch diff (only for non-primary items) - track digits separately
- if !item.is_primary() && !branch_diff.is_empty() {
- max_br_added_digits = max_br_added_digits.max(max_display_width(branch_diff.added));
- max_br_deleted_digits =
- max_br_deleted_digits.max(max_display_width(branch_diff.deleted));
- }
-
- // Upstream tracking - track digits only (not remote name yet)
- if let Some((_remote_name, upstream_ahead, upstream_behind)) = upstream.active() {
- max_upstream_ahead_digits =
- max_upstream_ahead_digits.max(max_display_width(upstream_ahead));
- max_upstream_behind_digits =
- max_upstream_behind_digits.max(max_display_width(upstream_behind));
- }
- }
-
- // Calculate diff widths using helper (format: "+left -right")
- let working_diff = calculate_diff_width(
- HEADER_WORKING_DIFF,
- max_wt_added_digits,
- max_wt_deleted_digits,
- );
- let branch_diff = calculate_diff_width(
- HEADER_BRANCH_DIFF,
- max_br_added_digits,
- max_br_deleted_digits,
- );
- let ahead_behind =
- calculate_diff_width(HEADER_AHEAD_BEHIND, max_ahead_digits, max_behind_digits);
-
- // Upstream (format: "↑n ↓n", TODO: add remote name when show_remote_names is implemented)
- let upstream = calculate_diff_width(
- HEADER_UPSTREAM,
- max_upstream_ahead_digits,
- max_upstream_behind_digits,
- );
-
- // Status column: Must match PositionMask::FULL width for consistent alignment with progressive mode
- // PositionMask::FULL allocates: 5+1+1+1+1+1+2+2 = 14 chars
- // (working_tree=5, conflicts=1, git_op=1, main_div=1, upstream_div=1,
- // branch_state=1, worktree_attrs=2, user_status=2)
- // This ensures buffered and progressive modes produce identical column layouts.
+/// Build pre-allocated column width estimates.
+///
+/// Uses generous fixed allocations for expensive-to-compute columns (status, diffs, time, CI)
+/// that handle overflow with compact notation (K suffix). This provides consistent layout
+/// without requiring a data scan.
+fn build_estimated_widths(max_branch: usize, show_full: bool, fetch_ci: bool) -> LayoutMetadata {
+ // Fixed widths for slow columns (require expensive git operations)
+ // Values exceeding these widths use compact notation (K suffix)
//
- // User status is limited to single emoji or two characters (2 visual width allocation).
- let has_status_data = items.iter().any(|item| {
- item.status_symbols
- .as_ref()
- .map(|s| !s.is_empty())
- .unwrap_or(false)
- });
- let final_status = fit_header(HEADER_STATUS, 14);
-
- // CI status column: Always 2 chars wide (single symbol "●")
- // Only show if we attempted to fetch CI data (regardless of whether any items have status)
- let has_ci_status = fetch_ci && items.iter().any(|item| item.pr_status().is_some());
- let ci_status_width = 2; // Fixed width
-
- 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),
- ahead_behind,
- working_diff,
- branch_diff,
- upstream,
+ // Status column: Must match PositionMask::FULL width for consistent alignment
+ // PositionMask::FULL allocates: 5+1+1+1+1+1+2+2 = 14 chars
+ let status_fixed = fit_header(HEADER_STATUS, 14);
+ let working_diff_fixed = fit_header(HEADER_WORKING_DIFF, 9); // "+999 -999"
+ let ahead_behind_fixed = fit_header(HEADER_AHEAD_BEHIND, 7); // "↑99 ↓99"
+ let branch_diff_fixed = fit_header(HEADER_BRANCH_DIFF, 9); // "+999 -999"
+ let upstream_fixed = fit_header(HEADER_UPSTREAM, 7); // "↑99 ↓99"
+ let age_estimate = 15; // "3 months ago"
+ let ci_estimate = fit_header(HEADER_CI, 1); // Single indicator symbol
+
+ // Assume columns will have data (better to show and hide than to not show)
+ let data_flags = ColumnDataFlags {
+ status: true,
+ working_diff: true,
+ ahead_behind: true,
+ branch_diff: show_full,
+ upstream: true,
+ ci_status: fetch_ci,
};
- 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,
- upstream: upstream.added_digits > 0 || upstream.deleted_digits > 0,
- ci_status: has_ci_status,
+ let widths = ColumnWidths {
+ branch: max_branch,
+ status: status_fixed,
+ time: age_estimate,
+ ci_status: ci_estimate,
+ message: 50, // Will be flexible during allocation
+ // Commit counts (Arrows): compact notation, 2 digits covers up to 99
+ ahead_behind: DiffWidths {
+ total: ahead_behind_fixed,
+ added_digits: 2,
+ deleted_digits: 2,
+ },
+ // Line diffs (Signs): show full numbers, 3 digits covers up to 999
+ working_diff: DiffWidths {
+ total: working_diff_fixed,
+ added_digits: 3,
+ deleted_digits: 3,
+ },
+ branch_diff: DiffWidths {
+ total: branch_diff_fixed,
+ added_digits: 3,
+ deleted_digits: 3,
+ },
+ // Upstream (Arrows): compact notation, 2 digits covers up to 99
+ upstream: DiffWidths {
+ total: upstream_fixed,
+ added_digits: 2,
+ deleted_digits: 2,
+ },
};
LayoutMetadata {
@@ -631,7 +513,7 @@ pub fn calculate_column_widths(items: &[ListItem], fetch_ci: bool) -> LayoutMeta
/// Allocate columns using priority-based allocation logic.
///
/// This is the core allocation algorithm used by both `calculate_responsive_layout()`
-/// (with actual data-based widths) and `calculate_layout_from_basics()` (with estimated widths).
+/// and `calculate_layout_from_basics()`. Both now use the same pre-allocated width estimates.
fn allocate_columns_with_priority(
metadata: &LayoutMetadata,
show_full: bool,
@@ -792,8 +674,16 @@ pub fn calculate_responsive_layout(
.collect();
let common_prefix = find_common_prefix(&paths);
- // Calculate ideal column widths and track which columns have data
- let metadata = calculate_column_widths(items, fetch_ci);
+ // Calculate max branch width from actual data
+ let max_branch = items
+ .iter()
+ .map(|item| item.branch_name().width())
+ .max()
+ .unwrap_or(0);
+ let max_branch = fit_header(HEADER_BRANCH, max_branch);
+
+ // Build pre-allocated width estimates (same as progressive mode)
+ let metadata = build_estimated_widths(max_branch, show_full, fetch_ci);
// Calculate actual maximum path width (after common prefix removal)
let path_data_width = items
@@ -821,24 +711,25 @@ pub fn calculate_responsive_layout(
)
}
-/// Calculate responsive layout from basic worktree info with estimated column widths.
+/// Calculate responsive layout from basic worktree info.
///
-/// This is used for progressive rendering where we want to show the layout immediately
-/// before collecting full data. We use:
-/// - Actual branch names and paths from worktree list (fast operation)
-/// - Branch names from branches without worktrees (when --branches is used)
-/// - Estimated widths for columns that require expensive git operations
+/// Uses pre-allocated width estimates for expensive-to-compute columns (status, diffs, time, CI).
+/// This is faster than scanning all data and provides consistent layout between buffered and
+/// progressive modes. Values exceeding estimates use compact notation (K suffix).
///
-/// The estimates are generous to minimize truncation:
-/// - Status: 5 chars (covers "≡ 🔧" and most common patterns)
-/// - HEAD±: 6 chars (covers "+12 -5" and similar)
-/// - main↕: 6 chars (covers "↑23 ↓5")
-/// - Remote⇅: 7 chars (header width, covers most cases)
-/// - Age: 15 chars (covers "3 months ago")
-/// - Commit: 8 chars (fixed)
-/// - Message: flexible (20-100 chars)
+/// Fast to compute from actual data:
+/// - Branch names (from worktrees and standalone branches)
+/// - Paths (with common prefix removed)
///
-/// Note: This is work-in-progress for improved progressive rendering.
+/// Pre-allocated estimates (generous to minimize truncation):
+/// - Status: 14 chars (PositionMask::FULL)
+/// - Working diff: 9 chars ("+999 -999")
+/// - Ahead/behind: 7 chars ("↑99 ↓99")
+/// - Branch diff: 9 chars ("+999 -999")
+/// - Upstream: 7 chars ("↑99 ↓99")
+/// - Age: 15 chars ("3 months ago")
+/// - CI: 1 char (indicator symbol)
+/// - Message: flexible (20-100 chars)
pub fn calculate_layout_from_basics(
items: &[super::model::ListItem],
show_full: bool,
@@ -876,74 +767,10 @@ pub fn calculate_layout_from_basics(
.unwrap_or(0);
let max_path_width = fit_header(HEADER_PATH, path_data_width);
- // Fixed widths for slow columns (require expensive git operations)
- // These are predetermined widths, not based on actual data
- // Values exceeding these widths will be shown with K/M suffixes
- //
- // Status column: Must match PositionMask::FULL width for consistent alignment
- // PositionMask::FULL allocates: 5+1+1+1+1+1+2+2 = 14 chars
- // (working_tree=5, conflicts=1, git_op=1, main_div=1, upstream_div=1,
- // branch_state=1, worktree_attrs=2, user_status=2)
- let status_fixed = fit_header(HEADER_STATUS, 14);
- let working_diff_fixed = fit_header(HEADER_WORKING_DIFF, 9); // "+999 -999" (9 chars)
- let ahead_behind_fixed = fit_header(HEADER_AHEAD_BEHIND, 7); // "↑99 ↓99" (7 chars)
- let branch_diff_fixed = fit_header(HEADER_BRANCH_DIFF, 9); // "+999 -999" (9 chars)
- let upstream_fixed = fit_header(HEADER_UPSTREAM, 7); // "↑99 ↓99" (7 chars)
- let age_estimate = 15; // "3 months ago" (fast to compute)
- let commit_width = fit_header(HEADER_COMMIT, COMMIT_HASH_WIDTH); // Fixed 8 chars
- // CI column shows only indicator symbol (●/○/◐)
- let ci_estimate = fit_header(HEADER_CI, 1);
-
- // For progressive rendering, assume columns will have data
- // (better to show and hide than to not show)
- let data_flags = ColumnDataFlags {
- status: true,
- working_diff: true,
- ahead_behind: true,
- branch_diff: show_full,
- upstream: true,
- ci_status: fetch_ci,
- };
-
- // Build ColumnWidths with fixed widths for slow columns
- let estimated_widths = ColumnWidths {
- branch: max_branch,
- status: status_fixed,
- time: age_estimate,
- ci_status: ci_estimate,
- message: 50, // Will be flexible later
- ahead_behind: DiffWidths {
- total: ahead_behind_fixed,
- added_digits: 2, // Compact notation at 100+
- deleted_digits: 2,
- },
- working_diff: DiffWidths {
- total: working_diff_fixed,
- added_digits: 2, // Compact notation at 100+
- deleted_digits: 2,
- },
- branch_diff: DiffWidths {
- total: branch_diff_fixed,
- added_digits: 2, // Compact notation at 100+
- deleted_digits: 2,
- },
- upstream: DiffWidths {
- total: upstream_fixed,
- added_digits: 2, // Compact notation at 100+
- deleted_digits: 2,
- },
- };
-
- // Use full position mask for progressive rendering
- // (we don't know which positions will be needed until data is collected)
- let status_position_mask = super::model::PositionMask::FULL;
+ // Build pre-allocated width estimates (same as buffered mode)
+ let metadata = build_estimated_widths(max_branch, show_full, fetch_ci);
- // Build metadata for allocation
- let metadata = LayoutMetadata {
- widths: estimated_widths,
- data_flags,
- status_position_mask,
- };
+ let commit_width = fit_header(HEADER_COMMIT, COMMIT_HASH_WIDTH);
allocate_columns_with_priority(
&metadata,
@@ -964,143 +791,69 @@ mod tests {
use worktrunk::git::LineDiff;
#[test]
- fn test_column_width_calculation_with_unicode() {
- use crate::commands::list::model::{
- AheadBehind, BranchDiffTotals, CommitDetails, DisplayFields, ItemKind, StatusSymbols,
- UpstreamStatus, WorktreeData,
- };
-
- let item1 = super::ListItem {
- head: "abc123".to_string(),
- branch: Some("main".to_string()),
- commit: Some(CommitDetails {
- timestamp: 0,
- commit_message: "Test".to_string(),
- }),
- counts: Some(AheadBehind {
- ahead: 3,
- behind: 2,
- }),
- branch_diff: Some(BranchDiffTotals {
- diff: LineDiff::from((200, 30)),
- }),
- upstream: Some(UpstreamStatus::from_parts(Some("origin".to_string()), 4, 0)),
- pr_status: None,
- has_conflicts: Some(false),
- user_status: None,
- status_symbols: Some(StatusSymbols::default()),
- display: DisplayFields::default(),
- kind: ItemKind::Worktree(Box::new(WorktreeData {
- path: PathBuf::from("/test"),
- bare: false,
- detached: false,
- locked: None,
- prunable: None,
- working_tree_diff: Some(LineDiff::from((100, 50))),
- working_tree_diff_with_main: Some(Some(LineDiff::default())),
- worktree_state: None,
- is_primary: false,
- working_tree_symbols: Some(String::new()),
- is_dirty: Some(false),
- working_diff_display: None,
- })),
- };
-
- let metadata = calculate_column_widths(&[item1], false);
+ fn test_pre_allocated_width_estimates() {
+ // Test that build_estimated_widths() returns correct pre-allocated estimates
+ let metadata = build_estimated_widths(20, true, true);
let widths = metadata.widths;
- // "↑3 ↓2" has format "↑3 ↓2" = 1+1+1+1+1 = 5, header "main↕" is also 5
+ // Line diffs (Signs variant: +/-) allocate 3 digits for 100-999 range
+ // Format: "+999 -999" = 1+3+1+1+3 = 9, header "HEAD±" is 5, so total is 9
assert_eq!(
- widths.ahead_behind.total, 5,
- "Ahead/behind column should fit header 'main↕' (width 5)"
+ widths.working_diff.total, 9,
+ "Working diff should pre-allocate for '+999 -999' (9 chars)"
);
- assert_eq!(widths.ahead_behind.added_digits, 1, "3 displays as 1 digit");
assert_eq!(
- widths.ahead_behind.deleted_digits, 1,
- "2 displays as 1 digit"
+ widths.working_diff.added_digits, 3,
+ "Pre-allocated for 3-digit added count"
);
-
- // "+1C -50" has width 7 (compact notation), header "HEAD±" is 5, so column width is 7
assert_eq!(
- widths.working_diff.total, 7,
- "Working diff column should fit data '+1C -50' (width 7)"
- );
- assert_eq!(
- widths.working_diff.added_digits, 2,
- "100 displays as 2 digits (1C)"
- );
- assert_eq!(
- widths.working_diff.deleted_digits, 2,
- "50 displays as 2 digits"
+ widths.working_diff.deleted_digits, 3,
+ "Pre-allocated for 3-digit deleted count"
);
- // "+2C -30" has width 7 (compact notation), header "main…±" is 6, so column width is 7
+ // Branch diff also uses Signs variant when show_full=true
+ // Format: "+999 -999" = 9, header "main…±" is 6, so total is 9
assert_eq!(
- widths.branch_diff.total, 7,
- "Branch diff column should fit data '+2C -30' (width 7)"
+ widths.branch_diff.total, 9,
+ "Branch diff should pre-allocate for '+999 -999' (9 chars)"
);
assert_eq!(
- widths.branch_diff.added_digits, 2,
- "200 displays as 2 digits (2C)"
+ widths.branch_diff.added_digits, 3,
+ "Pre-allocated for 3-digit added count"
);
assert_eq!(
- widths.branch_diff.deleted_digits, 2,
- "30 displays as 2 digits"
+ widths.branch_diff.deleted_digits, 3,
+ "Pre-allocated for 3-digit deleted count"
);
- // Upstream: "↑4 ↓0" = "↑" (1) + "4" (1) + " " (1) + "↓" (1) + "0" (1) = 5, but header "Remote⇅" = 7
+ // Commit counts (Arrows variant: ↑↓) use compact notation, allocate 2 digits
+ // Format: "↑99 ↓99" = 1+2+1+1+2 = 7, header "main↕" is 5, so total is 7
assert_eq!(
- widths.upstream.total, 7,
- "Upstream column should fit header 'Remote⇅' (width 7)"
+ widths.ahead_behind.total, 7,
+ "Ahead/behind should pre-allocate for '↑99 ↓99' (7 chars)"
);
- assert_eq!(widths.upstream.added_digits, 1, "4 has 1 digit");
- assert_eq!(widths.upstream.deleted_digits, 1, "0 has 1 digit");
- }
-
- #[test]
- fn test_max_display_width_edge_cases() {
- // Single digits (0-9) display as 1 character
- assert_eq!(max_display_width(0), 1, "0 displays as '0' (1 char)");
- assert_eq!(max_display_width(5), 1, "5 displays as '5' (1 char)");
- assert_eq!(max_display_width(9), 1, "9 displays as '9' (1 char)");
-
- // Two digits (10-99) display as 2 characters
- assert_eq!(max_display_width(10), 2, "10 displays as '10' (2 chars)");
- assert_eq!(max_display_width(42), 2, "42 displays as '42' (2 chars)");
- assert_eq!(max_display_width(99), 2, "99 displays as '99' (2 chars)");
-
- // Hundreds (100-999) display as 2 characters with C suffix
- assert_eq!(max_display_width(100), 2, "100 displays as '1C' (2 chars)");
- assert_eq!(max_display_width(648), 2, "648 displays as '6C' (2 chars)");
- assert_eq!(max_display_width(999), 2, "999 displays as '9C' (2 chars)");
-
- // Thousands (1000-9999) display as 2 characters with K suffix
assert_eq!(
- max_display_width(1000),
- 2,
- "1000 displays as '1K' (2 chars)"
+ widths.ahead_behind.added_digits, 2,
+ "Pre-allocated for 2-digit ahead count (uses compact notation)"
);
assert_eq!(
- max_display_width(1500),
- 2,
- "1500 displays as '1K' (2 chars)"
+ widths.ahead_behind.deleted_digits, 2,
+ "Pre-allocated for 2-digit behind count (uses compact notation)"
);
+
+ // Upstream also uses Arrows variant
+ // Format: "↑99 ↓99" = 7, header "Remote⇅" is 7, so total is 7
assert_eq!(
- max_display_width(9999),
- 2,
- "9999 displays as '9K' (2 chars)"
+ widths.upstream.total, 7,
+ "Upstream should pre-allocate for '↑99 ↓99' (7 chars)"
);
-
- // Large values (10000+) cap at 2 characters
assert_eq!(
- max_display_width(10000),
- 2,
- "10000 displays as '9K' (capped at 2 chars)"
+ widths.upstream.added_digits, 2,
+ "Pre-allocated for 2-digit ahead count"
);
assert_eq!(
- max_display_width(100000),
- 2,
- "100000 displays as '9K' (capped at 2 chars)"
+ widths.upstream.deleted_digits, 2,
+ "Pre-allocated for 2-digit behind count"
);
}
@@ -1250,75 +1003,4 @@ mod tests {
// They have low priority (base_priority + EMPTY_PENALTY) so they're allocated
// only if space remains after higher-priority columns
}
-
- #[test]
- fn test_consecutive_empty_columns_have_low_priority() {
- use crate::commands::list::model::{
- AheadBehind, BranchDiffTotals, CommitDetails, DisplayFields, ItemKind, StatusSymbols,
- UpstreamStatus, WorktreeData,
- };
-
- // Create data where multiple consecutive columns are empty:
- // visible(branch) → empty(working_diff) → empty(ahead_behind) → empty(branch_diff)
- // → empty(states) → visible(path)
- let item = super::ListItem {
- head: "abc12345".to_string(),
- branch: Some("feature-x".to_string()),
- commit: Some(CommitDetails {
- timestamp: 1234567890,
- commit_message: "Test commit".to_string(),
- }),
- counts: Some(AheadBehind {
- ahead: 0,
- behind: 0,
- }),
- branch_diff: Some(BranchDiffTotals {
- diff: LineDiff::default(),
- }), // Empty: no diff
- upstream: Some(UpstreamStatus::default()), // Empty: no upstream
- pr_status: None,
- has_conflicts: Some(false),
- user_status: None,
- status_symbols: Some(StatusSymbols::default()),
- display: DisplayFields::default(),
- kind: ItemKind::Worktree(Box::new(WorktreeData {
- path: PathBuf::from("/test/worktree"),
- bare: false,
- detached: false,
- locked: None,
- prunable: None,
- working_tree_diff: Some(LineDiff::default()), // Empty: no dirty changes
- working_tree_diff_with_main: Some(Some(LineDiff::default())),
- worktree_state: None, // Empty: no state
- is_primary: true, // Empty: no ahead/behind for primary
- working_tree_symbols: Some(String::new()),
- is_dirty: Some(false),
- working_diff_display: None,
- })),
- };
-
- let items = vec![item];
- let layout = calculate_responsive_layout(&items, false, false);
-
- let path_visible = layout
- .columns
- .iter()
- .any(|col| col.kind == ColumnKind::Path);
- assert!(
- path_visible,
- "Path should be visible (has data, priority 7)"
- );
-
- let message_visible = layout
- .columns
- .iter()
- .any(|col| col.kind == ColumnKind::Message);
- assert!(
- message_visible,
- "Message should be allocated before empty columns (priority 12 < empty columns)"
- );
-
- // Empty columns (priority 12+) may or may not be visible depending on terminal width.
- // They rank lower than message (priority 12), so message allocates first.
- }
}
diff --git a/src/commands/list/render.rs b/src/commands/list/render.rs
index 215da2834..f9a81b8bd 100644
--- a/src/commands/list/render.rs
+++ b/src/commands/list/render.rs
@@ -155,32 +155,40 @@ impl DiffColumnConfig {
value > 0 || (value == 0 && always_show_zeros)
}
- /// Format a value using compact notation (C for hundreds, K for thousands)
- /// Ensures the result never exceeds 2 characters
+ /// Format a value using compact notation (K for thousands, optionally C for hundreds)
+ ///
+ /// Returns (formatted_string, uses_compact_notation)
+ ///
+ /// For line diffs (Signs): Shows full numbers in 100-999 range, uses K for thousands
+ /// For commit counts (Arrows): Uses C for hundreds, K for thousands
///
/// Note: Uses integer division for approximation (intentional truncation):
/// - 648 / 100 = 6 → "6C" (represents ~600)
/// - 1999 / 1000 = 1 → "1K" (represents ~1000)
///
- /// This provides approximate values optimized for readability over precision.
- ///
- /// Examples: 5 -> "5", 42 -> "42", 100 -> "1C", 648 -> "6C", 1000 -> "1K", 15000 -> "9K"
- fn format_overflow(value: usize) -> String {
+ /// Examples (Signs): 100 -> ("100", false), 648 -> ("648", false), 1000 -> ("1K", true)
+ /// Examples (Arrows): 100 -> ("1C", true), 648 -> ("6C", true), 1000 -> ("1K", true)
+ fn format_overflow(value: usize, variant: DiffVariant) -> (String, bool) {
if value >= 10_000 {
// Cap at 9K to maintain 2-char limit (indicates "very large")
- "9K".to_string()
+ ("9K".to_string(), true)
} else if value >= 1_000 {
- format!("{}K", value / 1_000)
+ (format!("{}K", value / 1_000), true)
} else if value >= 100 {
- format!("{}C", value / 100)
+ match variant {
+ // Line diffs: show full number (user prefers precision over compactness)
+ DiffVariant::Signs => (value.to_string(), false),
+ // Commit counts: use C abbreviation
+ DiffVariant::Arrows => (format!("{}C", value / 100), true),
+ }
} else {
- value.to_string()
+ (value.to_string(), false)
}
}
/// Render a subcolumn value with symbol and padding to fixed width
/// Numbers are right-aligned on the ones column (e.g., " +2", "+53")
- /// For overflow, renders bold with C/K suffix (e.g., bold "+6C", bold "+5K")
+ /// For compact notation (C/K suffix), renders bold (e.g., bold "+6C", bold "+5K")
fn render_subcolumn(
segment: &mut StyledLine,
symbol: &str,
@@ -188,11 +196,12 @@ impl DiffColumnConfig {
width: usize,
style: Style,
overflow: bool,
+ variant: DiffVariant,
) {
- let value_str = if overflow {
- Self::format_overflow(value)
+ let (value_str, is_compact) = if overflow {
+ Self::format_overflow(value, variant)
} else {
- value.to_string()
+ (value.to_string(), false)
};
let content_len = 1 + value_str.len(); // symbol + digits
let padding_needed = width.saturating_sub(content_len);
@@ -202,10 +211,9 @@ impl DiffColumnConfig {
segment.push_raw(" ".repeat(padding_needed));
}
- // Add styled content - bold entire value if using compact notation
- if overflow {
- // When overflow is true, format_overflow() uses compact notation (C/K suffix)
- // Make entire value bold to emphasize approximation
+ // Add styled content - bold entire value if using compact notation (C/K suffix)
+ // to emphasize approximation
+ if is_compact {
segment.push_styled(format!("{}{}", symbol, value_str), style.bold());
} else {
segment.push_styled(format!("{}{}", symbol, value_str), style);
@@ -246,6 +254,7 @@ impl DiffColumnConfig {
positive_width,
self.display.positive_style,
positive_overflow,
+ self.display.variant,
);
} else {
// Empty positive subcolumn - add spaces to maintain alignment
@@ -264,6 +273,7 @@ impl DiffColumnConfig {
negative_width,
self.display.negative_style,
negative_overflow,
+ self.display.variant,
);
} else {
// Empty negative subcolumn - add spaces to maintain alignment
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__bare_repository__bare_repo_list_worktrees.snap b/tests/integration_tests/snapshots/integration__integration_tests__bare_repository__bare_repo_list_worktrees.snap
index e82a42284..abd0fc6a5 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__bare_repository__bare_repo_list_worktrees.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__bare_repository__bare_repo_list_worktrees.snap
@@ -14,15 +14,15 @@ info:
LC_ALL: C
NO_COLOR: ""
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmplGvHJf/test-config.toml
+ WORKTRUNK_CONFIG: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpGH3IK9/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-feature ./test-repo.feature 72413a3b 10 months ago Work on feature
-main ∅ ↓ ↓1 ./test-repo.main 6c3da842 10 months ago Initial commit on main
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+feature ./test-repo.feature 72413a3b 10 months ago Work on feature
+main ∅ ↓ ↓1 ./test-repo.main 6c3da842 10 months ago Initial commit on main
⚪ Showing 2 worktrees
diff --git a/tests/snapshots/integration__integration_tests__internal_flag__list_with_internal_flag.snap b/tests/snapshots/integration__integration_tests__internal_flag__list_with_internal_flag.snap
index 65dc12467..d80e577cb 100644
--- a/tests/snapshots/integration__integration_tests__internal_flag__list_with_internal_flag.snap
+++ b/tests/snapshots/integration__integration_tests__internal_flag__list_with_internal_flag.snap
@@ -16,14 +16,14 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpxrS10W/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpSqB2PR/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main . b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main . b834638e 10 months ago Initial commit
⚪ Showing 1 worktree
diff --git a/tests/snapshots/integration__integration_tests__list__branch_only_with_status.snap b/tests/snapshots/integration__integration_tests__list__branch_only_with_status.snap
index 8db0ccb13..999bfd71b 100644
--- a/tests/snapshots/integration__integration_tests__list__branch_only_with_status.snap
+++ b/tests/snapshots/integration__integration_tests__list__branch_only_with_status.snap
@@ -16,15 +16,15 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpiXIFWI/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpCgyiR2/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main . b834638e 10 months ago Initial commit
-branch-only ∅ b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main . b834638e 10 months ago Initial commit
+branch-only ∅ b834638e 10 months ago Initial commit
⚪ Showing 1 worktrees, 1 branches
diff --git a/tests/snapshots/integration__integration_tests__list__detached_head.snap b/tests/snapshots/integration__integration_tests__list__detached_head.snap
index 205e67d69..ac1895f62 100644
--- a/tests/snapshots/integration__integration_tests__list__detached_head.snap
+++ b/tests/snapshots/integration__integration_tests__list__detached_head.snap
@@ -15,14 +15,14 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpDawLcz/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmplX4XgD/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-(detached) . b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+(detached) . b834638e 10 months ago Initial commit
⚪ Showing 1 worktree
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 2760b8cfa..c5eb72598 100644
--- a/tests/snapshots/integration__integration_tests__list__large_diffs_alignment.snap
+++ b/tests/snapshots/integration__integration_tests__list__large_diffs_alignment.snap
@@ -15,17 +15,17 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpNI9BWQ/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpSW0NBE/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- 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 -1C ↑1 ./feature-changes b854b166 10 months ago Add 100 lines
-fix ? ≡ 💬 ./fix b834638e 10 months ago Initial commit
+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
⚪ Showing 4 worktrees, 2 with changes, 2 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__list_ordering_rules.snap b/tests/snapshots/integration__integration_tests__list__list_ordering_rules.snap
index 023967010..5542c431c 100644
--- a/tests/snapshots/integration__integration_tests__list__list_ordering_rules.snap
+++ b/tests/snapshots/integration__integration_tests__list__list_ordering_rules.snap
@@ -15,18 +15,18 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp1wfTdq/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmplgPGUb/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo 6c3da842 10 months ago Initial commit on main
-feature-current ↑ ↑1 ./feature-current fc28a4d1 9 months ago Commit at 01:00
-feature-newest ↑ ↑1 ./feature-newest 136358eb 9 months ago Commit at 03:00
-feature-middle ↑ ↑1 ./feature-middle a0a4851a 9 months ago Commit at 02:00
-feature-oldest ↑ ↑1 ./feature-oldest 1b1a2d78 9 months ago Commit at 00:30
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main ./test-repo 6c3da842 10 months ago Initial commit on main
+feature-current ↑ ↑1 ./feature-current fc28a4d1 9 months ago Commit at 01:00
+feature-newest ↑ ↑1 ./feature-newest 136358eb 9 months ago Commit at 03:00
+feature-middle ↑ ↑1 ./feature-middle a0a4851a 9 months ago Commit at 02:00
+feature-oldest ↑ ↑1 ./feature-oldest 1b1a2d78 9 months ago Commit at 00:30
⚪ Showing 5 worktrees, 4 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__list_primary_on_different_branch.snap b/tests/snapshots/integration__integration_tests__list__list_primary_on_different_branch.snap
index ddc25a188..881164b2b 100644
--- a/tests/snapshots/integration__integration_tests__list__list_primary_on_different_branch.snap
+++ b/tests/snapshots/integration__integration_tests__list__list_primary_on_different_branch.snap
@@ -15,16 +15,16 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpIQWTTN/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpocb3A3/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-develop ./test-repo b834638e 10 months ago Initial commit
-feature-a ≡ ./feature-a b834638e 10 months ago Initial commit
-feature-b ≡ ./feature-b b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+develop ./test-repo b834638e 10 months ago Initial commit
+feature-a ≡ ./feature-a b834638e 10 months ago Initial commit
+feature-b ≡ ./feature-b b834638e 10 months ago Initial commit
⚪ Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__list_with_c_flag.snap b/tests/snapshots/integration__integration_tests__list__list_with_c_flag.snap
index d5b9873c6..4421f495e 100644
--- a/tests/snapshots/integration__integration_tests__list__list_with_c_flag.snap
+++ b/tests/snapshots/integration__integration_tests__list__list_with_c_flag.snap
@@ -4,7 +4,7 @@ info:
program: wt
args:
- "-C"
- - /private/var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpR1ixOC/test-repo
+ - /private/var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp4g1SVX/test-repo
- list
env:
CLICOLOR_FORCE: "1"
@@ -16,9 +16,9 @@ exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo b834638e 10 months ago Initial commit
-feature-a ≡ ./feature-a b834638e 10 months ago Initial commit
-feature-b ≡ ./feature-b b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main ./test-repo b834638e 10 months ago Initial commit
+feature-a ≡ ./feature-a b834638e 10 months ago Initial commit
+feature-b ≡ ./feature-b b834638e 10 months ago Initial commit
⚪ Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap b/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap
index a84463db8..8a0a04a05 100644
--- a/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap
+++ b/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap
@@ -15,15 +15,15 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpMK1AKe/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpFPXLby/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo b834638e 10 months ago Initial commit
-locked-no-reason ≡ ⊠ ./locked-no-reason b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main ./test-repo b834638e 10 months ago Initial commit
+locked-no-reason ≡ ⊠ ./locked-no-reason b834638e 10 months ago Initial commit
⚪ Showing 2 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__locked_worktree.snap b/tests/snapshots/integration__integration_tests__list__locked_worktree.snap
index 7246aa28f..9752b14ac 100644
--- a/tests/snapshots/integration__integration_tests__list__locked_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__list__locked_worktree.snap
@@ -15,15 +15,15 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpA6DYgB/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp9KzsCB/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo b834638e 10 months ago Initial commit
-locked-feature ≡ ⊠ ./locked-feature b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main ./test-repo b834638e 10 months ago Initial commit
+locked-feature ≡ ⊠ ./locked-feature b834638e 10 months ago Initial commit
⚪ Showing 2 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__long_commit_message.snap b/tests/snapshots/integration__integration_tests__list__long_commit_message.snap
index 604edabae..0df516b31 100644
--- a/tests/snapshots/integration__integration_tests__list__long_commit_message.snap
+++ b/tests/snapshots/integration__integration_tests__list__long_commit_message.snap
@@ -15,15 +15,15 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpU3UoYF/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpDOC51Z/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo 1310bfb9 10 months ago Short message
-feature-a ∅ ↓ ↓1 ./feature-a f078644e 10 months ago This is a very long commit message that should test how…
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main ./test-repo 1310bfb9 10 months ago Short message
+feature-a ∅ ↓ ↓1 ./feature-a f078644e 10 months ago This is a very long commit message that should…
⚪ Showing 2 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap b/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap
index d878c8812..dad070fe5 100644
--- a/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap
+++ b/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap
@@ -15,18 +15,18 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpdjY4HN/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpIcZQdN/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo b834638e 10 months ago Initial commit
-medium-name ≡ ./medium-name b834638e 10 months ago Initial commit
-short ≡ ./short b834638e 10 months ago Initial commit
-very-long-branch-name-here ≡ ./very-long-branch-name-here b834638e 10 months ago Initial commit
-with-changes ≡ ./with-changes b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age
+main ./test-repo b834638e 10 months ago
+medium-name ≡ ./medium-name b834638e 10 months ago
+short ≡ ./short b834638e 10 months ago
+very-long-branch-name-here ≡ ./very-long-branch-name-here b834638e 10 months ago
+with-changes ≡ ./with-changes b834638e 10 months ago
-⚪ Showing 5 worktrees
+⚪ Showing 5 worktrees, 1 column hidden
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 91a7e5319..9978f61ca 100644
--- a/tests/snapshots/integration__integration_tests__list__maximum_status_symbols.snap
+++ b/tests/snapshots/integration__integration_tests__list__maximum_status_symbols.snap
@@ -16,15 +16,15 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp1pu5eo/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp32AC4F/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
-main ./test-repo 85ed6d3d 10 months ago Main advances
-feature ?!+»✘= ⊠ ↕⇅🤖 +2 -2 ↑2 ↓1 +3 -1 ./feature ↑2 ↓1 21dc61ca 10 months ago Local only commit
+Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
+main ./test-repo 85ed6d3d 10 months ago Main advances
+feature ?!+»✘= ⊠ ↕⇅🤖 +2 -2 ↑2 ↓1 +3 -1 ./feature ↑2 ↓1 21dc61ca 10 months ago Local only 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 b53adbc30..d9414f87b 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,15 +16,15 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp5jAqCV/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpRwYcGl/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- 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
+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
⚪ Showing 2 worktrees, 1 with changes
diff --git a/tests/snapshots/integration__integration_tests__list__maximum_working_tree_symbols.snap b/tests/snapshots/integration__integration_tests__list__maximum_working_tree_symbols.snap
index ee1a341f1..78f5ce8c6 100644
--- a/tests/snapshots/integration__integration_tests__list__maximum_working_tree_symbols.snap
+++ b/tests/snapshots/integration__integration_tests__list__maximum_working_tree_symbols.snap
@@ -15,15 +15,15 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp53X7Q6/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpatXx8Z/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo b834638e 10 months ago Initial commit
-feature ?!+»✘ ↑ +2 -3 ↑1 ./feature 689c2504 10 months ago Add files
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main ./test-repo b834638e 10 months ago Initial commit
+feature ?!+»✘ ↑ +2 -3 ↑1 ./feature 689c2504 10 months ago Add files
⚪ Showing 2 worktrees, 1 with changes, 1 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap b/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap
index ef1325ea8..5efefe5a9 100644
--- a/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap
+++ b/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap
@@ -15,16 +15,16 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpRuQwij/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp8ZsoiA/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo b834638e 10 months ago Initial commit
-feature-a ≡ ./feature-a b834638e 10 months ago Initial commit
-feature-b ≡ ./feature-b b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main ./test-repo b834638e 10 months ago Initial commit
+feature-a ≡ ./feature-a b834638e 10 months ago Initial commit
+feature-b ≡ ./feature-b b834638e 10 months ago Initial commit
⚪ Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__no_progressive_flag.snap b/tests/snapshots/integration__integration_tests__list__no_progressive_flag.snap
index df79ec6e2..3ebfc56dd 100644
--- a/tests/snapshots/integration__integration_tests__list__no_progressive_flag.snap
+++ b/tests/snapshots/integration__integration_tests__list__no_progressive_flag.snap
@@ -16,15 +16,15 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpkoxAU8/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpEuDs0c/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo b834638e 10 months ago Initial commit
-feature ≡ ./feature b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main ./test-repo b834638e 10 months ago Initial commit
+feature ≡ ./feature b834638e 10 months ago Initial commit
⚪ Showing 2 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__readme_example_simple_list.snap b/tests/snapshots/integration__integration_tests__list__readme_example_simple_list.snap
index 759edfd19..a6d5e75ac 100644
--- a/tests/snapshots/integration__integration_tests__list__readme_example_simple_list.snap
+++ b/tests/snapshots/integration__integration_tests__list__readme_example_simple_list.snap
@@ -15,16 +15,16 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpdSy0BG/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpbWzXm1/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo ↑0 ↓0 b834638e 10 months ago Initial commit
-bugfix-y ↑ ↑1 ./bugfix-y 412a27c8 10 months ago Fix bug
-feature-x + ↑ +5 ↑3 ./feature-x 7fd821aa 10 months ago Add file 3
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main ./test-repo ↑0 ↓0 b834638e 10 months ago Initial commit
+bugfix-y ↑ ↑1 ./bugfix-y 412a27c8 10 months ago Fix bug
+feature-x + ↑ +5 ↑3 ./feature-x 7fd821aa 10 months ago Add file 3
⚪ Showing 3 worktrees, 1 with changes, 2 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__single_worktree.snap b/tests/snapshots/integration__integration_tests__list__single_worktree.snap
index eac1e422c..9fefc7d3e 100644
--- a/tests/snapshots/integration__integration_tests__list__single_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__list__single_worktree.snap
@@ -15,14 +15,14 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpNWJi8U/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpKNMW5y/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main . b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main . b834638e 10 months ago Initial commit
⚪ Showing 1 worktree
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 498f565ff..b3ff371e8 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,17 +15,17 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpUZxZvW/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpcjkyAw/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- 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 -1C ↑1 ./wli-sequence a2483ffd 10 months ago Initial content
+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
⚪ Showing 4 worktrees, 1 with changes, 3 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__task_dag_full_with_diffs.snap b/tests/snapshots/integration__integration_tests__list__task_dag_full_with_diffs.snap
index 97e917154..5931fcaba 100644
--- a/tests/snapshots/integration__integration_tests__list__task_dag_full_with_diffs.snap
+++ b/tests/snapshots/integration__integration_tests__list__task_dag_full_with_diffs.snap
@@ -17,7 +17,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpzOZNrE/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpUw4Gfu/test-config.toml
---
success: true
exit_code: 0
@@ -27,6 +27,6 @@ exit_code: 0
Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
main ./test-repo b834638e 10 months ago Initial commit
feature-a ? ≡ ./feature-a b834638e 10 months ago Initial commit
-feature-b ↑ ↑1 +1 -1 ./feature-b 2d37ca75 10 months ago Test commit
+feature-b ↑ ↑1 +1 -1 ./feature-b 2d37ca75 10 months ago Test commit
⚪ Showing 3 worktrees, 1 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__task_dag_with_upstream.snap b/tests/snapshots/integration__integration_tests__list__task_dag_with_upstream.snap
index 93172702b..149c53572 100644
--- a/tests/snapshots/integration__integration_tests__list__task_dag_with_upstream.snap
+++ b/tests/snapshots/integration__integration_tests__list__task_dag_with_upstream.snap
@@ -1,6 +1,5 @@
---
source: tests/integration_tests/list.rs
-assertion_line: 81
info:
program: wt
args:
@@ -18,7 +17,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpyRAhmL/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpV6T48S/test-config.toml
---
success: true
exit_code: 0
@@ -27,7 +26,7 @@ exit_code: 0
----- stderr -----
Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
main ./test-repo ↑0 ↓0 6c3da842 10 months ago Initial commit on main
-ahead ↑⇡ ↑1 +1 ./ahead ↑1 ↓0 2fff52c2 10 months ago Ahead commit
+ahead ↑⇡ ↑1 +1 ./ahead ↑1 ↓0 2fff52c2 10 months ago Ahead commit
in-sync ≡ ./in-sync ↑0 ↓0 6c3da842 10 months ago Initial commit on main
⚪ Showing 3 worktrees, 1 ahead
diff --git a/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap b/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap
index 8411c2ad8..732580397 100644
--- a/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap
+++ b/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap
@@ -15,15 +15,15 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpo4U5B1/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpnGHV6t/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo e4614cb7 10 months ago Fix bug with café ☕ handling
-feature-test ∅ ↓ ↓1 ./feature-test 0c53695b 10 months ago Add support for 日本語 and émoji 🎉
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main ./test-repo e4614cb7 10 months ago Fix bug with café ☕ handling
+feature-test ∅ ↓ ↓1 ./feature-test 0c53695b 10 months ago Add support for 日本語 and émoji 🎉
⚪ Showing 2 worktrees
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 7744f66f3..f8a2772bf 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,16 +15,16 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpiEICGD/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmppdXNaP/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- 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
+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
⚪ Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap b/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap
index b5e55c110..12985667b 100644
--- a/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap
@@ -16,18 +16,18 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpRAh1Yl/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmph3KD66/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo b834638e 10 months ago Initial commit
-feature-with-worktree ≡ ./feature-with-worktree b834638e 10 months ago Initial commit
-another-branch ∅ b834638e 10 months ago Initial commit
-feature-without-worktree ∅ b834638e 10 months ago Initial commit
-fix-bug ∅ b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main ./test-repo b834638e 10 months ago Initial commit
+feature-with-worktree ≡ ./feature-with-worktree b834638e 10 months ago Initial commit
+another-branch ∅ b834638e 10 months ago Initial commit
+feature-without-worktree ∅ b834638e 10 months ago Initial commit
+fix-bug ∅ b834638e 10 months ago Initial commit
⚪ Showing 2 worktrees, 3 branches
diff --git a/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap b/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap
index f6709eac2..bb182027b 100644
--- a/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap
@@ -16,16 +16,16 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpDA5dTV/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpYDiBBO/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo b834638e 10 months ago Initial commit
-feature-a ≡ ./feature-a b834638e 10 months ago Initial commit
-feature-b ≡ ./feature-b b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main ./test-repo b834638e 10 months ago Initial commit
+feature-a ≡ ./feature-a b834638e 10 months ago Initial commit
+feature-b ≡ ./feature-b b834638e 10 months ago Initial commit
⚪ Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__with_branches_flag_only_branches.snap b/tests/snapshots/integration__integration_tests__list__with_branches_flag_only_branches.snap
index 52299a72e..d30db325d 100644
--- a/tests/snapshots/integration__integration_tests__list__with_branches_flag_only_branches.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_branches_flag_only_branches.snap
@@ -16,17 +16,17 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpEfK0kr/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpxsHGTm/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main . b834638e 10 months ago Initial commit
-branch-alpha ∅ b834638e 10 months ago Initial commit
-branch-beta ∅ b834638e 10 months ago Initial commit
-branch-gamma ∅ b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main . b834638e 10 months ago Initial commit
+branch-alpha ∅ b834638e 10 months ago Initial commit
+branch-beta ∅ b834638e 10 months ago Initial commit
+branch-gamma ∅ b834638e 10 months ago Initial commit
⚪ Showing 1 worktrees, 3 branches
diff --git a/tests/snapshots/integration__integration_tests__list__with_upstream_tracking.snap b/tests/snapshots/integration__integration_tests__list__with_upstream_tracking.snap
index b88a06014..404eb79a6 100644
--- a/tests/snapshots/integration__integration_tests__list__with_upstream_tracking.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_upstream_tracking.snap
@@ -16,21 +16,21 @@ info:
GIT_EDITOR: ""
LANG: C
LC_ALL: C
- PATH: "/var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpxKTdFT/mock-bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
+ PATH: "/var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpaaM9so/mock-bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpxKTdFT/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpaaM9so/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
-main ./test-repo ↑0 ↓0 6c3da842 10 months ago Initial commit on main
-ahead ↑⇡ ↑2 +2 ./ahead ↑2 ↓0 8d8f4673 10 months ago Ahead commit 2
-behind ≡ ⇣ ./behind ↑0 ↓1 6c3da842 10 months ago Initial commit on main
-diverged ↑⇅ ↑1 +1 ./diverged ↑1 ↓1 ca7cb696 10 months ago Diverged local commit
-in-sync ≡ ./in-sync ↑0 ↓0 6c3da842 10 months ago Initial commit on main
-no-upstream ≡ ./no-upstream 6c3da842 10 months ago Initial commit on main
+Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
+main ./test-repo ↑0 ↓0 6c3da842 10 months ago Initial commit on main
+ahead ↑⇡ ↑2 +2 ./ahead ↑2 ↓0 8d8f4673 10 months ago Ahead commit 2
+behind ≡ ⇣ ./behind ↑0 ↓1 6c3da842 10 months ago Initial commit on main
+diverged ↑⇅ ↑1 +1 ./diverged ↑1 ↓1 ca7cb696 10 months ago Diverged local commit
+in-sync ≡ ./in-sync ↑0 ↓0 6c3da842 10 months ago Initial commit on main
+no-upstream ≡ ./no-upstream 6c3da842 10 months ago Initial commit on main
⚪ Showing 6 worktrees, 2 ahead
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 0a916dc38..6d0c64291 100644
--- a/tests/snapshots/integration__integration_tests__list__with_user_status.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_user_status.snap
@@ -15,18 +15,18 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpEr7pC5/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpYhKkNW/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-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
-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
+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
+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
⚪ Showing 5 worktrees, 1 with changes
diff --git a/tests/snapshots/integration__integration_tests__security__commit_message_with_directive_not_executed.snap b/tests/snapshots/integration__integration_tests__security__commit_message_with_directive_not_executed.snap
index 41e7e110d..cf6a82f20 100644
--- a/tests/snapshots/integration__integration_tests__security__commit_message_with_directive_not_executed.snap
+++ b/tests/snapshots/integration__integration_tests__security__commit_message_with_directive_not_executed.snap
@@ -15,15 +15,15 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmppuhJG1/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpLWwjBd/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo [SHA] 10 months ago Fix bug __WORKTRUNK_EXEC__echo PWNED > /tmp/hacked4
-feature ≡ ./feature [SHA] 10 months ago Fix bug __WORKTRUNK_EXEC__echo PWNED > /tmp/hacked4
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main ./test-repo [SHA] 10 months ago Fix bug __WORKTRUNK_EXEC__echo PWNED > /tmp/hacked4
+feature ≡ ./feature [SHA] 10 months ago Fix bug __WORKTRUNK_EXEC__echo PWNED > /tmp/hacked4
⚪ Showing 2 worktrees
diff --git a/tests/snapshots/integration__integration_tests__security__path_with_directive_not_executed.snap b/tests/snapshots/integration__integration_tests__security__path_with_directive_not_executed.snap
index 8040aa9a2..05e83d53d 100644
--- a/tests/snapshots/integration__integration_tests__security__path_with_directive_not_executed.snap
+++ b/tests/snapshots/integration__integration_tests__security__path_with_directive_not_executed.snap
@@ -15,14 +15,14 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpNeyRrV/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpMWqgxo/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main . b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main . b834638e 10 months ago Initial commit
⚪ Showing 1 worktree
diff --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.snap
index eedc18714..eac8f59b1 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,17 +15,17 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp4lD4Wr/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp30A0KE/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo b834638e 10 months ago Initial commit
-also-no-changes ≡ ./also-no-changes b834638e 10 months ago Initial commit
-no-changes ≡ ./no-changes b834638e 10 months ago Initial commit
-with-changes ! +1 -1 ./with-changes b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main ./test-repo b834638e 10 months ago Initial commit
+also-no-changes ≡ ./also-no-changes b834638e 10 months ago Initial commit
+no-changes ≡ ./no-changes b834638e 10 months ago Initial commit
+with-changes ! +1 -1 ./with-changes b834638e 10 months ago Initial commit
⚪ Showing 4 worktrees, 1 with changes
diff --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.snap
index d972eb3a4..e0839dd78 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,16 +15,16 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpJaIb7d/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpRW0dW3/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo b834638e 10 months ago Initial commit
-huge ? ≡ ./huge b834638e 10 months ago Initial commit
-tiny ! +1 -1 ./tiny b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main ./test-repo b834638e 10 months ago Initial commit
+huge ? ≡ ./huge b834638e 10 months ago Initial commit
+tiny ! +1 -1 ./tiny b834638e 10 months ago Initial commit
⚪ Showing 3 worktrees, 1 with changes
diff --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.snap
index be4df64cc..94beb2ba7 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,17 +15,17 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp5X5cWc/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpXXqnnR/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo b834638e 10 months ago Initial commit
-feature-large ? ≡ ./feature-large b834638e 10 months ago Initial commit
-feature-medium ? ≡ ./feature-medium b834638e 10 months ago Initial commit
-feature-small ? ≡ ./feature-small b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main ./test-repo b834638e 10 months ago Initial commit
+feature-large ? ≡ ./feature-large b834638e 10 months ago Initial commit
+feature-medium ? ≡ ./feature-medium b834638e 10 months ago Initial commit
+feature-small ? ≡ ./feature-small b834638e 10 months ago Initial commit
⚪ Showing 4 worktrees
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap
index 3a49bd593..9edfcde95 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap
@@ -15,17 +15,17 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpWxqH5k/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpl89LNk/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo b834638e 10 months ago Initial commit
-another-extremely-long-name-here ≡ ./another-extremely-long-name-here b834638e 10 months ago Initial commit
-short ≡ ./short b834638e 10 months ago Initial commit
-very-long-feature-branch-name ≡ ./very-long-feature-branch-name b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age
+main ./test-repo b834638e 10 months ago
+another-extremely-long-name-here ≡ ./another-extremely-long-name-here b834638e 10 months ago
+short ≡ ./short b834638e 10 months ago
+very-long-feature-branch-name ≡ ./very-long-feature-branch-name b834638e 10 months ago
-⚪ Showing 4 worktrees
+⚪ Showing 4 worktrees, 1 column hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap
index f443094dd..a06e41d03 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap
@@ -15,17 +15,17 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpbmenD6/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpmBj2He/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo b834638e 10 months ago Initial commit
-long ≡ ./extremely-long-branch-name-that-might-cause-layout-issues b834638e 10 months ago Initial commit
-medium ≡ ./medium-length-name b834638e 10 months ago Initial commit
-x ≡ ./x b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age
+main ./test-repo b834638e 10 months ago
+long ≡ ./extremely-long-branch-name-that-might-cause-layout-issues b834638e 10 months ago
+medium ≡ ./medium-length-name b834638e 10 months ago
+x ≡ ./x b834638e 10 months ago
-⚪ Showing 4 worktrees
+⚪ Showing 4 worktrees, 1 column hidden
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap
index 1acf1413e..2ae1deac1 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap
@@ -15,17 +15,17 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpekKic5/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmptLlznB/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo b834638e 10 months ago Initial commit
-a ≡ ./a b834638e 10 months ago Initial commit
-bb ≡ ./bb b834638e 10 months ago Initial commit
-ccc ≡ ./ccc b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main ./test-repo b834638e 10 months ago Initial commit
+a ≡ ./a b834638e 10 months ago Initial commit
+bb ≡ ./bb b834638e 10 months ago Initial commit
+ccc ≡ ./ccc b834638e 10 months ago Initial commit
⚪ Showing 4 worktrees
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap
index 8bf1d6f0f..1ba637154 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap
@@ -15,17 +15,17 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpycdgnL/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpsrCvCW/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
----- stderr -----
-Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-main ./test-repo b834638e 10 months ago Initial commit
-cafe ≡ ./café b834638e 10 months ago Initial commit
-naive ≡ ./naïve b834638e 10 months ago Initial commit
-resume ≡ ./résumé b834638e 10 months ago Initial commit
+Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+main ./test-repo b834638e 10 months ago Initial commit
+cafe ≡ ./café b834638e 10 months ago Initial commit
+naive ≡ ./naïve b834638e 10 months ago Initial commit
+resume ≡ ./résumé b834638e 10 months ago Initial commit
⚪ Showing 4 worktrees