feat(list): configure wt list columns
What
Adds user-configurable column visibility for wt list via a new [list.columns] user-config section.
The config can now enable or suppress each optional table column by key:
[list.columns]
status = true
head-diff = true
main-commits = true
main-diff = false
summary = false
remote-commits = true
ci = false
path = false
url = true
commit = true
age = true
message = true
Unset keys preserve the current defaults: the ordinary wt list columns stay visible, while the expensive main-diff, summary, and ci columns remain off unless enabled or --full is used. --full still forces the full-mode columns on for a single invocation, even when config disables them.
The path column keeps its existing automatic behavior when unset: it only appears for branch/worktree mismatches. Setting path = true makes it eligible whenever there is path data, and path = false hides it.
Why
wt list --full is intentionally broad: it turns on every expensive/full-mode column at once. That is useful for inspection, but it does not let users build a stable daily view like "show main diff, but keep CI and summaries hidden" or "hide message/path to make the table denser."
This keeps the existing defaults and CLI behavior intact while making the list layout configurable in user config.
Implementation
- Adds
ListColumnsConfigunder[list.columns], including merge behavior for user/project override layering and env overrides such asWORKTRUNK__LIST__COLUMNS__MESSAGE=false. - Adds
ColumnVisibilityas the table-render-time policy object, so task selection and layout allocation agree on which columns are eligible. - Uses the visibility policy to skip unused expensive tasks (
BranchDiff,CiStatus,SummaryGenerate, and URL status when hidden). - Preserves the legacy "all columns eligible with automatic path" behavior for picker/statusline-style callers that already pass explicit task skips.
- Updates
wt listandwt confighelp/docs plus generated mirrors and snapshots.
Verification
cargo run -- hook pre-merge --yesin a normal terminal reached the insta/nextest summary with 3,932 passing tests and 2 local timeouts.- Re-running the two timed-out tests with
GIT_SSH_COMMAND='ssh -o BatchMode=yes -o ConnectTimeout=5'still timed out locally:integration_tests::eval::test_eval_ownerintegration_tests::list::test_list_json_repo_url_from_ssh_remote
- The remaining local timeout pattern is limited to tests that rewrite
originto[email protected]:...; this branch does not touch SSH remote handling. - Earlier sandbox validation also showed docs/doctests passing, but the full sandbox gate was not usable because PTY and filesystem permission tests failed under Codex sandboxing.
This was written by Codex on behalf of faria.
thanks @Faria22
I have been thinking of a general approach here; including a template that would allow for arbitrary vars, will publish something
this is an interesting approach. it's simple and flexible. But I wonder whether it's in an awkward place on the simplicity-flexibility frontier — its main role is in excluding columns. But when are times we want to always exclude a column? is there a specific case that gave you this idea or this is a general bid toward more flexibility?
I noticed myself not really looking at certain columns, like the path or commit hash, but also waiting to see the line diff against main, or the AI summary. So I think having control over every column makes it easy to customize what each person wants to see without changing the default.
@worktrunk-bot please draft a changelog and acknowledge @Faria22 as responsible for improvements in this area, even though this specific PR is closed
Here's a draft, @max-sixty.
The work that grew out of this area shipped in 0.61.0 as the custom-columns feature (#3073) — a template-driven [list.custom-columns.<Header>] rather than the boolean per-column toggles here, but the same goal: let people shape wt list without changing the defaults. That entry currently carries no acknowledgment, so the natural place to credit @Faria22 is there.
Proposed edit to the existing 0.61.0 wt list custom columns line — append a thanks clause:
wt listcustom columns: Each[list.custom-columns.<Header>]entry in user config adds a column towt list(and thewt switchpicker)… The feature is experimental, so the config shape may still change. (#3073, thanks @Faria22, whose #3065 prototyped configurablewt listcolumn visibility and motivated this area)
This matches the existing thanks @user / thanks @user for reporting convention used elsewhere in the changelog (e.g. the 0.60.0 wt step relocate and cargo install entries).
If you'd rather keep the released 0.61.0 section frozen and credit @Faria22 in the next release instead, an alternative is a fresh line under an upcoming ### Improved:
Happy to open a PR with whichever placement you prefer — just say which.
please PR
Opened #3174 — appends the thanks clause to the 0.61.0 wt list custom columns entry, crediting @Faria22's prototype here. If you'd prefer to keep the released section frozen and credit in the next release instead, let me know and I'll move it.