worktrunk icon indicating copy to clipboard operation
worktrunk copied to clipboard

[Feature Request] Legend for status icons

Open armstrjare opened this issue 8 months ago • 8 comments

The Status column in wt list is a compact multi-subcolumn field, and the symbols aren't self-evident at a glance — particularly the distinction between ⊂ (content already integrated into the default branch) vs ↕ (diverged), or the difference between ✗ (would conflict if merged) and ✘ (active merge conflicts), or knowing that | means in sync with remote rather than some kind of separator.

The docs cover these well, but discoverability at point-of-use is low.

Request: Add a legend, either appended to the output footer or accessible via a flag (e.g. --legend), that surfaces the symbol meanings inline.

Example footer:

Legend:
  Row  @current  ^default  +worktree  (dim) safe to delete
  Working tree  + staged  ! modified  ? untracked
  Worktree      ✘ conflicts  ⤴ rebase  ⤵ merge  ⊟ prunable  ⊞ locked
  vs default    ✗ would conflict  ⊂ integrated  ↕ diverged  ↑ ahead  ↓ behind
  vs remote     | in sync  ⇅ diverged  ⇡ ahead  ⇣ behind
  CI            ● passed  ● running  ● failed  ● conflicts  ● no CI

Why not docs-only? The existing reference table at worktrunk.dev/list/#status-symbols is thorough, but users encounter the output in a terminal, not a browser. The ○ Showing N worktrees... footer line is already a natural place to append or link to this.

armstrjare avatar Mar 10 '26 23:03 armstrjare

Thanks for the suggestion! I searched the codebase and confirmed there's no existing --legend flag or inline legend for wt list. The status symbol meanings are documented at worktrunk.dev/list/#status-symbols, but nothing surfaces them in the terminal itself.

The closest related code is the footer line (○ Showing N worktrees... in src/commands/list/mod.rs), which would be a natural place to append or link to a legend as you suggest.

I'll leave it for a maintainer to evaluate and prioritize.

worktrunk-bot avatar Mar 10 '26 23:03 worktrunk-bot

we have wt list --help?

max-sixty avatar Mar 11 '26 03:03 max-sixty

Good point — wt list --help already has a thorough Status symbols reference with every symbol and its meaning, accessible right from the terminal. I should have called that out in my initial comment.

The remaining question from the issue is whether there's value in showing a condensed legend inline with the output (e.g., appended to the footer) so users don't need a separate --help invocation. But --help already covers the discoverability concern well.

worktrunk-bot avatar Mar 11 '26 03:03 worktrunk-bot

we have wt list --help?

Personally I find there are so many different icons that it's hard to remember. For me at least I know that it would be really handy to see a basic legend in context, when and if they are displayed, to make it easier to quickly interpret the flags at a glance.

armstrjare avatar Mar 16 '26 12:03 armstrjare

I agree it's a bit confusing, and I was maybe a bit too ambitious at squeezing a hud-like view for all worktrees

but how would the legend work? adding lines makes the view bigger, which isn't good. how much could we squeeze into the one line of footer?

I agree the current state has downsides but would need to see a better world...

max-sixty avatar Mar 19 '26 02:03 max-sixty

A couple of options that avoid adding fixed lines to every invocation:

1. Contextual single-line hint in the footer — only explain symbols that actually appear in the output:

○ Showing 4 worktrees, 2 with changes, 2 ahead  (✗ would conflict  ↑ ahead of default  ⇡ ahead of remote)

Since format_summary_message already inspects ListItem data to count "with changes" / "ahead", it could also collect which status symbols are present and append their meanings. Most runs only show 3–5 distinct symbols, so this stays compact and directly relevant.

2. --legend flag — opt-in, appends a full legend block after the footer. Doesn't affect default output at all.

3. First-run hint — show (run with --legend for symbol meanings) in the footer the first few times, then stop (like git's advice messages). Lightest touch but least discoverable long-term.

Option 1 seems like the best tradeoff: no extra lines, no flag to remember, and only shows what's relevant. The footer already varies in length depending on the data, so a few extra symbol explanations fit naturally.

worktrunk-bot avatar Mar 19 '26 02:03 worktrunk-bot

Personally think the summary message at the moment is fairly redundant and not useful: knowing how many worktrees are in the list doesn’t really add value to me other than wordy dashboards-ness, nor do I care the counts of those with changes/behind – it’s which that are important, not how many.

If you’re worried about visual noise, one idea could be to turn that line into a legend with an icon and [ideally] a single word label for each status flag, and if you really want to keep the counts then prefix/suffix the label with the # (or the column headings?)

One observation from my usage: I think it would be unlikely to see every status flag at a time, rather only a subset, so the number of legend labels should be fairly limited rather than the hypothetical maximum. Or maybe just limit the maximum number that will be displayed at a time in the legend?

I guess a config flag for this legend would also be handy if people don’t want to see it.

Slightly off topic but potentially related… this also raises the question of whether everyone is interested in the same status flags? Maybe the option enable which statuses you’re interested in seeing would help — or to define your own statuses? (Maybe this already exists?)

On Thu, 19 Mar 2026 at 3:05 PM, worktrunk-bot @.***> wrote:

worktrunk-bot left a comment (max-sixty/worktrunk#1437) https://github.com/max-sixty/worktrunk/issues/1437#issuecomment-4087061675

A couple of options that avoid adding fixed lines to every invocation:

1. Contextual single-line hint in the footer — only explain symbols that actually appear in the output:

○ Showing 4 worktrees, 2 with changes, 2 ahead (✗ would conflict ↑ ahead of default ⇡ ahead of remote)

Since format_summary_message already inspects ListItem data to count "with changes" / "ahead", it could also collect which status symbols are present and append their meanings. Most runs only show 3–5 distinct symbols, so this stays compact and directly relevant.

2. --legend flag — opt-in, appends a full legend block after the footer. Doesn't affect default output at all.

3. First-run hint — show (run with --legend for symbol meanings) in the footer the first few times, then stop (like git's advice messages). Lightest touch but least discoverable long-term.

Option 1 seems like the best tradeoff: no extra lines, no flag to remember, and only shows what's relevant. The footer already varies in length depending on the data, so a few extra symbol explanations fit naturally.

— Reply to this email directly, view it on GitHub https://github.com/max-sixty/worktrunk/issues/1437#issuecomment-4087061675, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAXPPEQIX3NFWUM2AIOXIL4RNIYBAVCNFSM6AAAAACWNUVR5OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DAOBXGA3DCNRXGU . You are receiving this because you authored the thread.Message ID: @.***>

armstrjare avatar Mar 19 '26 02:03 armstrjare

fwiw I'm still thinking about this. I agree the symbols are a bit opaque. Something like (✗ would conflict ↑ ahead of default ⇡ ahead of remote) could be viable, with a sample of the symbols.

max-sixty avatar Apr 09 '26 20:04 max-sixty