Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
docs(list): align status-symbol tables with JSON by type (#3139)
Maximilian Roos61f3a296d9dd
diff --git a/docs/content/list.md b/docs/content/list.mdindex d5ea17a59..aee840338 100644--- a/docs/content/list.md+++ b/docs/content/list.md@@ -105,23 +105,25 @@ The leftmost column marks each row by physical presence, from most present to le### CI status-The CI column shows the branch's open PR/MR — `#3035` on GitHub, Gitea, and Azure DevOps, `!3035` on GitLab — colored by pipeline status, or a bare `#` when no number is available (e.g. branch workflows without a PR/MR):+The CI column shows the branch's open PR/MR — `#3035` on GitHub, Gitea, and Azure DevOps, `!3035` on GitLab — colored by pipeline status, or a bare `#` when no number is available (e.g. branch workflows without a PR/MR). One color folds two JSON fields: green/blue/red/yellow/gray are `ci.status`; magenta/cyan are `ci.review_state`. The `Value` column is the matching JSON string from `--format=json`:-| Indicator | Meaning |-|-----------|---------|-| <span style='color:#0a0'>#</span> green | All checks passed |-| <span style='color:#00a'>#</span> blue | Checks running |-| <span style='color:#a00'>#</span> red | Checks failed |-| <span style='color:#a0a'>#</span> magenta | Reviewer requested changes |-| <span style='color:#0aa'>#</span> cyan | Review required, not yet given |-| <span style='color:#a60'>#</span> yellow | Merge conflicts with base |-| <span style='color:#888'>#</span> gray | No checks configured |-| <span style='color:#a60'>⚠</span> yellow | Fetch error (rate limit, network) |-| (blank) | No upstream or no PR/MR |+| Indicator | Value | Meaning |+|-----------|-------|---------|+| <span style='color:#0a0'>#</span> green | `"passed"` | All checks passed |+| <span style='color:#00a'>#</span> blue | `"running"` | Checks in progress |+| <span style='color:#a00'>#</span> red | `"failed"` | One or more checks failed |+| <span style='color:#a60'>#</span> yellow | `"conflicts"` | Merge conflicts with the target branch |+| <span style='color:#888'>#</span> gray | `"no-ci"` | No PR/MR, or no checks configured |+| <span style='color:#a60'>⚠</span> yellow | `"error"` | CI status could not be fetched (rate limit, network, etc.) |+| <span style='color:#a0a'>#</span> magenta | `"changes_requested"` | A reviewer requested changes |+| <span style='color:#0aa'>#</span> cyan | `"pending"` | A review is required (e.g. branch protection) but not yet given |+| (blank) | `ci` absent | No upstream, or no PR/MR and no branch workflow |-Review state merges into the same color where its required action ranks: changes-requested (magenta) outranks running checks — waiting can't clear it — while an outstanding required review (cyan) only recolors an otherwise green or quiet branch. Cool colors mean waiting, warm colors mean act. A PR with no review signal (no required reviewers and no reviews) keeps its plain CI color, and draft PRs appear dimmed.+The two remaining `ci.review_state` values have no indicator of their own: `"draft"` only dims the cell and `"approved"` leaves the color unchanged.-CI cells are clickable links to the PR or pipeline page, and appear dimmed when unpushed local changes make the status stale. PRs/MRs are checked first, then branch workflows/pipelines for branches with an upstream. Local-only branches show blank; remote-only branches — visible with `--remotes` — get CI status detection. Results are cached for 30-60 seconds; use `wt config state` to view or clear.+Color precedence resolves the fold: changes-requested (magenta) outranks running checks — waiting can't clear it — while an outstanding required review (cyan) only recolors an otherwise green or quiet branch. Cool colors mean waiting, warm colors mean act. An approved PR, or one with no review signal at all (no required reviewers and no reviews), keeps its plain `ci.status` color — `ci.review_state` is then `"approved"` or absent, respectively. GitLab MR data carries only `"pending"` and `"draft"` — no approved or changes-requested signal.++CI cells are clickable links to the PR or pipeline page, and appear dimmed for a draft PR/MR (`"draft"`) or when unpushed local changes make the status stale (`ci.stale`). PRs/MRs are checked first, then branch workflows/pipelines for branches with an upstream. Local-only branches show blank; remote-only branches — visible with `--remotes` — get CI status detection. Results are cached for 30-60 seconds; use `wt config state` to view or clear.### LLM summaries@@ -144,35 +146,62 @@ A column that renders empty for every row is dropped from the table. Templates,## Status symbols-The Status column has multiple subcolumns. Within each, only the first matching symbol is shown (listed in priority order):--| Subcolumn | Symbol | Meaning |-|-----------|--------|---------|-| Working tree (1) | `+` | Staged files |-| Working tree (2) | `!` | Modified files (unstaged) |-| Working tree (3) | `?` | Untracked files |-| Worktree | `✘` | Merge conflicts |-| | `⤴` | Rebase in progress |-| | `⤵` | Merge in progress |-| | `/` | Branch without worktree |-| | `⚑` | Branch-worktree mismatch (branch name doesn't match worktree path) |-| | `⊟` | Prunable (directory missing) |-| | `⊞` | Locked worktree |-| Default branch | `^` | Is the default branch |-| | `∅` | Orphan branch (no common ancestor with the default branch) |-| | `✗` | Would conflict if merged to the default branch; with `--full`, includes uncommitted changes |-| | `_` | Same commit as the default branch, clean |-| | `–` | Same commit as the default branch, uncommitted changes |-| | `⊂` | Content [integrated](@/remove.md#branch-cleanup) into the default branch or target |-| | `↕` | Diverged from the default branch |-| | `↑` | Ahead of the default branch |-| | `↓` | Behind the default branch |-| Remote | `\|` | In sync with remote |-| | `⇅` | Diverged from remote |-| | `⇡` | Ahead of remote |-| | `⇣` | Behind remote |--Rows are dimmed when [safe to delete](@/remove.md#branch-cleanup) (`_` same commit with clean working tree or `⊂` content integrated).+The Status column packs several subcolumns, left to right, each mapping to a field in `--format=json`. Working-tree flags are independent and co-occur — any combination shows at once. The other subcolumns are mutually exclusive: each shows a single symbol, the highest-priority state in top-to-bottom table order, and is blank when nothing applies.++### Working tree++Independent flags from `git status`; several can show at once (e.g. `+!?`). Each maps to a boolean in the `working_tree` object:++| Symbol | working_tree | Meaning |+|--------|--------------|---------|+| `+` | `staged` | Staged files |+| `!` | `modified` | Modified files (unstaged) |+| `?` | `untracked` | Untracked files |++`working_tree` also reports `renamed` and `deleted`, which have no dedicated symbol in the column.++### Worktree++An in-progress git operation, a worktree-location attribute, or a branch with no worktree. One symbol shows, highest priority first (`✘ > ⤴ > ⤵ > ⚑ > ⊟ > ⊞ > /`):++| Symbol | JSON | Meaning |+|--------|------|---------|+| `✘` | `operation_state` `"conflicts"` | Merge conflicts |+| `⤴` | `operation_state` `"rebase"` | Rebase in progress |+| `⤵` | `operation_state` `"merge"` | Merge in progress |+| `⚑` | `worktree.state` `"branch_worktree_mismatch"` | Branch name doesn't match the worktree path |+| `⊟` | `worktree.state` `"prunable"` | Prunable (worktree directory missing) |+| `⊞` | `worktree.state` `"locked"` | Locked worktree |+| `/` | `kind` `"branch"` | Branch without a worktree (no `worktree` object) |++### Default branch++The single highest-priority state describing the branch's relation to the default branch; blank when none applies (a normal up-to-date branch). Each symbol is one `main_state` value:++| Symbol | main_state | Meaning |+|--------|------------|---------|+| `^` | `"is_main"` | The main worktree (the repo's home worktree) |+| `∅` | `"orphan"` | No common ancestor with the default branch |+| `✗` | `"would_conflict"` | Merging into the default branch would conflict (simulated with `git merge-tree`); with `--full`, the check includes uncommitted changes |+| `_` | `"empty"` | Same commit as the default branch, working tree clean — safe to remove; row dimmed |+| `–` | `"same_commit"` | Same commit as the default branch, but with uncommitted changes |+| `⊂` | `"integrated"` | Content [integrated](@/remove.md#branch-cleanup) into the default branch or merge target via different history; the matching check is in `integration_reason`; row dimmed |+| `↕` | `"diverged"` | Both ahead of and behind the default branch |+| `↑` | `"ahead"` | Has commits the default branch doesn't |+| `↓` | `"behind"` | Missing commits the default branch has |++Rows are dimmed when [safe to delete](@/remove.md#branch-cleanup) — `_` (`"empty"`) or `⊂` (`"integrated"`).++### Remote++Relation to the tracking branch, derived from the `remote.ahead` / `remote.behind` counts; blank when there is no upstream:++| Symbol | remote | Meaning |+|--------|--------|---------|+| `\|` | `ahead` 0, `behind` 0 | In sync with remote |+| `⇡` | `ahead` > 0 | Ahead of remote |+| `⇣` | `behind` > 0 | Behind remote |+| `⇅` | `ahead` > 0, `behind` > 0 | Diverged from remote |### Placeholder symbols@@ -201,7 +230,7 @@ Query structured data with `--format=json`:| `working_tree` | object | Working tree state (see below) || `main_state` | string | Relation to the default branch (see below) || `integration_reason` | string | Why branch is integrated (see below) |-| `operation_state` | string | `"conflicts"`, `"rebase"`, or `"merge"`; absent when clean |+| `operation_state` | string | `"conflicts"`, `"rebase"`, or `"merge"` (see [Worktree](#worktree)); absent when clean || `main` | object | Relationship to the default branch (see below); absent when is_main || `remote` | object | Tracking branch info (see below); absent when no tracking || `worktree` | object | Worktree metadata (see below) |@@ -230,6 +259,8 @@ Query structured data with `--format=json`:### working_tree object+The five change flags map to the [Working tree](#working-tree) symbols (`renamed` and `deleted` have none of their own):+| Field | Type | Description ||-------|------|-------------|| `staged` | boolean | Has staged files |@@ -249,6 +280,8 @@ Query structured data with `--format=json`:### remote object+`ahead` / `behind` drive the [Remote](#remote) divergence symbol:+| Field | Type | Description ||-------|------|-------------|| `name` | string | Remote name (e.g., `"origin"`) |@@ -258,9 +291,11 @@ Query structured data with `--format=json`:### worktree object+Present only for worktree-kind items. `state` is the worktree-location attribute — see [Worktree](#worktree) for its symbols:+| Field | Type | Description ||-------|------|-------------|-| `state` | string | `"no_worktree"`, `"branch_worktree_mismatch"`, `"prunable"`, `"locked"` (absent when normal) |+| `state` | string | `"branch_worktree_mismatch"`, `"prunable"`, or `"locked"` (absent when normal) || `reason` | string | Reason for locked/prunable state || `detached` | boolean | HEAD is detached |@@ -293,23 +328,23 @@ Top-level `repo` describes the local checkout's repository as derived from the p### main_state values-These values describe the relation to the default branch.--`"is_main"` `"orphan"` `"would_conflict"` `"empty"` `"same_commit"` `"integrated"` `"diverged"` `"ahead"` `"behind"`+The single highest-priority state describing the branch's relation to the default branch; absent when none applies (a normal up-to-date branch). Each value is one Default-branch symbol — see [Default branch](#default-branch) for the symbol and the full meaning of each value (`"is_main"`, `"orphan"`, `"would_conflict"`, `"empty"`, `"same_commit"`, `"integrated"`, `"diverged"`, `"ahead"`, `"behind"`).### integration_reason values-When `main_state == "integrated"`: `"ancestor"` `"trees-match"` `"no-added-changes"` `"merge-adds-nothing"` `"patch-id-match"`--### ci.status values--`"passed"` `"running"` `"failed"` `"conflicts"` `"no-ci"` `"error"`+Set only when `main_state == "integrated"` (the `⊂` symbol), recording which check matched. Checks run cheapest-first and the first match wins. JSON-only — every reason renders as the same `⊂`:-### ci.review_state values+| Value | Meaning |+|-------|---------|+| `"ancestor"` | Branch HEAD is an ancestor of the default branch, which has moved past it |+| `"no-added-changes"` | The three-dot diff (`main...branch`) is empty — no file changes beyond the merge-base |+| `"trees-match"` | Different history, but the branch's tree is identical to the default branch's |+| `"merge-adds-nothing"` | The branch has changes, but merging them leaves the default branch's tree unchanged (e.g. a squash merge where the target advanced on other files) |+| `"patch-id-match"` | The branch's squashed diff matches a single commit on the default branch (e.g. a GitHub/GitLab squash merge) |-`"approved"` `"changes_requested"` `"pending"` `"draft"`+### ci.status and ci.review_state values-The vocabulary matches Claude Code's statusline `pr.review_state` field. `"pending"` means a review is required (e.g. branch protection) but not yet given; a PR with no review signal at all has no `review_state`. GitLab reports only `"pending"` and `"draft"` — MR list data carries no approved or changes-requested signal.+The [CI status](#ci-status) section above is the single source for both fields: the table maps each colored value, and the notes below it cover `"draft"` and `"approved"`. `ci.status` is one of `"passed"`, `"running"`, `"failed"`, `"conflicts"`, `"no-ci"`, `"error"`; `ci.review_state` is one of `"changes_requested"`, `"pending"`, `"draft"`, `"approved"`, absent when the forge reports no review signal. The vocabulary matches Claude Code's statusline `pr.review_state` field.Missing a field that would be generally useful? [Open an issue](https://github.com/max-sixty/worktrunk/issues).diff --git a/skills/worktrunk/reference/list.md b/skills/worktrunk/reference/list.mdindex cbddd5e1a..13e4ae53d 100644--- a/skills/worktrunk/reference/list.md+++ b/skills/worktrunk/reference/list.md@@ -94,23 +94,25 @@ The leftmost column marks each row by physical presence, from most present to le### CI status-The CI column shows the branch's open PR/MR — `#3035` on GitHub, Gitea, and Azure DevOps, `!3035` on GitLab — colored by pipeline status, or a bare `#` when no number is available (e.g. branch workflows without a PR/MR):+The CI column shows the branch's open PR/MR — `#3035` on GitHub, Gitea, and Azure DevOps, `!3035` on GitLab — colored by pipeline status, or a bare `#` when no number is available (e.g. branch workflows without a PR/MR). One color folds two JSON fields: green/blue/red/yellow/gray are `ci.status`; magenta/cyan are `ci.review_state`. The `Value` column is the matching JSON string from `--format=json`:-| Indicator | Meaning |-|-----------|---------|-| `#` green | All checks passed |-| `#` blue | Checks running |-| `#` red | Checks failed |-| `#` magenta | Reviewer requested changes |-| `#` cyan | Review required, not yet given |-| `#` yellow | Merge conflicts with base |-| `#` gray | No checks configured |-| `⚠` yellow | Fetch error (rate limit, network) |-| (blank) | No upstream or no PR/MR |+| Indicator | Value | Meaning |+|-----------|-------|---------|+| `#` green | `"passed"` | All checks passed |+| `#` blue | `"running"` | Checks in progress |+| `#` red | `"failed"` | One or more checks failed |+| `#` yellow | `"conflicts"` | Merge conflicts with the target branch |+| `#` gray | `"no-ci"` | No PR/MR, or no checks configured |+| `⚠` yellow | `"error"` | CI status could not be fetched (rate limit, network, etc.) |+| `#` magenta | `"changes_requested"` | A reviewer requested changes |+| `#` cyan | `"pending"` | A review is required (e.g. branch protection) but not yet given |+| (blank) | `ci` absent | No upstream, or no PR/MR and no branch workflow |-Review state merges into the same color where its required action ranks: changes-requested (magenta) outranks running checks — waiting can't clear it — while an outstanding required review (cyan) only recolors an otherwise green or quiet branch. Cool colors mean waiting, warm colors mean act. A PR with no review signal (no required reviewers and no reviews) keeps its plain CI color, and draft PRs appear dimmed.+The two remaining `ci.review_state` values have no indicator of their own: `"draft"` only dims the cell and `"approved"` leaves the color unchanged.-CI cells are clickable links to the PR or pipeline page, and appear dimmed when unpushed local changes make the status stale. PRs/MRs are checked first, then branch workflows/pipelines for branches with an upstream. Local-only branches show blank; remote-only branches — visible with `--remotes` — get CI status detection. Results are cached for 30-60 seconds; use `wt config state` to view or clear.+Color precedence resolves the fold: changes-requested (magenta) outranks running checks — waiting can't clear it — while an outstanding required review (cyan) only recolors an otherwise green or quiet branch. Cool colors mean waiting, warm colors mean act. An approved PR, or one with no review signal at all (no required reviewers and no reviews), keeps its plain `ci.status` color — `ci.review_state` is then `"approved"` or absent, respectively. GitLab MR data carries only `"pending"` and `"draft"` — no approved or changes-requested signal.++CI cells are clickable links to the PR or pipeline page, and appear dimmed for a draft PR/MR (`"draft"`) or when unpushed local changes make the status stale (`ci.stale`). PRs/MRs are checked first, then branch workflows/pipelines for branches with an upstream. Local-only branches show blank; remote-only branches — visible with `--remotes` — get CI status detection. Results are cached for 30-60 seconds; use `wt config state` to view or clear.### LLM summaries [experimental]@@ -129,35 +131,62 @@ A column that renders empty for every row is dropped from the table. Templates,## Status symbols-The Status column has multiple subcolumns. Within each, only the first matching symbol is shown (listed in priority order):--| Subcolumn | Symbol | Meaning |-|-----------|--------|---------|-| Working tree (1) | `+` | Staged files |-| Working tree (2) | `!` | Modified files (unstaged) |-| Working tree (3) | `?` | Untracked files |-| Worktree | `✘` | Merge conflicts |-| | `⤴` | Rebase in progress |-| | `⤵` | Merge in progress |-| | `/` | Branch without worktree |-| | `⚑` | Branch-worktree mismatch (branch name doesn't match worktree path) |-| | `⊟` | Prunable (directory missing) |-| | `⊞` | Locked worktree |-| Default branch | `^` | Is the default branch |-| | `∅` | Orphan branch (no common ancestor with the default branch) |-| | `✗` | Would conflict if merged to the default branch; with `--full`, includes uncommitted changes |-| | `_` | Same commit as the default branch, clean |-| | `–` | Same commit as the default branch, uncommitted changes |-| | `⊂` | Content [integrated](https://worktrunk.dev/remove/#branch-cleanup) into the default branch or target |-| | `↕` | Diverged from the default branch |-| | `↑` | Ahead of the default branch |-| | `↓` | Behind the default branch |-| Remote | `\|` | In sync with remote |-| | `⇅` | Diverged from remote |-| | `⇡` | Ahead of remote |-| | `⇣` | Behind remote |--Rows are dimmed when [safe to delete](https://worktrunk.dev/remove/#branch-cleanup) (`_` same commit with clean working tree or `⊂` content integrated).+The Status column packs several subcolumns, left to right, each mapping to a field in `--format=json`. Working-tree flags are independent and co-occur — any combination shows at once. The other subcolumns are mutually exclusive: each shows a single symbol, the highest-priority state in top-to-bottom table order, and is blank when nothing applies.++### Working tree++Independent flags from `git status`; several can show at once (e.g. `+!?`). Each maps to a boolean in the `working_tree` object:++| Symbol | working_tree | Meaning |+|--------|--------------|---------|+| `+` | `staged` | Staged files |+| `!` | `modified` | Modified files (unstaged) |+| `?` | `untracked` | Untracked files |++`working_tree` also reports `renamed` and `deleted`, which have no dedicated symbol in the column.++### Worktree++An in-progress git operation, a worktree-location attribute, or a branch with no worktree. One symbol shows, highest priority first (`✘ > ⤴ > ⤵ > ⚑ > ⊟ > ⊞ > /`):++| Symbol | JSON | Meaning |+|--------|------|---------|+| `✘` | `operation_state` `"conflicts"` | Merge conflicts |+| `⤴` | `operation_state` `"rebase"` | Rebase in progress |+| `⤵` | `operation_state` `"merge"` | Merge in progress |+| `⚑` | `worktree.state` `"branch_worktree_mismatch"` | Branch name doesn't match the worktree path |+| `⊟` | `worktree.state` `"prunable"` | Prunable (worktree directory missing) |+| `⊞` | `worktree.state` `"locked"` | Locked worktree |+| `/` | `kind` `"branch"` | Branch without a worktree (no `worktree` object) |++### Default branch++The single highest-priority state describing the branch's relation to the default branch; blank when none applies (a normal up-to-date branch). Each symbol is one `main_state` value:++| Symbol | main_state | Meaning |+|--------|------------|---------|+| `^` | `"is_main"` | The main worktree (the repo's home worktree) |+| `∅` | `"orphan"` | No common ancestor with the default branch |+| `✗` | `"would_conflict"` | Merging into the default branch would conflict (simulated with `git merge-tree`); with `--full`, the check includes uncommitted changes |+| `_` | `"empty"` | Same commit as the default branch, working tree clean — safe to remove; row dimmed |+| `–` | `"same_commit"` | Same commit as the default branch, but with uncommitted changes |+| `⊂` | `"integrated"` | Content [integrated](https://worktrunk.dev/remove/#branch-cleanup) into the default branch or merge target via different history; the matching check is in `integration_reason`; row dimmed |+| `↕` | `"diverged"` | Both ahead of and behind the default branch |+| `↑` | `"ahead"` | Has commits the default branch doesn't |+| `↓` | `"behind"` | Missing commits the default branch has |++Rows are dimmed when [safe to delete](https://worktrunk.dev/remove/#branch-cleanup) — `_` (`"empty"`) or `⊂` (`"integrated"`).++### Remote++Relation to the tracking branch, derived from the `remote.ahead` / `remote.behind` counts; blank when there is no upstream:++| Symbol | remote | Meaning |+|--------|--------|---------|+| `\|` | `ahead` 0, `behind` 0 | In sync with remote |+| `⇡` | `ahead` > 0 | Ahead of remote |+| `⇣` | `behind` > 0 | Behind remote |+| `⇅` | `ahead` > 0, `behind` > 0 | Diverged from remote |### Placeholder symbols@@ -210,7 +239,7 @@ $ wt list --format=json --full | jq '.[] | select(.ci.stale) | .branch'| `working_tree` | object | Working tree state (see below) || `main_state` | string | Relation to the default branch (see below) || `integration_reason` | string | Why branch is integrated (see below) |-| `operation_state` | string | `"conflicts"`, `"rebase"`, or `"merge"`; absent when clean |+| `operation_state` | string | `"conflicts"`, `"rebase"`, or `"merge"` (see [Worktree](#worktree)); absent when clean || `main` | object | Relationship to the default branch (see below); absent when is_main || `remote` | object | Tracking branch info (see below); absent when no tracking || `worktree` | object | Worktree metadata (see below) |@@ -239,6 +268,8 @@ $ wt list --format=json --full | jq '.[] | select(.ci.stale) | .branch'### working_tree object+The five change flags map to the [Working tree](#working-tree) symbols (`renamed` and `deleted` have none of their own):+| Field | Type | Description ||-------|------|-------------|| `staged` | boolean | Has staged files |@@ -258,6 +289,8 @@ $ wt list --format=json --full | jq '.[] | select(.ci.stale) | .branch'### remote object+`ahead` / `behind` drive the [Remote](#remote) divergence symbol:+| Field | Type | Description ||-------|------|-------------|| `name` | string | Remote name (e.g., `"origin"`) |@@ -267,9 +300,11 @@ $ wt list --format=json --full | jq '.[] | select(.ci.stale) | .branch'### worktree object+Present only for worktree-kind items. `state` is the worktree-location attribute — see [Worktree](#worktree) for its symbols:+| Field | Type | Description ||-------|------|-------------|-| `state` | string | `"no_worktree"`, `"branch_worktree_mismatch"`, `"prunable"`, `"locked"` (absent when normal) |+| `state` | string | `"branch_worktree_mismatch"`, `"prunable"`, or `"locked"` (absent when normal) || `reason` | string | Reason for locked/prunable state || `detached` | boolean | HEAD is detached |@@ -302,23 +337,23 @@ Top-level `repo` describes the local checkout's repository as derived from the p### main_state values-These values describe the relation to the default branch.--`"is_main"` `"orphan"` `"would_conflict"` `"empty"` `"same_commit"` `"integrated"` `"diverged"` `"ahead"` `"behind"`+The single highest-priority state describing the branch's relation to the default branch; absent when none applies (a normal up-to-date branch). Each value is one Default-branch symbol — see [Default branch](#default-branch) for the symbol and the full meaning of each value (`"is_main"`, `"orphan"`, `"would_conflict"`, `"empty"`, `"same_commit"`, `"integrated"`, `"diverged"`, `"ahead"`, `"behind"`).### integration_reason values-When `main_state == "integrated"`: `"ancestor"` `"trees-match"` `"no-added-changes"` `"merge-adds-nothing"` `"patch-id-match"`--### ci.status values--`"passed"` `"running"` `"failed"` `"conflicts"` `"no-ci"` `"error"`+Set only when `main_state == "integrated"` (the `⊂` symbol), recording which check matched. Checks run cheapest-first and the first match wins. JSON-only — every reason renders as the same `⊂`:-### ci.review_state values+| Value | Meaning |+|-------|---------|+| `"ancestor"` | Branch HEAD is an ancestor of the default branch, which has moved past it |+| `"no-added-changes"` | The three-dot diff (`main...branch`) is empty — no file changes beyond the merge-base |+| `"trees-match"` | Different history, but the branch's tree is identical to the default branch's |+| `"merge-adds-nothing"` | The branch has changes, but merging them leaves the default branch's tree unchanged (e.g. a squash merge where the target advanced on other files) |+| `"patch-id-match"` | The branch's squashed diff matches a single commit on the default branch (e.g. a GitHub/GitLab squash merge) |-`"approved"` `"changes_requested"` `"pending"` `"draft"`+### ci.status and ci.review_state values-The vocabulary matches Claude Code's statusline `pr.review_state` field. `"pending"` means a review is required (e.g. branch protection) but not yet given; a PR with no review signal at all has no `review_state`. GitLab reports only `"pending"` and `"draft"` — MR list data carries no approved or changes-requested signal.+The [CI status](#ci-status) section above is the single source for both fields: the table maps each colored value, and the notes below it cover `"draft"` and `"approved"`. `ci.status` is one of `"passed"`, `"running"`, `"failed"`, `"conflicts"`, `"no-ci"`, `"error"`; `ci.review_state` is one of `"changes_requested"`, `"pending"`, `"draft"`, `"approved"`, absent when the forge reports no review signal. The vocabulary matches Claude Code's statusline `pr.review_state` field.Missing a field that would be generally useful? Open an issue at https://github.com/max-sixty/worktrunk.diff --git a/src/cli/mod.rs b/src/cli/mod.rsindex 374510ca1..91983c1d7 100644--- a/src/cli/mod.rs+++ b/src/cli/mod.rs@@ -804,23 +804,25 @@ The leftmost column marks each row by physical presence, from most present to le### CI status-The CI column shows the branch's open PR/MR — `#3035` on GitHub, Gitea, and Azure DevOps, `!3035` on GitLab — colored by pipeline status, or a bare `#` when no number is available (e.g. branch workflows without a PR/MR):+The CI column shows the branch's open PR/MR — `#3035` on GitHub, Gitea, and Azure DevOps, `!3035` on GitLab — colored by pipeline status, or a bare `#` when no number is available (e.g. branch workflows without a PR/MR). One color folds two JSON fields: green/blue/red/yellow/gray are `ci.status`; magenta/cyan are `ci.review_state`. The `Value` column is the matching JSON string from `--format=json`:-| Indicator | Meaning |-|-----------|---------|-| `#` green | All checks passed |-| `#` blue | Checks running |-| `#` red | Checks failed |-| `#` magenta | Reviewer requested changes |-| `#` cyan | Review required, not yet given |-| `#` yellow | Merge conflicts with base |-| `#` gray | No checks configured |-| `⚠` yellow | Fetch error (rate limit, network) |-| (blank) | No upstream or no PR/MR |+| Indicator | Value | Meaning |+|-----------|-------|---------|+| `#` green | `"passed"` | All checks passed |+| `#` blue | `"running"` | Checks in progress |+| `#` red | `"failed"` | One or more checks failed |+| `#` yellow | `"conflicts"` | Merge conflicts with the target branch |+| `#` gray | `"no-ci"` | No PR/MR, or no checks configured |+| `⚠` yellow | `"error"` | CI status could not be fetched (rate limit, network, etc.) |+| `#` magenta | `"changes_requested"` | A reviewer requested changes |+| `#` cyan | `"pending"` | A review is required (e.g. branch protection) but not yet given |+| (blank) | `ci` absent | No upstream, or no PR/MR and no branch workflow |-Review state merges into the same color where its required action ranks: changes-requested (magenta) outranks running checks — waiting can't clear it — while an outstanding required review (cyan) only recolors an otherwise green or quiet branch. Cool colors mean waiting, warm colors mean act. A PR with no review signal (no required reviewers and no reviews) keeps its plain CI color, and draft PRs appear dimmed.+The two remaining `ci.review_state` values have no indicator of their own: `"draft"` only dims the cell and `"approved"` leaves the color unchanged.-CI cells are clickable links to the PR or pipeline page, and appear dimmed when unpushed local changes make the status stale. PRs/MRs are checked first, then branch workflows/pipelines for branches with an upstream. Local-only branches show blank; remote-only branches — visible with `--remotes` — get CI status detection. Results are cached for 30-60 seconds; use `wt config state` to view or clear.+Color precedence resolves the fold: changes-requested (magenta) outranks running checks — waiting can't clear it — while an outstanding required review (cyan) only recolors an otherwise green or quiet branch. Cool colors mean waiting, warm colors mean act. An approved PR, or one with no review signal at all (no required reviewers and no reviews), keeps its plain `ci.status` color — `ci.review_state` is then `"approved"` or absent, respectively. GitLab MR data carries only `"pending"` and `"draft"` — no approved or changes-requested signal.++CI cells are clickable links to the PR or pipeline page, and appear dimmed for a draft PR/MR (`"draft"`) or when unpushed local changes make the status stale (`ci.stale`). PRs/MRs are checked first, then branch workflows/pipelines for branches with an upstream. Local-only branches show blank; remote-only branches — visible with `--remotes` — get CI status detection. Results are cached for 30-60 seconds; use `wt config state` to view or clear.### LLM summaries [experimental]@@ -839,35 +841,62 @@ A column that renders empty for every row is dropped from the table. Templates,## Status symbols-The Status column has multiple subcolumns. Within each, only the first matching symbol is shown (listed in priority order):--| Subcolumn | Symbol | Meaning |-|-----------|--------|---------|-| Working tree (1) | `+` | Staged files |-| Working tree (2) | `!` | Modified files (unstaged) |-| Working tree (3) | `?` | Untracked files |-| Worktree | `✘` | Merge conflicts |-| | `⤴` | Rebase in progress |-| | `⤵` | Merge in progress |-| | `/` | Branch without worktree |-| | `⚑` | Branch-worktree mismatch (branch name doesn't match worktree path) |-| | `⊟` | Prunable (directory missing) |-| | `⊞` | Locked worktree |-| Default branch | `^` | Is the default branch |-| | `∅` | Orphan branch (no common ancestor with the default branch) |-| | `✗` | Would conflict if merged to the default branch; with `--full`, includes uncommitted changes |-| | `_` | Same commit as the default branch, clean |-| | `–` | Same commit as the default branch, uncommitted changes |-| | `⊂` | Content [integrated](@/remove.md#branch-cleanup) into the default branch or target |-| | `↕` | Diverged from the default branch |-| | `↑` | Ahead of the default branch |-| | `↓` | Behind the default branch |-| Remote | `\|` | In sync with remote |-| | `⇅` | Diverged from remote |-| | `⇡` | Ahead of remote |-| | `⇣` | Behind remote |--Rows are dimmed when [safe to delete](@/remove.md#branch-cleanup) (`_` same commit with clean working tree or `⊂` content integrated).+The Status column packs several subcolumns, left to right, each mapping to a field in `--format=json`. Working-tree flags are independent and co-occur — any combination shows at once. The other subcolumns are mutually exclusive: each shows a single symbol, the highest-priority state in top-to-bottom table order, and is blank when nothing applies.++### Working tree++Independent flags from `git status`; several can show at once (e.g. `+!?`). Each maps to a boolean in the `working_tree` object:++| Symbol | working_tree | Meaning |+|--------|--------------|---------|+| `+` | `staged` | Staged files |+| `!` | `modified` | Modified files (unstaged) |+| `?` | `untracked` | Untracked files |++`working_tree` also reports `renamed` and `deleted`, which have no dedicated symbol in the column.++### Worktree++An in-progress git operation, a worktree-location attribute, or a branch with no worktree. One symbol shows, highest priority first (`✘ > ⤴ > ⤵ > ⚑ > ⊟ > ⊞ > /`):++| Symbol | JSON | Meaning |+|--------|------|---------|+| `✘` | `operation_state` `"conflicts"` | Merge conflicts |+| `⤴` | `operation_state` `"rebase"` | Rebase in progress |+| `⤵` | `operation_state` `"merge"` | Merge in progress |+| `⚑` | `worktree.state` `"branch_worktree_mismatch"` | Branch name doesn't match the worktree path |+| `⊟` | `worktree.state` `"prunable"` | Prunable (worktree directory missing) |+| `⊞` | `worktree.state` `"locked"` | Locked worktree |+| `/` | `kind` `"branch"` | Branch without a worktree (no `worktree` object) |++### Default branch++The single highest-priority state describing the branch's relation to the default branch; blank when none applies (a normal up-to-date branch). Each symbol is one `main_state` value:++| Symbol | main_state | Meaning |+|--------|------------|---------|+| `^` | `"is_main"` | The main worktree (the repo's home worktree) |+| `∅` | `"orphan"` | No common ancestor with the default branch |+| `✗` | `"would_conflict"` | Merging into the default branch would conflict (simulated with `git merge-tree`); with `--full`, the check includes uncommitted changes |+| `_` | `"empty"` | Same commit as the default branch, working tree clean — safe to remove; row dimmed |+| `–` | `"same_commit"` | Same commit as the default branch, but with uncommitted changes |+| `⊂` | `"integrated"` | Content [integrated](@/remove.md#branch-cleanup) into the default branch or merge target via different history; the matching check is in `integration_reason`; row dimmed |+| `↕` | `"diverged"` | Both ahead of and behind the default branch |+| `↑` | `"ahead"` | Has commits the default branch doesn't |+| `↓` | `"behind"` | Missing commits the default branch has |++Rows are dimmed when [safe to delete](@/remove.md#branch-cleanup) — `_` (`"empty"`) or `⊂` (`"integrated"`).++### Remote++Relation to the tracking branch, derived from the `remote.ahead` / `remote.behind` counts; blank when there is no upstream:++| Symbol | remote | Meaning |+|--------|--------|---------|+| `\|` | `ahead` 0, `behind` 0 | In sync with remote |+| `⇡` | `ahead` > 0 | Ahead of remote |+| `⇣` | `behind` > 0 | Behind remote |+| `⇅` | `ahead` > 0, `behind` > 0 | Diverged from remote |### Placeholder symbols@@ -920,7 +949,7 @@ $ wt list --format=json --full | jq '.[] | select(.ci.stale) | .branch'| `working_tree` | object | Working tree state (see below) || `main_state` | string | Relation to the default branch (see below) || `integration_reason` | string | Why branch is integrated (see below) |-| `operation_state` | string | `"conflicts"`, `"rebase"`, or `"merge"`; absent when clean |+| `operation_state` | string | `"conflicts"`, `"rebase"`, or `"merge"` (see [Worktree](#worktree)); absent when clean || `main` | object | Relationship to the default branch (see below); absent when is_main || `remote` | object | Tracking branch info (see below); absent when no tracking || `worktree` | object | Worktree metadata (see below) |@@ -949,6 +978,8 @@ $ wt list --format=json --full | jq '.[] | select(.ci.stale) | .branch'### working_tree object+The five change flags map to the [Working tree](#working-tree) symbols (`renamed` and `deleted` have none of their own):+| Field | Type | Description ||-------|------|-------------|| `staged` | boolean | Has staged files |@@ -968,6 +999,8 @@ $ wt list --format=json --full | jq '.[] | select(.ci.stale) | .branch'### remote object+`ahead` / `behind` drive the [Remote](#remote) divergence symbol:+| Field | Type | Description ||-------|------|-------------|| `name` | string | Remote name (e.g., `"origin"`) |@@ -977,9 +1010,11 @@ $ wt list --format=json --full | jq '.[] | select(.ci.stale) | .branch'### worktree object+Present only for worktree-kind items. `state` is the worktree-location attribute — see [Worktree](#worktree) for its symbols:+| Field | Type | Description ||-------|------|-------------|-| `state` | string | `"no_worktree"`, `"branch_worktree_mismatch"`, `"prunable"`, `"locked"` (absent when normal) |+| `state` | string | `"branch_worktree_mismatch"`, `"prunable"`, or `"locked"` (absent when normal) || `reason` | string | Reason for locked/prunable state || `detached` | boolean | HEAD is detached |@@ -1012,23 +1047,23 @@ Top-level `repo` describes the local checkout's repository as derived from the p### main_state values-These values describe the relation to the default branch.--`"is_main"` `"orphan"` `"would_conflict"` `"empty"` `"same_commit"` `"integrated"` `"diverged"` `"ahead"` `"behind"`+The single highest-priority state describing the branch's relation to the default branch; absent when none applies (a normal up-to-date branch). Each value is one Default-branch symbol — see [Default branch](#default-branch) for the symbol and the full meaning of each value (`"is_main"`, `"orphan"`, `"would_conflict"`, `"empty"`, `"same_commit"`, `"integrated"`, `"diverged"`, `"ahead"`, `"behind"`).### integration_reason values-When `main_state == "integrated"`: `"ancestor"` `"trees-match"` `"no-added-changes"` `"merge-adds-nothing"` `"patch-id-match"`--### ci.status values--`"passed"` `"running"` `"failed"` `"conflicts"` `"no-ci"` `"error"`+Set only when `main_state == "integrated"` (the `⊂` symbol), recording which check matched. Checks run cheapest-first and the first match wins. JSON-only — every reason renders as the same `⊂`:-### ci.review_state values+| Value | Meaning |+|-------|---------|+| `"ancestor"` | Branch HEAD is an ancestor of the default branch, which has moved past it |+| `"no-added-changes"` | The three-dot diff (`main...branch`) is empty — no file changes beyond the merge-base |+| `"trees-match"` | Different history, but the branch's tree is identical to the default branch's |+| `"merge-adds-nothing"` | The branch has changes, but merging them leaves the default branch's tree unchanged (e.g. a squash merge where the target advanced on other files) |+| `"patch-id-match"` | The branch's squashed diff matches a single commit on the default branch (e.g. a GitHub/GitLab squash merge) |-`"approved"` `"changes_requested"` `"pending"` `"draft"`+### ci.status and ci.review_state values-The vocabulary matches Claude Code's statusline `pr.review_state` field. `"pending"` means a review is required (e.g. branch protection) but not yet given; a PR with no review signal at all has no `review_state`. GitLab reports only `"pending"` and `"draft"` — MR list data carries no approved or changes-requested signal.+The [CI status](#ci-status) section above is the single source for both fields: the table maps each colored value, and the notes below it cover `"draft"` and `"approved"`. `ci.status` is one of `"passed"`, `"running"`, `"failed"`, `"conflicts"`, `"no-ci"`, `"error"`; `ci.review_state` is one of `"changes_requested"`, `"pending"`, `"draft"`, `"approved"`, absent when the forge reports no review signal. The vocabulary matches Claude Code's statusline `pr.review_state` field.Missing a field that would be generally useful? Open an issue at https://github.com/max-sixty/worktrunk.diff --git a/tests/snapshots/integration__integration_tests__help__help_list_long.snap b/tests/snapshots/integration__integration_tests__help__help_list_long.snapindex 340a4e495..7a1b5b7a4 100644--- a/tests/snapshots/integration__integration_tests__help__help_list_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_list_long.snap@@ -164,23 +164,26 @@ The leftmost column marks each row by physical presence, from most present to le[32mCI status[0m-The CI column shows the branch's open PR/MR — [2m#3035[0m on GitHub, Gitea, and Azure DevOps, [2m!3035[0m on GitLab — colored by pipeline status, or a bare [2m#[0m when no number is available (e.g. branch workflows without a PR/MR):+The CI column shows the branch's open PR/MR — [2m#3035[0m on GitHub, Gitea, and Azure DevOps, [2m!3035[0m on GitLab — colored by pipeline status, or a bare [2m#[0m when no number is available (e.g. branch workflows without a PR/MR). One color folds two JSON fields: green/blue/red/yellow/gray are [2mci.status[0m; magenta/cyan are [2mci.review_state[0m. The [2mValue[0m column is the matching JSON string from [2m--format=json[0m:- Indicator Meaning- ───────── ─────────────────────────────────- [32m#[0m green All checks passed- [34m#[0m blue Checks running- [31m#[0m red Checks failed- [35m#[0m magenta Reviewer requested changes- [36m#[0m cyan Review required, not yet given- [33m#[0m yellow Merge conflicts with base- [90m#[0m gray No checks configured- [33m⚠[0m yellow Fetch error (rate limit, network)- (blank) No upstream or no PR/MR+ Indicator Value Meaning+ ───────── ─────────────────── ───────────────────────────────────────────────────────────────+ [32m#[0m green [2m"passed"[0m All checks passed+ [34m#[0m blue [2m"running"[0m Checks in progress+ [31m#[0m red [2m"failed"[0m One or more checks failed+ [33m#[0m yellow [2m"conflicts"[0m Merge conflicts with the target branch+ [90m#[0m gray [2m"no-ci"[0m No PR/MR, or no checks configured+ [33m⚠[0m yellow [2m"error"[0m CI status could not be fetched (rate limit, network, etc.)+ [35m#[0m magenta [2m"changes_requested"[0m A reviewer requested changes+ [36m#[0m cyan [2m"pending"[0m A review is required (e.g. branch protection) but not yet given+ (blank) [2mci[0m absent No upstream, or no PR/MR and no branch workflow-Review state merges into the same color where its required action ranks: changes-requested (magenta) outranks running checks — waiting can't clear it — while an outstanding required review (cyan) only recolors an otherwise green or quiet branch. Cool colors mean waiting, warm colors mean act. A PR with no review signal (no required reviewers and no reviews) keeps its plain CI color, and draft PRs appear dimmed.+The two remaining [2mci.review_state[0m values have no indicator of their own: [2m"draft"[0m only dims the cell and [2m"approved"[0m leaves the color unchanged.-CI cells are clickable links to the PR or pipeline page, and appear dimmed when unpushed local changes make the status stale. PRs/MRs are checked first, then branch workflows/pipelines for branches with an upstream. Local-only branches show blank; remote-only branches — visible with [2m--remotes[0m — get CI status detection. Results are cached for 30-60 seconds; use [2mwt config state[0m to view or clear.+Color precedence resolves the fold: changes-requested (magenta) outranks running checks — waiting can't clear it — while an outstanding required review (cyan) only recolors an otherwise green or quiet branch. Cool colors mean waiting, warm colors mean act. An approved PR, or one with no review signal at all (no required reviewers and no reviews), keeps its plain [2mci.status[0m color — [2mci.review_state[0m is then [2m"approved"[0m or absent, respectively. GitLab MR data carries only [2m"pending"[0m and [2m"draft"[0m — no+approved or changes-requested signal.++CI cells are clickable links to the PR or pipeline page, and appear dimmed for a draft PR/MR ([2m"draft"[0m) or when unpushed local changes make the status stale ([2mci.stale[0m). PRs/MRs are checked first, then branch workflows/pipelines for branches with an upstream. Local-only branches show blank; remote-only branches — visible with [2m--remotes[0m — get CI status detection. Results are cached for 30-60 seconds; use [2mwt config state[0m to view or clear.[32mLLM summaries [experimental][0m@@ -197,35 +200,62 @@ A column that renders empty for every row is dropped from the table. Templates,[1m[32mStatus symbols[0m-The Status column has multiple subcolumns. Within each, only the first matching symbol is shown (listed in priority order):-- Subcolumn Symbol Meaning- ──────────────── ────── ─────────────────────────────────────────────────────────────────────────────────────────- Working tree (1) [36m+[0m Staged files- Working tree (2) [36m![0m Modified files (unstaged)- Working tree (3) [36m?[0m Untracked files- Worktree [31m✘[0m Merge conflicts- [33m⤴[0m Rebase in progress- [33m⤵[0m Merge in progress- [2m/[0m Branch without worktree- [31m⚑[0m Branch-worktree mismatch (branch name doesn't match worktree path)- [33m⊟[0m Prunable (directory missing)- [33m⊞[0m Locked worktree- Default branch [2m^[0m Is the default branch- [2m∅[0m Orphan branch (no common ancestor with the default branch)- [33m✗[0m Would conflict if merged to the default branch; with [2m--full[0m, includes uncommitted changes- [2m_[0m Same commit as the default branch, clean- [2m–[0m Same commit as the default branch, uncommitted changes- [2m⊂[0m Content integrated into the default branch or target- [2m↕[0m Diverged from the default branch- [2m↑[0m Ahead of the default branch- [2m↓[0m Behind the default branch- Remote [2m|[0m In sync with remote- [2m⇅[0m Diverged from remote- [2m⇡[0m Ahead of remote- [2m⇣[0m Behind remote--Rows are dimmed when safe to delete ([2m_[0m same commit with clean working tree or [2m⊂[0m content integrated).+The Status column packs several subcolumns, left to right, each mapping to a field in [2m--format=json[0m. Working-tree flags are independent and co-occur — any combination shows at once. The other subcolumns are mutually exclusive: each shows a single symbol, the highest-priority state in top-to-bottom table order, and is blank when nothing applies.++[32mWorking tree[0m++Independent flags from [2mgit status[0m; several can show at once (e.g. [2m+!?[0m). Each maps to a boolean in the [2mworking_tree[0m object:++ Symbol working_tree Meaning+ ────── ──────────── ─────────────────────────+ [36m+[0m [2mstaged[0m Staged files+ [36m![0m [2mmodified[0m Modified files (unstaged)+ [36m?[0m [2muntracked[0m Untracked files++[2mworking_tree[0m also reports [2mrenamed[0m and [2mdeleted[0m, which have no dedicated symbol in the column.++[32mWorktree[0m++An in-progress git operation, a worktree-location attribute, or a branch with no worktree. One symbol shows, highest priority first ([2m✘ > ⤴ > ⤵ > ⚑ > ⊟ > ⊞ > /[0m):++ Symbol JSON Meaning+ ────── ───────────────────────────────────────── ──────────────────────────────────────────────+ [31m✘[0m [2moperation_state[0m [2m"conflicts"[0m Merge conflicts+ [33m⤴[0m [2moperation_state[0m [2m"rebase"[0m Rebase in progress+ [33m⤵[0m [2moperation_state[0m [2m"merge"[0m Merge in progress+ [31m⚑[0m [2mworktree.state[0m [2m"branch_worktree_mismatch"[0m Branch name doesn't match the worktree path+ [33m⊟[0m [2mworktree.state[0m [2m"prunable"[0m Prunable (worktree directory missing)+ [33m⊞[0m [2mworktree.state[0m [2m"locked"[0m Locked worktree+ [2m/[0m [2mkind[0m [2m"branch"[0m Branch without a worktree (no [2mworktree[0m object)++[32mDefault branch[0m++The single highest-priority state describing the branch's relation to the default branch; blank when none applies (a normal up-to-date branch). Each symbol is one [2mmain_state[0m value:++ Symbol main_state Meaning+ ────── ──────────────── ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────+ [2m^[0m [2m"is_main"[0m The main worktree (the repo's home worktree)+ [2m∅[0m [2m"orphan"[0m No common ancestor with the default branch+ [33m✗[0m [2m"would_conflict"[0m Merging into the default branch would conflict (simulated with [2mgit merge-tree[0m); with [2m--full[0m, the check includes uncommitted changes+ [2m_[0m [2m"empty"[0m Same commit as the default branch, working tree clean — safe to remove; row dimmed+ [2m–[0m [2m"same_commit"[0m Same commit as the default branch, but with uncommitted changes+ [2m⊂[0m [2m"integrated"[0m Content integrated into the default branch or merge target via different history; the matching check is in [2mintegration_reason[0m; row dimmed+ [2m↕[0m [2m"diverged"[0m Both ahead of and behind the default branch+ [2m↑[0m [2m"ahead"[0m Has commits the default branch doesn't+ [2m↓[0m [2m"behind"[0m Missing commits the default branch has++Rows are dimmed when safe to delete — [2m_[0m ([2m"empty"[0m) or [2m⊂[0m ([2m"integrated"[0m).++[32mRemote[0m++Relation to the tracking branch, derived from the [2mremote.ahead[0m / [2mremote.behind[0m counts; blank when there is no upstream:++ Symbol remote Meaning+ ────── ───────────────────── ────────────────────+ [2m|[0m [2mahead[0m 0, [2mbehind[0m 0 In sync with remote+ [2m⇡[0m [2mahead[0m > 0 Ahead of remote+ [2m⇣[0m [2mbehind[0m > 0 Behind remote+ [2m⇅[0m [2mahead[0m > 0, [2mbehind[0m > 0 Diverged from remote[32mPlaceholder symbols[0m@@ -276,7 +306,7 @@ Query structured data with [2m--format=json[0m:[2mworking_tree[0m object Working tree state (see below)[2mmain_state[0m string Relation to the default branch (see below)[2mintegration_reason[0m string Why branch is integrated (see below)- [2moperation_state[0m string [2m"conflicts"[0m, [2m"rebase"[0m, or [2m"merge"[0m; absent when clean+ [2moperation_state[0m string [2m"conflicts"[0m, [2m"rebase"[0m, or [2m"merge"[0m (see Worktree); absent when clean[2mmain[0m object Relationship to the default branch (see below); absent when is_main[2mremote[0m object Tracking branch info (see below); absent when no tracking[2mworktree[0m object Worktree metadata (see below)@@ -305,6 +335,8 @@ Query structured data with [2m--format=json[0m:[32mworking_tree object[0m+The five change flags map to the Working tree symbols ([2mrenamed[0m and [2mdeleted[0m have none of their own):+Field Type Description───────── ─────── ───────────────────────────────────────[2mstaged[0m boolean Has staged files@@ -324,6 +356,8 @@ Query structured data with [2m--format=json[0m:[32mremote object[0m+[2mahead[0m / [2mbehind[0m drive the Remote divergence symbol:+Field Type Description────── ────── ────────────────────────────[2mname[0m string Remote name (e.g., [2m"origin"[0m)@@ -333,11 +367,13 @@ Query structured data with [2m--format=json[0m:[32mworktree object[0m- Field Type Description- ──────── ─────── ────────────────────────────────────────────────────────────────────────────────────- [2mstate[0m string [2m"no_worktree"[0m, [2m"branch_worktree_mismatch"[0m, [2m"prunable"[0m, [2m"locked"[0m (absent when normal)- [2mreason[0m string Reason for locked/prunable state- [2mdetached[0m boolean HEAD is detached+Present only for worktree-kind items. [2mstate[0m is the worktree-location attribute — see Worktree for its symbols:++ Field Type Description+ ──────── ─────── ────────────────────────────────────────────────────────────────────────+ [2mstate[0m string [2m"branch_worktree_mismatch"[0m, [2m"prunable"[0m, or [2m"locked"[0m (absent when normal)+ [2mreason[0m string Reason for locked/prunable state+ [2mdetached[0m boolean HEAD is detached[32mci object[0m@@ -368,23 +404,23 @@ Top-level [2mrepo[0m describes the local checkout's repository as derived from[32mmain_state values[0m-These values describe the relation to the default branch.--[2m"is_main"[0m [2m"orphan"[0m [2m"would_conflict"[0m [2m"empty"[0m [2m"same_commit"[0m [2m"integrated"[0m [2m"diverged"[0m [2m"ahead"[0m [2m"behind"[0m+The single highest-priority state describing the branch's relation to the default branch; absent when none applies (a normal up-to-date branch). Each value is one Default-branch symbol — see Default branch for the symbol and the full meaning of each value ([2m"is_main"[0m, [2m"orphan"[0m, [2m"would_conflict"[0m, [2m"empty"[0m, [2m"same_commit"[0m, [2m"integrated"[0m, [2m"diverged"[0m, [2m"ahead"[0m, [2m"behind"[0m).[32mintegration_reason values[0m-When [2mmain_state == "integrated"[0m: [2m"ancestor"[0m [2m"trees-match"[0m [2m"no-added-changes"[0m [2m"merge-adds-nothing"[0m [2m"patch-id-match"[0m--[32mci.status values[0m--[2m"passed"[0m [2m"running"[0m [2m"failed"[0m [2m"conflicts"[0m [2m"no-ci"[0m [2m"error"[0m+Set only when [2mmain_state == "integrated"[0m (the [2m⊂[0m symbol), recording which check matched. Checks run cheapest-first and the first match wins. JSON-only — every reason renders as the same [2m⊂[0m:-[32mci.review_state values[0m+ Value Meaning+ ──────────────────── ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────+ [2m"ancestor"[0m Branch HEAD is an ancestor of the default branch, which has moved past it+ [2m"no-added-changes"[0m The three-dot diff ([2mmain...branch[0m) is empty — no file changes beyond the merge-base+ [2m"trees-match"[0m Different history, but the branch's tree is identical to the default branch's+ [2m"merge-adds-nothing"[0m The branch has changes, but merging them leaves the default branch's tree unchanged (e.g. a squash merge where the target advanced on other files)+ [2m"patch-id-match"[0m The branch's squashed diff matches a single commit on the default branch (e.g. a GitHub/GitLab squash merge)-[2m"approved"[0m [2m"changes_requested"[0m [2m"pending"[0m [2m"draft"[0m+[32mci.status and ci.review_state values[0m-The vocabulary matches Claude Code's statusline [2mpr.review_state[0m field. [2m"pending"[0m means a review is required (e.g. branch protection) but not yet given; a PR with no review signal at all has no [2mreview_state[0m. GitLab reports only [2m"pending"[0m and [2m"draft"[0m — MR list data carries no approved or changes-requested signal.+The CI status section above is the single source for both fields: the table maps each colored value, and the notes below it cover [2m"draft"[0m and [2m"approved"[0m. [2mci.status[0m is one of [2m"passed"[0m, [2m"running"[0m, [2m"failed"[0m, [2m"conflicts"[0m, [2m"no-ci"[0m, [2m"error"[0m; [2mci.review_state[0m is one of [2m"changes_requested"[0m, [2m"pending"[0m, [2m"draft"[0m, [2m"approved"[0m, absent when the forge reports no review signal. The vocabulary matches Claude Code's statusline [2mpr.review_state[0m field.Missing a field that would be generally useful? Open an issue at https://github.com/max-sixty/worktrunk.diff --git a/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap b/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snapindex a7808d5ae..365ff9392 100644--- a/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap+++ b/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap@@ -180,33 +180,42 @@ least:The CI column shows the branch's open PR/MR — [2m#3035[0m on GitHub, Gitea, and AzureDevOps, [2m!3035[0m on GitLab — colored by pipeline status, or a bare [2m#[0m when no number- is available (e.g. branch workflows without a PR/MR):-- Indicator Meaning- ───────── ─────────────────────────────────- [32m#[0m green All checks passed- [34m#[0m blue Checks running- [31m#[0m red Checks failed- [35m#[0m magenta Reviewer requested changes- [36m#[0m cyan Review required, not yet given- [33m#[0m yellow Merge conflicts with base- [90m#[0m gray No checks configured- [33m⚠[0m yellow Fetch error (rate limit, network)- (blank) No upstream or no PR/MR--Review state merges into the same color where its required action ranks:-changes-requested (magenta) outranks running checks — waiting can't clear it —-while an outstanding required review (cyan) only recolors an otherwise green or-quiet branch. Cool colors mean waiting, warm colors mean act. A PR with no-review signal (no required reviewers and no reviews) keeps its plain CI color,-and draft PRs appear dimmed.--CI cells are clickable links to the PR or pipeline page, and appear dimmed when-unpushed local changes make the status stale. PRs/MRs are checked first, then-branch workflows/pipelines for branches with an upstream. Local-only branches-show blank; remote-only branches — visible with [2m--remotes[0m — get CI status-detection. Results are cached for 30-60 seconds; use [2mwt config state[0m to view or-clear.+ is available (e.g. branch workflows without a PR/MR). One color folds two JSON+fields: green/blue/red/yellow/gray are [2mci.status[0m; magenta/cyan are+[2mci.review_state[0m. The [2mValue[0m column is the matching JSON string from+[2m--format=json[0m:++ Indicator Value Meaning+ ───────── ─────────────────── ────────────────────────────────────────────────+ [32m#[0m green [2m"passed"[0m All checks passed+ [34m#[0m blue [2m"running"[0m Checks in progress+ [31m#[0m red [2m"failed"[0m One or more checks failed+ [33m#[0m yellow [2m"conflicts"[0m Merge conflicts with the target branch+ [90m#[0m gray [2m"no-ci"[0m No PR/MR, or no checks configured+ [33m⚠[0m yellow [2m"error"[0m CI status could not be fetched (rate limit,+ network, etc.)+ [35m#[0m magenta [2m"changes_requested"[0m A reviewer requested changes+ [36m#[0m cyan [2m"pending"[0m A review is required (e.g. branch protection)+ but not yet given+ (blank) [2mci[0m absent No upstream, or no PR/MR and no branch workflow++The two remaining [2mci.review_state[0m values have no indicator of their own: [2m"draft"[0m+ only dims the cell and [2m"approved"[0m leaves the color unchanged.++Color precedence resolves the fold: changes-requested (magenta) outranks running+ checks — waiting can't clear it — while an outstanding required review (cyan)+only recolors an otherwise green or quiet branch. Cool colors mean waiting, warm+ colors mean act. An approved PR, or one with no review signal at all (no+required reviewers and no reviews), keeps its plain [2mci.status[0m color —+[2mci.review_state[0m is then [2m"approved"[0m or absent, respectively. GitLab MR data+carries only [2m"pending"[0m and [2m"draft"[0m — no approved or changes-requested signal.++CI cells are clickable links to the PR or pipeline page, and appear dimmed for a+ draft PR/MR ([2m"draft"[0m) or when unpushed local changes make the status stale+([2mci.stale[0m). PRs/MRs are checked first, then branch workflows/pipelines for+branches with an upstream. Local-only branches show blank; remote-only branches+— visible with [2m--remotes[0m — get CI status detection. Results are cached for 30-60+ seconds; use [2mwt config state[0m to view or clear.[32mLLM summaries [experimental][0m@@ -229,40 +238,82 @@ widths, and drop priority: custom columns config.[1m[32mStatus symbols[0m-The Status column has multiple subcolumns. Within each, only the first matching-symbol is shown (listed in priority order):-- Subcolumn Symbol Meaning- ──────────────── ────── ──────────────────────────────────────────────────────- Working tree (1) [36m+[0m Staged files- Working tree (2) [36m![0m Modified files (unstaged)- Working tree (3) [36m?[0m Untracked files- Worktree [31m✘[0m Merge conflicts- [33m⤴[0m Rebase in progress- [33m⤵[0m Merge in progress- [2m/[0m Branch without worktree- [31m⚑[0m Branch-worktree mismatch (branch name doesn't match- worktree path)- [33m⊟[0m Prunable (directory missing)- [33m⊞[0m Locked worktree- Default branch [2m^[0m Is the default branch- [2m∅[0m Orphan branch (no common ancestor with the default- branch)- [33m✗[0m Would conflict if merged to the default branch; with- [2m--full[0m, includes uncommitted changes- [2m_[0m Same commit as the default branch, clean- [2m–[0m Same commit as the default branch, uncommitted changes- [2m⊂[0m Content integrated into the default branch or target- [2m↕[0m Diverged from the default branch- [2m↑[0m Ahead of the default branch- [2m↓[0m Behind the default branch- Remote [2m|[0m In sync with remote- [2m⇅[0m Diverged from remote- [2m⇡[0m Ahead of remote- [2m⇣[0m Behind remote--Rows are dimmed when safe to delete ([2m_[0m same commit with clean working tree or [2m⊂[0m-content integrated).+The Status column packs several subcolumns, left to right, each mapping to a+field in [2m--format=json[0m. Working-tree flags are independent and co-occur — any+combination shows at once. The other subcolumns are mutually exclusive: each+shows a single symbol, the highest-priority state in top-to-bottom table order,+and is blank when nothing applies.++[32mWorking tree[0m++Independent flags from [2mgit status[0m; several can show at once (e.g. [2m+!?[0m). Each+maps to a boolean in the [2mworking_tree[0m object:++ Symbol working_tree Meaning+ ────── ──────────── ─────────────────────────+ [36m+[0m [2mstaged[0m Staged files+ [36m![0m [2mmodified[0m Modified files (unstaged)+ [36m?[0m [2muntracked[0m Untracked files++[2mworking_tree[0m also reports [2mrenamed[0m and [2mdeleted[0m, which have no dedicated symbol in+ the column.++[32mWorktree[0m++An in-progress git operation, a worktree-location attribute, or a branch with no+ worktree. One symbol shows, highest priority first ([2m✘ > ⤴ > ⤵ > ⚑ > ⊟ > ⊞ > /[0m):++ Symbol JSON Meaning+ ────── ───────────────────────────────────────── ─────────────────────────────+ [31m✘[0m [2moperation_state[0m [2m"conflicts"[0m Merge conflicts+ [33m⤴[0m [2moperation_state[0m [2m"rebase"[0m Rebase in progress+ [33m⤵[0m [2moperation_state[0m [2m"merge"[0m Merge in progress+ [31m⚑[0m [2mworktree.state[0m [2m"branch_worktree_mismatch"[0m Branch name doesn't match the+ worktree path+ [33m⊟[0m [2mworktree.state[0m [2m"prunable"[0m Prunable (worktree directory+ missing)+ [33m⊞[0m [2mworktree.state[0m [2m"locked"[0m Locked worktree+ [2m/[0m [2mkind[0m [2m"branch"[0m Branch without a worktree (no+ [2mworktree[0m object)++[32mDefault branch[0m++The single highest-priority state describing the branch's relation to the+default branch; blank when none applies (a normal up-to-date branch). Each+symbol is one [2mmain_state[0m value:++ Symb main_state Meaning+ ol+ ──── ────────── ──────────────────────────────────────────────────────────────+ [2m^[0m [2m"is_main"[0m The main worktree (the repo's home worktree)+ [2m∅[0m [2m"orphan"[0m No common ancestor with the default branch+ [33m✗[0m [2m"would_con[0m Merging into the default branch would conflict (simulated with+ [2mflict"[0m [2mgit merge-tree[0m); with [2m--full[0m, the check includes uncommitted+ changes+ [2m_[0m [2m"empty"[0m Same commit as the default branch, working tree clean — safe+ to remove; row dimmed+ [2m–[0m [2m"same_comm[0m Same commit as the default branch, but with uncommitted+ [2mit"[0m changes+ [2m⊂[0m [2m"integrate[0m Content integrated into the default branch or merge target via+ [2md"[0m different history; the matching check is in [2mintegration_reason[0m+ ; row dimmed+ [2m↕[0m [2m"diverged"[0m Both ahead of and behind the default branch+ [2m↑[0m [2m"ahead"[0m Has commits the default branch doesn't+ [2m↓[0m [2m"behind"[0m Missing commits the default branch has++Rows are dimmed when safe to delete — [2m_[0m ([2m"empty"[0m) or [2m⊂[0m ([2m"integrated"[0m).++[32mRemote[0m++Relation to the tracking branch, derived from the [2mremote.ahead[0m / [2mremote.behind[0m+counts; blank when there is no upstream:++ Symbol remote Meaning+ ────── ───────────────────── ────────────────────+ [2m|[0m [2mahead[0m 0, [2mbehind[0m 0 In sync with remote+ [2m⇡[0m [2mahead[0m > 0 Ahead of remote+ [2m⇣[0m [2mbehind[0m > 0 Behind remote+ [2m⇅[0m [2mahead[0m > 0, [2mbehind[0m > 0 Diverged from remote[32mPlaceholder symbols[0m@@ -307,45 +358,46 @@ Query structured data with [2m--format=json[0m:[1mFields:[0m- Field Type Description- ────────────────── ─────────── ───────────────────────────────────────────────- [2mbranch[0m string/null Branch name (null for detached HEAD)- [2mpath[0m string Worktree path (absent for branches without- worktrees)- [2mkind[0m string [2m"worktree"[0m or [2m"branch"[0m- [2mcommit[0m object Commit info (see below)- [2mworking_tree[0m object Working tree state (see below)- [2mmain_state[0m string Relation to the default branch (see below)- [2mintegration_reason[0m string Why branch is integrated (see below)- [2moperation_state[0m string [2m"conflicts"[0m, [2m"rebase"[0m, or [2m"merge"[0m; absent when- clean- [2mmain[0m object Relationship to the default branch (see below);- absent when is_main- [2mremote[0m object Tracking branch info (see below); absent when- no tracking- [2mworktree[0m object Worktree metadata (see below)- [2mis_main[0m boolean Is the main worktree- [2mis_current[0m boolean Is the current worktree- [2mis_previous[0m boolean Previous worktree from wt switch- [2mci[0m object CI status (see below); absent when no CI- [2mrepo_url[0m string Repository web URL derived from the primary- remote; absent when the remote URL cannot be- parsed- [2mrepo[0m object Structured repository metadata (see below);- includes [2mremote[0m- [2murl[0m string Dev server URL from project config; absent when- not configured- [2murl_active[0m boolean Whether the URL's port is listening; absent- when not configured- [2msummary[0m string LLM-generated branch summary; absent when not- configured or no summary- [2mstatusline[0m string Pre-formatted status with ANSI colors- [2msymbols[0m string Raw status symbols without colors (e.g., [2m"!?↓"[0m)- [2mvars[0m object Per-branch variables from [2mwt config state vars[0m- (absent when empty)- [2mcolumns[0m object Rendered custom column values keyed by header;- empty cells omitted (absent when none- configured)+ Field Type Description+ ───────────────── ─────────── ────────────────────────────────────────────────+ [2mbranch[0m string/null Branch name (null for detached HEAD)+ [2mpath[0m string Worktree path (absent for branches without+ worktrees)+ [2mkind[0m string [2m"worktree"[0m or [2m"branch"[0m+ [2mcommit[0m object Commit info (see below)+ [2mworking_tree[0m object Working tree state (see below)+ [2mmain_state[0m string Relation to the default branch (see below)+ [2mintegration_reaso[0m string Why branch is integrated (see below)+ [2mn[0m+ [2moperation_state[0m string [2m"conflicts"[0m, [2m"rebase"[0m, or [2m"merge"[0m (see+ Worktree); absent when clean+ [2mmain[0m object Relationship to the default branch (see below);+ absent when is_main+ [2mremote[0m object Tracking branch info (see below); absent when no+ tracking+ [2mworktree[0m object Worktree metadata (see below)+ [2mis_main[0m boolean Is the main worktree+ [2mis_current[0m boolean Is the current worktree+ [2mis_previous[0m boolean Previous worktree from wt switch+ [2mci[0m object CI status (see below); absent when no CI+ [2mrepo_url[0m string Repository web URL derived from the primary+ remote; absent when the remote URL cannot be+ parsed+ [2mrepo[0m object Structured repository metadata (see below);+ includes [2mremote[0m+ [2murl[0m string Dev server URL from project config; absent when+ not configured+ [2murl_active[0m boolean Whether the URL's port is listening; absent when+ not configured+ [2msummary[0m string LLM-generated branch summary; absent when not+ configured or no summary+ [2mstatusline[0m string Pre-formatted status with ANSI colors+ [2msymbols[0m string Raw status symbols without colors (e.g., [2m"!?↓"[0m)+ [2mvars[0m object Per-branch variables from [2mwt config state vars[0m+ (absent when empty)+ [2mcolumns[0m object Rendered custom column values keyed by header;+ empty cells omitted (absent when none+ configured)[32mCommit object[0m@@ -359,6 +411,9 @@ Query structured data with [2m--format=json[0m:[32mworking_tree object[0m+The five change flags map to the Working tree symbols ([2mrenamed[0m and [2mdeleted[0m have+none of their own):+Field Type Description───────── ─────── ───────────────────────────────────────[2mstaged[0m boolean Has staged files@@ -378,6 +433,8 @@ Query structured data with [2m--format=json[0m:[32mremote object[0m+[2mahead[0m / [2mbehind[0m drive the Remote divergence symbol:+Field Type Description────── ────── ────────────────────────────[2mname[0m string Remote name (e.g., [2m"origin"[0m)@@ -387,10 +444,13 @@ Query structured data with [2m--format=json[0m:[32mworktree object[0m+Present only for worktree-kind items. [2mstate[0m is the worktree-location attribute —+ see Worktree for its symbols:+Field Type Description──────── ─────── ─────────────────────────────────────────────────────────────- [2mstate[0m string [2m"no_worktree"[0m, [2m"branch_worktree_mismatch"[0m, [2m"prunable"[0m,- [2m"locked"[0m (absent when normal)+ [2mstate[0m string [2m"branch_worktree_mismatch"[0m, [2m"prunable"[0m, or [2m"locked"[0m (absent+ when normal)[2mreason[0m string Reason for locked/prunable state[2mdetached[0m boolean HEAD is detached@@ -431,28 +491,40 @@ primary remote. [2mci.repo[0m describes the repository targeted by the PR/MR U[32mmain_state values[0m-These values describe the relation to the default branch.--[2m"is_main"[0m [2m"orphan"[0m [2m"would_conflict"[0m [2m"empty"[0m [2m"same_commit"[0m [2m"integrated"[0m-[2m"diverged"[0m [2m"ahead"[0m [2m"behind"[0m+The single highest-priority state describing the branch's relation to the+default branch; absent when none applies (a normal up-to-date branch). Each+value is one Default-branch symbol — see Default branch for the symbol and the+full meaning of each value ([2m"is_main"[0m, [2m"orphan"[0m, [2m"would_conflict"[0m, [2m"empty"[0m,+[2m"same_commit"[0m, [2m"integrated"[0m, [2m"diverged"[0m, [2m"ahead"[0m, [2m"behind"[0m).[32mintegration_reason values[0m-When [2mmain_state == "integrated"[0m: [2m"ancestor"[0m [2m"trees-match"[0m [2m"no-added-changes"[0m-[2m"merge-adds-nothing"[0m [2m"patch-id-match"[0m--[32mci.status values[0m--[2m"passed"[0m [2m"running"[0m [2m"failed"[0m [2m"conflicts"[0m [2m"no-ci"[0m [2m"error"[0m--[32mci.review_state values[0m--[2m"approved"[0m [2m"changes_requested"[0m [2m"pending"[0m [2m"draft"[0m--The vocabulary matches Claude Code's statusline [2mpr.review_state[0m field. [2m"pending"[0m- means a review is required (e.g. branch protection) but not yet given; a PR-with no review signal at all has no [2mreview_state[0m. GitLab reports only [2m"pending"[0m-and [2m"draft"[0m — MR list data carries no approved or changes-requested signal.+Set only when [2mmain_state == "integrated"[0m (the [2m⊂[0m symbol), recording which check+matched. Checks run cheapest-first and the first match wins. JSON-only — every+reason renders as the same [2m⊂[0m:++ Value Meaning+ ────────────── ───────────────────────────────────────────────────────────────+ [2m"ancestor"[0m Branch HEAD is an ancestor of the default branch, which has+ moved past it+ [2m"no-added-chan[0m The three-dot diff ([2mmain...branch[0m) is empty — no file changes+ [2mges"[0m beyond the merge-base+ [2m"trees-match"[0m Different history, but the branch's tree is identical to the+ default branch's+ [2m"merge-adds-no[0m The branch has changes, but merging them leaves the default+ [2mthing"[0m branch's tree unchanged (e.g. a squash merge where the target+ advanced on other files)+ [2m"patch-id-matc[0m The branch's squashed diff matches a single commit on the+ [2mh"[0m default branch (e.g. a GitHub/GitLab squash merge)++[32mci.status and ci.review_state values[0m++The CI status section above is the single source for both fields: the table maps+ each colored value, and the notes below it cover [2m"draft"[0m and [2m"approved"[0m.+[2mci.status[0m is one of [2m"passed"[0m, [2m"running"[0m, [2m"failed"[0m, [2m"conflicts"[0m, [2m"no-ci"[0m,+[2m"error"[0m; [2mci.review_state[0m is one of [2m"changes_requested"[0m, [2m"pending"[0m, [2m"draft"[0m,+[2m"approved"[0m, absent when the forge reports no review signal. The vocabulary+matches Claude Code's statusline [2mpr.review_state[0m field.Missing a field that would be generally useful? Open an issue athttps://github.com/max-sixty/worktrunk.