Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
feat: Distinguish worktree and merge-tree conflict symbols
Maximilian Roos4614bfb6d98b
diff --git a/.claude-plugin/skills/worktrunk/reference/README.md b/.claude-plugin/skills/worktrunk/reference/README.mdindex f37ae2b4f..ff26e5a83 100644--- a/.claude-plugin/skills/worktrunk/reference/README.md+++ b/.claude-plugin/skills/worktrunk/reference/README.md@@ -588,15 +588,15 @@ Options:**STATUS SYMBOLS:**-Order: `?!+»✘ =≠≡∅ ↻⋈ ↑↓↕ ⇡⇣⇅ ⎇⌫⊠`+Order: `?!+»✘ ✖⚠≡∅ ↻⋈ ↑↓↕ ⇡⇣⇅ ⎇⌫⊠`- `?` Untracked files present- `!` Modified files (unstaged changes)- `+` Staged files (ready to commit)- `»` Renamed files- `✘` Deleted files-- `=` **Merge conflicts** (unmerged paths in working tree)-- `≠` **Potential conflicts** with main (`--full` only, detected via `git merge-tree`)+- `✖` **Merge conflicts** - unresolved conflicts in working tree (fix before continuing)+- `⚠` **Would conflict** - merging into main would fail- `≡` Working tree matches main (identical contents, regardless of commit history)- `∅` No commits (no commits ahead AND no uncommitted changes)- `↻` Rebase in progress@@ -618,7 +618,7 @@ Order: `?!+»✘ =≠≡∅ ↻⋈ ↑↓↕ ⇡⇣⇅ ⎇⌫⊠`Use `--format=json` for structured data. Each object contains two status maps:**`status` (variant names for querying):**-- `branch_state`: "" | "Conflicts" | "PotentialConflicts" | "MatchesMain" | "NoCommits"+- `branch_state`: "" | "Conflicts" | "MergeTreeConflicts" | "MatchesMain" | "NoCommits"- `git_operation`: "" | "Rebase" | "Merge"- `worktree_attrs`: object (worktrees only) with:- `locked`: null | "reason string"@@ -634,7 +634,7 @@ Use `--format=json` for structured data. Each object contains two status maps:- `user_status`: string (optional) - custom status from git config**`status_symbols` (display symbols for rendering):**-- `branch_state`: "" | "=" | "≠" | "≡" | "∅"+- `branch_state`: "" | "✖" | "⚠" | "≡" | "∅"- `git_operation`: "" | "↻" | "⋈"- `worktree_attrs`: "⎇" (branch) | "⌫" (prunable) | "⊠" (locked) | ""- `main_divergence`: "" | "↑" | "↓" | "↕"diff --git a/README.md b/README.mdindex f37ae2b4f..ff26e5a83 100644--- a/README.md+++ b/README.md@@ -588,15 +588,15 @@ Options:**STATUS SYMBOLS:**-Order: `?!+»✘ =≠≡∅ ↻⋈ ↑↓↕ ⇡⇣⇅ ⎇⌫⊠`+Order: `?!+»✘ ✖⚠≡∅ ↻⋈ ↑↓↕ ⇡⇣⇅ ⎇⌫⊠`- `?` Untracked files present- `!` Modified files (unstaged changes)- `+` Staged files (ready to commit)- `»` Renamed files- `✘` Deleted files-- `=` **Merge conflicts** (unmerged paths in working tree)-- `≠` **Potential conflicts** with main (`--full` only, detected via `git merge-tree`)+- `✖` **Merge conflicts** - unresolved conflicts in working tree (fix before continuing)+- `⚠` **Would conflict** - merging into main would fail- `≡` Working tree matches main (identical contents, regardless of commit history)- `∅` No commits (no commits ahead AND no uncommitted changes)- `↻` Rebase in progress@@ -618,7 +618,7 @@ Order: `?!+»✘ =≠≡∅ ↻⋈ ↑↓↕ ⇡⇣⇅ ⎇⌫⊠`Use `--format=json` for structured data. Each object contains two status maps:**`status` (variant names for querying):**-- `branch_state`: "" | "Conflicts" | "PotentialConflicts" | "MatchesMain" | "NoCommits"+- `branch_state`: "" | "Conflicts" | "MergeTreeConflicts" | "MatchesMain" | "NoCommits"- `git_operation`: "" | "Rebase" | "Merge"- `worktree_attrs`: object (worktrees only) with:- `locked`: null | "reason string"@@ -634,7 +634,7 @@ Use `--format=json` for structured data. Each object contains two status maps:- `user_status`: string (optional) - custom status from git config**`status_symbols` (display symbols for rendering):**-- `branch_state`: "" | "=" | "≠" | "≡" | "∅"+- `branch_state`: "" | "✖" | "⚠" | "≡" | "∅"- `git_operation`: "" | "↻" | "⋈"- `worktree_attrs`: "⎇" (branch) | "⌫" (prunable) | "⊠" (locked) | ""- `main_divergence`: "" | "↑" | "↓" | "↕"diff --git a/src/cli.rs b/src/cli.rsindex 3cb223bf9..f45194e0d 100644--- a/src/cli.rs+++ b/src/cli.rs@@ -402,15 +402,15 @@ Displays worktrees in a table format with status information, commit details, an## STATUS SYMBOLS-Order: `?!+»✘ =≠≡∅ ↻⋈ ↑↓↕ ⇡⇣⇅ ⎇⌫⊠`+Order: `?!+»✘ ✖⚠≡∅ ↻⋈ ↑↓↕ ⇡⇣⇅ ⎇⌫⊠`- `?` Untracked files present- `!` Modified files (unstaged changes)- `+` Staged files (ready to commit)- `»` Renamed files- `✘` Deleted files-- `=` **Merge conflicts** (unmerged paths in working tree)-- `≠` **Potential conflicts** with main (`--full` only, detected via `git merge-tree`)+- `✖` **Merge conflicts** - unresolved conflicts in working tree (fix before continuing)+- `⚠` **Would conflict** - merging into main would fail- `≡` Working tree matches main (identical contents, regardless of commit history)- `∅` No commits (no commits ahead AND no uncommitted changes)- `↻` Rebase in progress@@ -432,7 +432,7 @@ Order: `?!+»✘ =≠≡∅ ↻⋈ ↑↓↕ ⇡⇣⇅ ⎇⌫⊠`Use `--format=json` for structured data. Each object contains two status maps:**`status` (variant names for querying):**-- `branch_state`: \"\" | \"Conflicts\" | \"PotentialConflicts\" | \"MatchesMain\" | \"NoCommits\"+- `branch_state`: \"\" | \"Conflicts\" | \"MergeTreeConflicts\" | \"MatchesMain\" | \"NoCommits\"- `git_operation`: \"\" | \"Rebase\" | \"Merge\"- `worktree_attrs`: object (worktrees only) with:- `locked`: null | \"reason string\"@@ -448,7 +448,7 @@ Use `--format=json` for structured data. Each object contains two status maps:- `user_status`: string (optional) - custom status from git config**`status_symbols` (display symbols for rendering):**-- `branch_state`: \"\" | \"=\" | \"≠\" | \"≡\" | \"∅\"+- `branch_state`: \"\" | \"✖\" | \"⚠\" | \"≡\" | \"∅\"- `git_operation`: \"\" | \"↻\" | \"⋈\"- `worktree_attrs`: \"⎇\" (branch) | \"⌫\" (prunable) | \"⊠\" (locked) | \"\"- `main_divergence`: \"\" | \"↑\" | \"↓\" | \"↕\"diff --git a/src/commands/list/collect.rs b/src/commands/list/collect.rsindex 31fc05a33..319f97060 100644--- a/src/commands/list/collect.rs+++ b/src/commands/list/collect.rs@@ -57,11 +57,12 @@ pub(super) enum CellUpdate {/// Symbols for uncommitted changes (?, !, +, », ✘)working_tree_symbols: String,is_dirty: bool,+ has_conflicts: bool,},- /// Merge conflicts with main- Conflicts {+ /// Potential merge conflicts with main (merge-tree simulation)+ MergeTreeConflicts {item_idx: usize,- has_conflicts: bool,+ has_merge_tree_conflicts: bool,},/// Git operation in progress (rebase/merge)WorktreeState {@@ -93,7 +94,7 @@ impl CellUpdate {| CellUpdate::AheadBehind { item_idx, .. }| CellUpdate::BranchDiff { item_idx, .. }| CellUpdate::WorkingTreeDiff { item_idx, .. }- | CellUpdate::Conflicts { item_idx, .. }+ | CellUpdate::MergeTreeConflicts { item_idx, .. }| CellUpdate::WorktreeState { item_idx, .. }| CellUpdate::UserStatus { item_idx, .. }| CellUpdate::Upstream { item_idx, .. }@@ -211,7 +212,7 @@ fn determine_worktree_branch_state(fn compute_item_status_symbols(item: &mut ListItem,base_branch: Option<&str>,- has_conflicts: bool,+ has_merge_tree_conflicts: bool,user_status: Option<String>,) {// Common fields for both worktrees and branches@@ -252,11 +253,12 @@ fn compute_item_status_symbols(};// Combine conflicts and branch state (mutually exclusive)+ let has_conflicts = data.has_conflicts.unwrap_or(false);let branch_state = if has_conflicts {BranchState::Conflicts+ } else if has_merge_tree_conflicts {+ BranchState::MergeTreeConflicts} else {- // has_potential_conflicts is always false currently (--full not implemented)- // but when implemented, it would go here as: else if has_potential_conflicts { PotentialConflicts }branch_state};@@ -282,10 +284,14 @@ fn compute_item_status_symbols(// Branch state - branches can only show Conflicts or NoCommits// (MatchesMain only applies to worktrees since branches don't have working trees)- let branch_state = if has_conflicts {- BranchState::Conflicts- } else if counts.ahead == 0 {- BranchState::NoCommits+ let branch_state = if has_merge_tree_conflicts {+ BranchState::MergeTreeConflicts+ } else if let Some(ref c) = item.counts {+ if c.ahead == 0 {+ BranchState::NoCommits+ } else {+ BranchState::None+ }} else {BranchState::None};@@ -317,7 +323,7 @@ fn drain_cell_updates(mut on_update: impl FnMut(usize, &mut ListItem, bool, Option<String>),) {// Temporary storage for data needed by status_symbols computation- let mut has_conflicts_map: Vec<Option<bool>> = vec![None; worktree_items.len()];+ let mut merge_tree_conflicts_map: Vec<Option<bool>> = vec![None; worktree_items.len()];let mut user_status_map: Vec<Option<Option<String>>> = vec![None; worktree_items.len()];// Process cell updates as they arrive@@ -343,20 +349,22 @@ fn drain_cell_updates(working_tree_diff_with_main,working_tree_symbols,is_dirty,+ has_conflicts,} => {if let ItemKind::Worktree(data) = &mut worktree_items[item_idx].kind {data.working_tree_diff = Some(working_tree_diff);data.working_tree_diff_with_main = Some(working_tree_diff_with_main);data.working_tree_symbols = Some(working_tree_symbols);data.is_dirty = Some(is_dirty);+ data.has_conflicts = Some(has_conflicts);}}- CellUpdate::Conflicts {+ CellUpdate::MergeTreeConflicts {item_idx,- has_conflicts,+ has_merge_tree_conflicts,} => {// Store temporarily for status_symbols computation- has_conflicts_map[item_idx] = Some(has_conflicts);+ merge_tree_conflicts_map[item_idx] = Some(has_merge_tree_conflicts);}CellUpdate::WorktreeState {item_idx,@@ -386,12 +394,12 @@ fn drain_cell_updates(}// Invoke rendering callback (progressive mode re-renders rows, buffered mode does nothing)- let has_conflicts = has_conflicts_map[item_idx].unwrap_or(false);+ let has_merge_tree_conflicts = merge_tree_conflicts_map[item_idx].unwrap_or(false);let user_status = user_status_map[item_idx].clone().unwrap_or(None);on_update(item_idx,&mut worktree_items[item_idx],- has_conflicts,+ has_merge_tree_conflicts,user_status,);}@@ -433,7 +441,7 @@ pub fn collect(show_branches: bool,show_full: bool,fetch_ci: bool,- check_conflicts: bool,+ check_merge_tree_conflicts: bool,show_progress: bool,render_table: bool,) -> Result<Option<super::model::ListData>, GitError> {@@ -626,7 +634,7 @@ pub fn collect(// Create collection optionslet options = super::collect_progressive_impl::CollectOptions {fetch_ci,- check_conflicts,+ check_merge_tree_conflicts,};// Spawn worktree collection in background thread@@ -685,7 +693,7 @@ pub fn collect(drain_cell_updates(rx,&mut all_items,- |item_idx, info, has_conflicts, user_status| {+ |item_idx, info, has_merge_tree_conflicts, user_status| {// Compute/recompute status symbols as data arrives (both modes)// This is idempotent and updates status as new data (like upstream) arriveslet item_base_branch = if info.is_primary() {@@ -693,7 +701,12 @@ pub fn collect(} else {Some(base_branch.as_str())};- compute_item_status_symbols(info, item_base_branch, has_conflicts, user_status);+ compute_item_status_symbols(+ info,+ item_base_branch,+ has_merge_tree_conflicts,+ user_status,+ );// Progressive mode only: update UIif show_progress {diff --git a/src/commands/list/collect_progressive_impl.rs b/src/commands/list/collect_progressive_impl.rsindex fa6862ebe..d0b30b1dc 100644--- a/src/commands/list/collect_progressive_impl.rs+++ b/src/commands/list/collect_progressive_impl.rs@@ -22,7 +22,7 @@ use super::model::{AheadBehind, BranchDiffTotals, CommitDetails, UpstreamStatus}#[derive(Clone, Copy)]pub struct CollectOptions {pub fetch_ci: bool,- pub check_conflicts: bool,+ pub check_merge_tree_conflicts: bool,}/// Context for spawning parallel tasks.@@ -122,7 +122,8 @@ fn spawn_working_tree_diff<'scope>(// TODO: Handle errorsif let Ok(status_output) = repo.run_command(&["status", "--porcelain"]) {// Parse status to get symbols and is_dirty- let (working_tree_symbols, is_dirty) = parse_status_for_symbols(&status_output);+ let (working_tree_symbols, is_dirty, has_conflicts) =+ parse_status_for_symbols(&status_output);// Get working tree difflet working_tree_diff = if is_dirty {@@ -143,38 +144,39 @@ fn spawn_working_tree_diff<'scope>(working_tree_diff_with_main,working_tree_symbols,is_dirty,+ has_conflicts,});}});}-/// Spawn task 5: Conflicts check-fn spawn_conflicts<'scope>(+/// Spawn task 5: Potential conflicts check (merge-tree vs main)+fn spawn_merge_tree_conflicts<'scope>(s: &'scope std::thread::Scope<'scope, '_>,ctx: &TaskContext,- check_conflicts: bool,+ check_merge_tree_conflicts: bool,send_default_on_skip: bool,tx: Sender<CellUpdate>,) {let item_idx = ctx.item_idx;- if check_conflicts && let Some(base) = ctx.base_branch.as_deref() {+ if check_merge_tree_conflicts && let Some(base) = ctx.base_branch.as_deref() {let sha = ctx.commit_sha.clone();let path = ctx.repo_path.clone();let base = base.to_string();s.spawn(move || {let repo = Repository::at(&path);// TODO: Handle errors- let has_conflicts = repo.has_merge_conflicts(&base, &sha).unwrap_or(false);- let _ = tx.send(CellUpdate::Conflicts {+ let has_merge_tree_conflicts = repo.has_merge_conflicts(&base, &sha).unwrap_or(false);+ let _ = tx.send(CellUpdate::MergeTreeConflicts {item_idx,- has_conflicts,+ has_merge_tree_conflicts,});});} else if send_default_on_skip {// Send default value when not checking conflicts (worktree behavior)- let _ = tx.send(CellUpdate::Conflicts {+ let _ = tx.send(CellUpdate::MergeTreeConflicts {item_idx,- has_conflicts: false,+ has_merge_tree_conflicts: false,});}// Branch behavior: don't send anything when not checking@@ -337,7 +339,13 @@ pub fn collect_worktree_progressive(spawn_ahead_behind(s, &ctx, tx.clone());spawn_branch_diff(s, &ctx, tx.clone());spawn_working_tree_diff(s, &ctx, tx.clone());- spawn_conflicts(s, &ctx, options.check_conflicts, true, tx.clone());+ spawn_merge_tree_conflicts(+ s,+ &ctx,+ options.check_merge_tree_conflicts,+ true,+ tx.clone(),+ );spawn_worktree_state(s, &ctx, tx.clone());spawn_user_status(s, &ctx, tx.clone());spawn_upstream(s, &ctx, true, tx.clone());@@ -345,14 +353,15 @@ pub fn collect_worktree_progressive(});}-/// Parse git status output to extract working tree symbols.-/// Returns (symbols, is_dirty).-fn parse_status_for_symbols(status_output: &str) -> (String, bool) {+/// Parse git status output to extract working tree symbols and conflict state.+/// Returns (symbols, is_dirty, has_conflicts).+fn parse_status_for_symbols(status_output: &str) -> (String, bool, bool) {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 has_conflicts = false;for line in status_output.lines() {if line.len() < 2 {@@ -382,6 +391,15 @@ fn parse_status_for_symbols(status_output: &str) -> (String, bool) {if index_status == 'D' || worktree_status == 'D' {has_deleted = true;}++ // Detect unmerged/conflicting paths (porcelain v1 two-letter codes)+ let is_unmerged_pair = matches!(+ (index_status, worktree_status),+ ('U', _) | (_, 'U') | ('A', 'A') | ('D', 'D') | ('A', 'D') | ('D', 'A')+ );+ if is_unmerged_pair {+ has_conflicts = true;+ }}// Build working tree string@@ -404,7 +422,7 @@ fn parse_status_for_symbols(status_output: &str) -> (String, bool) {let is_dirty = has_untracked || has_modified || has_staged || has_renamed || has_deleted;- (working_tree, is_dirty)+ (working_tree, is_dirty, has_conflicts)}/// Collect branch data progressively, sending cell updates as each task completes.@@ -438,7 +456,13 @@ pub fn collect_branch_progressive(spawn_ahead_behind(s, &ctx, tx.clone());spawn_branch_diff(s, &ctx, tx.clone());spawn_upstream(s, &ctx, false, tx.clone());- spawn_conflicts(s, &ctx, options.check_conflicts, false, tx.clone());+ spawn_merge_tree_conflicts(+ s,+ &ctx,+ options.check_merge_tree_conflicts,+ false,+ tx.clone(),+ );spawn_ci_status(s, &ctx, options.fetch_ci, tx);});}diff --git a/src/commands/list/layout.rs b/src/commands/list/layout.rsindex 697eefde5..b5507f1a2 100644--- a/src/commands/list/layout.rs+++ b/src/commands/list/layout.rs@@ -842,6 +842,7 @@ mod tests {is_primary: false,working_tree_symbols: Some(String::new()),is_dirty: Some(false),+ has_conflicts: Some(false),working_diff_display: None,})),};@@ -919,6 +920,7 @@ mod tests {is_primary: true, // Primary worktree: no ahead/behind shownworking_tree_symbols: Some(String::new()),is_dirty: Some(false),+ has_conflicts: Some(false),working_diff_display: None,})),};diff --git a/src/commands/list/mod.rs b/src/commands/list/mod.rsindex f7b3f18a8..ed63c40f4 100644--- a/src/commands/list/mod.rs+++ b/src/commands/list/mod.rs@@ -100,7 +100,7 @@ pub fn handle_list(let repo = Repository::current();let fetch_ci = show_full; // Only fetch CI with --full (expensive)- let check_conflicts = show_full; // Only check conflicts with --full (expensive)+ let check_merge_tree_conflicts = show_full; // Only check conflicts with --full (expensive)// Progressive rendering only for table format with Progressive modelet show_progress = match format {@@ -116,7 +116,7 @@ pub fn handle_list(show_branches,show_full,fetch_ci,- check_conflicts,+ check_merge_tree_conflicts,show_progress,render_table,)?;diff --git a/src/commands/list/model.rs b/src/commands/list/model.rsindex ed195b918..82f8404e7 100644--- a/src/commands/list/model.rs+++ b/src/commands/list/model.rs@@ -82,6 +82,9 @@ pub struct WorktreeData {/// is_dirty flag - used for status computation, not serialized#[serde(skip)]pub(crate) is_dirty: Option<bool>,+ /// Unresolved paths present in working tree (merge or rebase conflicts)+ #[serde(skip)]+ pub(crate) has_conflicts: Option<bool>,#[serde(skip_serializing_if = "Option::is_none")]pub working_diff_display: Option<String>,}@@ -352,7 +355,7 @@ impl serde::Serialize for UpstreamDivergence {/// Branch state including conflicts////// These states are mutually exclusive:-/// - Conflicts (= or ≠) indicate changes that differ from main+/// - Conflicts (✖ or ⚠) indicate changes that conflict with main/// - MatchesMain (≡) means identical to main (can't have conflicts)/// - NoCommits (∅) means nothing ahead of main (can't conflict)#[derive(Debug, Clone, Copy, PartialEq, Eq, Default, serde::Serialize)]@@ -363,13 +366,11 @@ pub enum BranchState {#[serde(rename = "")]None,/// Actual merge conflicts with main (unmerged paths in working tree)- #[serde(rename = "=")]+ #[serde(rename = "✖")]Conflicts,- /// Potential conflicts with main (detected via --full, using git merge-tree)- /// TODO: Implement when --full mode is complete- #[allow(dead_code)]- #[serde(rename = "≠")]- PotentialConflicts,+ /// Merge-tree conflicts with main (simulated via git merge-tree)+ #[serde(rename = "⚠")]+ MergeTreeConflicts,/// Working tree identical to main branch#[serde(rename = "≡")]MatchesMain,@@ -382,8 +383,8 @@ impl std::fmt::Display for BranchState {fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {match self {Self::None => Ok(()),- Self::Conflicts => write!(f, "="),- Self::PotentialConflicts => write!(f, "≠"),+ Self::Conflicts => write!(f, "✖"),+ Self::MergeTreeConflicts => write!(f, "⚠"),Self::MatchesMain => write!(f, "≡"),Self::NoCommits => write!(f, "∅"),}@@ -453,7 +454,7 @@ impl PositionMask {pub const FULL: Self = Self {widths: [5, // POS_3_WORKING_TREE: ?!+»✘ (max 5 symbols)- 1, // POS_0A_BRANCH_STATE: =≠≡∅ (1 char, mutually exclusive)+ 1, // POS_0A_BRANCH_STATE: ✖⚠≡∅ (1 char, mutually exclusive)1, // POS_0C_GIT_OPERATION: ↻ or ⋈ (1 char)1, // POS_1_MAIN_DIVERGENCE: ↑, ↓, ↕ (1 char)1, // POS_2_UPSTREAM_DIVERGENCE: ⇡, ⇣, ⇅ (1 char)@@ -471,7 +472,7 @@ impl PositionMask {/// Structured status symbols for aligned rendering////// Symbols are categorized to enable vertical alignment in table output:-/// - Position 0a: Conflicts or branch state (=, ≠, ≡, ∅) - mutually exclusive+/// - Position 0a: Conflicts or branch state (✖, ⚠, ≡, ∅) - mutually exclusive/// - Position 0c: Git operation (↻, ⋈)/// - Position 0d: Item attributes (⎇ for branches, ⌫⊠ for worktrees - priority-only)/// - Position 1: Main branch divergence (↑, ↓, ↕)@@ -482,7 +483,7 @@ impl PositionMask {/// ## Mutual Exclusivity////// **Mutually exclusive (enforced by type system):**-/// - = vs ≠ vs ≡ vs ∅: BranchState enum (combined position)+/// - ✖ vs ⚠ vs ≡ vs ∅: BranchState enum (combined position)/// - ↻ vs ⋈: Git operation (GitOperation enum)/// - ↑ vs ↓ vs ↕: Main divergence (MainDivergence enum)/// - ⇡ vs ⇣ vs ⇅: Upstream divergence (UpstreamDivergence enum)@@ -497,7 +498,7 @@ impl PositionMask {pub struct StatusSymbols {/// Branch state including conflicts (mutually exclusive)/// Position 0a - BranchState enum- /// Priority: Conflicts (=) > PotentialConflicts (≠) > MatchesMain (≡) > NoCommits (∅)+ /// Priority: Conflicts (✖) > MergeTreeConflicts (⚠) > MatchesMain (≡) > NoCommits (∅)pub(crate) branch_state: BranchState,/// Git operation in progress@@ -546,7 +547,7 @@ impl StatusSymbols {////// Aligns all symbol types at fixed positions, but only includes positions/// that are present in the mask:- /// - Position 0a: Conflicts or branch state (=, ≠, ≡, ∅)+ /// - Position 0a: Conflicts or branch state (✖, ⚠, ≡, ∅)/// - Position 0c: Git operation (↻, ⋈, or space)/// - Position 0d: Worktree attributes (⊠⚠ or space)/// - Position 1: Main divergence (↑, ↓, ↕, or space)@@ -574,8 +575,8 @@ impl StatusSymbols {// - Cyan: Working tree changes (activity)// - Dimmed (HINT): Branch state symbols that indicate removability + divergence arrows (low urgency)let branch_state_str = match self.branch_state {- BranchState::Conflicts => format!("{ERROR}={ERROR:#}"),- BranchState::PotentialConflicts => format!("{WARNING}≠{WARNING:#}"),+ BranchState::Conflicts => format!("{ERROR}✖{ERROR:#}"),+ BranchState::MergeTreeConflicts => format!("{WARNING}⚠{WARNING:#}"),BranchState::MatchesMain => format!("{HINT}≡{HINT:#}"),BranchState::NoCommits => format!("{HINT}∅{HINT:#}"),BranchState::None => String::new(),@@ -772,7 +773,7 @@ impl serde::Serialize for StatusSymbols {let branch_state_variant = match self.branch_state {BranchState::None => "",BranchState::Conflicts => "Conflicts",- BranchState::PotentialConflicts => "PotentialConflicts",+ BranchState::MergeTreeConflicts => "MergeTreeConflicts",BranchState::MatchesMain => "MatchesMain",BranchState::NoCommits => "NoCommits",};diff --git a/src/md_help.rs b/src/md_help.rsindex 5d7744772..c0deacfbb 100644--- a/src/md_help.rs+++ b/src/md_help.rs@@ -38,14 +38,14 @@ fn colorize_status_circles(text: &str) -> String {.replace("● failed", &format!("{error}●{error:#} failed")).replace("● conflicts", &format!("{warning}●{warning:#} conflicts")).replace("● no-ci", &format!("{gray}●{gray:#} no-ci"))- // Conflicts: = is ERROR (red), ≠ is WARNING (yellow)+ // Conflicts: ✖ is ERROR (red), ⚠ is WARNING (yellow).replace(- "= Merge conflicts",- &format!("{error}={error:#} Merge conflicts"),+ "✖ Merge conflicts",+ &format!("{error}✖{error:#} Merge conflicts"),).replace(- "≠ Potential conflicts",- &format!("{warning}≠{warning:#} Potential conflicts"),+ "⚠ Would conflict",+ &format!("{warning}⚠{warning:#} Would conflict"),)// Git operations: WARNING (yellow).replace("↻ Rebase", &format!("{warning}↻{warning:#} Rebase"))diff --git a/tests/integration_tests/list.rs b/tests/integration_tests/list.rsindex b18b5ced6..98080a27e 100644--- a/tests/integration_tests/list.rs+++ b/tests/integration_tests/list.rs@@ -1580,8 +1580,8 @@ fn test_list_maximum_status_with_git_operation() {#[test]fn test_list_maximum_status_symbols() {// Test the maximum status symbols possible:- // ?!+»✘ (5) + = (1) + ⊠ (1) + ↕ (1) + ⇅ (1) + 🤖 (2) = 11 chars- // Missing: ↻ (git operation - can't have with divergence), ◇ (bare), ⚠ (prunable)+ // ?!+»✘ (5) + ⚠ (1) + ⊠ (1) + ↕ (1) + ⇅ (1) + 🤖 (2) = 11 chars+ // Missing: ✖ (actual conflicts), ↻ (git operation - can't have with divergence), ◇ (bare), ⚠ (prunable)let mut repo = TestRepo::new();// Create initial commit on main with shared filesdiff --git a/tests/snapshots/integration__integration_tests__help__help_list.snap b/tests/snapshots/integration__integration_tests__help__help_list.snapindex c0e79f6da..2f6718887 100644--- a/tests/snapshots/integration__integration_tests__help__help_list.snap+++ b/tests/snapshots/integration__integration_tests__help__help_list.snap@@ -1,5 +1,6 @@---source: tests/integration_tests/help.rs+assertion_line: 16info:program: wtargs:@@ -85,15 +86,16 @@ branch workflows)[38;5;10mSTATUS SYMBOLS[39m-Order: ?!+»✘ =≠≡∅ ↻⋈ ↑↓↕ ⇡⇣⇅ ⎇⌫⊠+Order: ?!+»✘ ✖⚠≡∅ ↻⋈ ↑↓↕ ⇡⇣⇅ ⎇⌫⊠- [36m?[0m Untracked files present- [36m![0m Modified files (unstaged changes)- [36m+[0m Staged files (ready to commit)- [36m»[0m Renamed files- [36m✘[0m Deleted files-- [31m=[0m Merge conflicts (unmerged paths in working tree)-- [33m≠[0m Potential conflicts with main (--full only, detected via git merge-tree)+- [31m✖[0m Merge conflicts - unresolved conflicts in working tree (fix before+continuing)+- [33m⚠[0m Would conflict - merging into main would fail- [2m≡[0m Working tree matches main (identical contents, regardless of commit history)- [2m∅[0m No commits (no commits ahead AND no uncommitted changes)- [33m↻[0m Rebase in progress@@ -115,7 +117,7 @@ Rows are dimmed when no unique work (≡ matches main OR ∅ no commits).Use --format=json for structured data. Each object contains two status maps:status (variant names for querying):-- branch_state: "" | "Conflicts" | "PotentialConflicts" | "MatchesMain" |+- branch_state: "" | "Conflicts" | "MergeTreeConflicts" | "MatchesMain" |"NoCommits"- git_operation: "" | "Rebase" | "Merge"- worktree_attrs: object (worktrees only) with:@@ -132,7 +134,7 @@ status (variant names for querying):- user_status: string (optional) - custom status from git configstatus_symbols (display symbols for rendering):-- branch_state: "" | "=" | "≠" | "≡" | "∅"+- branch_state: "" | "✖" | "⚠" | "≡" | "∅"- git_operation: "" | "↻" | "⋈"- worktree_attrs: "⎇" (branch) | "⌫" (prunable) | "⊠" (locked) | ""- main_divergence: "" | "↑" | "↓" | "↕"diff --git a/tests/snapshots/integration__integration_tests__list__maximum_status_symbols.snap b/tests/snapshots/integration__integration_tests__list__maximum_status_symbols.snapindex d0417800a..3cea19f28 100644--- a/tests/snapshots/integration__integration_tests__list__maximum_status_symbols.snap+++ b/tests/snapshots/integration__integration_tests__list__maximum_status_symbols.snap@@ -15,10 +15,11 @@ info:GIT_CONFIG_KEY_0: advice.mergeConflictGIT_CONFIG_SYSTEM: /dev/nullGIT_CONFIG_VALUE_0: "false"+ GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpUXYxZg/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpm9ZVRy/test-config.toml---success: trueexit_code: 0@@ -27,6 +28,6 @@ exit_code: 0----- stderr -----[1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mmain…±[0m [1mPath[0m [1mRemote⇅[0m [1mCI[0m [1mCommit[0m [1mAge[0m [1mMessage[0m[1m[35mmain[0m [2m⇡[0m [1m[35m./test-repo[0m [32m↑1[0m [2m[31m↓0[0m [2m85ed6d3d[0m [2m10 months ago[0m [2mMain advances[0m-feature [36m?!+»✘[0m[31m=[0m [2m↕[0m[2m⇅[0m[33m⊠[0m🤖 [32m+2[0m [31m-2[0m [32m↑2[0m [2m[31m↓1[0m [32m+3[0m [31m-1[0m ./feature [32m↑1[0m [2m[31m↓1[0m [2m4afb2b9e[0m [2m10 months ago[0m [2mLocal commit[0m+feature [36m?!+»✘[0m[33m⚠[0m [2m↕[0m[2m⇅[0m[33m⊠[0m🤖 [32m+2[0m [31m-2[0m [32m↑2[0m [2m[31m↓1[0m [32m+3[0m [31m-1[0m ./feature [32m↑1[0m [2m[31m↓1[0m [2m4afb2b9e[0m [2m10 months ago[0m [2mLocal commit[0m⚪ [2mShowing 2 worktrees, 1 with changes, 1 ahead[0mdiff --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.snapindex eb78846e3..203457014 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@@ -10,13 +10,16 @@ info:COLUMNS: "150"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_CONFIG_COUNT: "1"GIT_CONFIG_GLOBAL: /dev/null+ GIT_CONFIG_KEY_0: advice.mergeConflictGIT_CONFIG_SYSTEM: /dev/null+ GIT_CONFIG_VALUE_0: "false"GIT_EDITOR: ""LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp5efxMi/test-config.toml---success: trueexit_code: 0@@ -25,6 +28,6 @@ exit_code: 0----- stderr -----[1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mmain…±[0m [1mPath[0m [1mRemote⇅[0m [1mCI[0m [1mCommit[0m [1mAge[0m [1mMessage[0m[1m[35mmain[0m [1m[35m./test-repo[0m [2mb7c14ce1[0m [2m10 months ago[0m [2mMain conflicting changes[0m-feature [36m?!+[0m [33m↻[0m [33m⊠[0m🤖 [32m+7[0m ./feature [2mb7c14ce1[0m [2m10 months ago[0m [2mMain conflicting changes[0m+feature [36m?!+[0m [31m✖[0m[33m↻[0m [33m⊠[0m🤖 [32m+7[0m ./feature [2mb7c14ce1[0m [2m10 months ago[0m [2mMain conflicting changes[0m⚪ [2mShowing 2 worktrees, 1 with changes[0m