Skip to content

feat(list): add wt ls alias for wt list - #4670

Closed
sylr wants to merge 2 commits into
max-sixty:mainfrom
sylr:feat/list-ls-alias
Closed

sylr wants to merge 2 commits into
max-sixty:mainfrom
sylr:feat/list-ls-alias

Conversation

@sylr

@sylr sylr commented Nov 2, 2026

Copy link
Copy Markdown

Register ls as a visible clap alias on list, so wt --help shows [alias: ls].

Register `ls` as a visible clap alias on `list`, so `wt --help` shows
`[alias: ls]`.

Places that matched the canonical name now also cover the alias:
- is_top_level_builtin includes clap aliases, so a user alias named `ls`
  is reported as shadowed by the built-in.
- Completion skips injecting a configured alias whose name matches a
  built-in alias; previously an `ls` user alias duplicated the name and
  clap rejected every completion request.
- Claude statusline detection accepts `ls statusline` as well as
  `list statusline`, so install-statusline doesn't overwrite it.
- The nushell wrapper streams `ls` output like `list`.

Constraint: clap's subcommand_name() reports the canonical name, so
--print-schema and help/doc generation already handle `ls`
Confidence: medium
Scope-risk: narrow
Directive: a user alias named `ls` is now shadowed by the built-in
Not-tested: completion with an `ls` user alias; `ls statusline` detection; the last build and test run came before those two fixes

@worktrunk-bot worktrunk-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_statusline_configured() now treats any adjacent ls statusline tokens as Worktrunk's statusline. A Claude statusLine.command of ls statusline can invoke the ordinary ls binary; with that value in settings.json, I ran wt config plugins claude install-statusline --yes from this PR and it printed “Statusline already configured” without changing the setting. Please distinguish a Worktrunk invocation before recognizing the new alias, so an unrelated command does not prevent installation.

Matching adjacent `ls statusline` tokens also matched a plain
`ls statusline` command, which runs the system `ls`, so
install-statusline reported a foreign statusline as already configured.
install-statusline writes `wt list statusline`, so that is the standard
form to detect.

Rejected: require a preceding wt-like token before `ls` | binary-name matching was already removed for misidentifying `newt status`
Confidence: high
Scope-risk: narrow
@sylr

sylr commented Nov 2, 2026

Copy link
Copy Markdown
Author

Thanks, good catch. ls is also a real binary, so matching adjacent ls statusline tokens can't distinguish a Worktrunk invocation from a plain ls statusline.

Fixed in 29c5a06 by dropping the ls match: is_statusline_configured() is back to recognizing only list statusline, which is what install-statusline writes. I didn't try to detect a Worktrunk binary before ls, since binary-name matching was already removed after it misidentified newt status. A hand-edited wt ls statusline will go undetected, which seems the right trade-off for a non-standard form.

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

Confirmed: 29c5a06 removes the ls statusline match, so the plain ls statusline command no longer triggers the false “already configured” result I reported. That resolves my review concern.

@max-sixty

Copy link
Copy Markdown
Owner

Thanks. Closing: [aliases] covers this (ls = "wt list {{ args }}"), a built-in ls would silently shadow any user alias with that name, and I'd decide short names like ls, rm and sw as a set rather than one at a time (see #802).

This was written by Claude Code on behalf of max-sixty

@max-sixty max-sixty closed this Nov 5, 2026
max-sixty added a commit to max-sixty/tend that referenced this pull request Nov 21, 2026
Tend's review approved any PR with no defect. Submit said "If there are
no issues, approve with an empty body — silence means correct", and a
`code-review` finding needs a file, line and failure scenario, so a
correct change that wasn't worth its cost got an `APPROVE` unless
another check, such as the duplication check, turned its cost into a
finding. A repository overlay asking for a `COMMENT` on such changes
didn't override that default: worktrunk's reviews opened its
proportionality rule and approved anyway (max-sixty/worktrunk#4664,
max-sixty/worktrunk#4665, max-sixty/worktrunk#4666,
max-sixty/worktrunk#4670, max-sixty/worktrunk#4689,
max-sixty/worktrunk#4694).

Submit now says an `APPROVE` tells the maintainer the whole PR is worth
merging. Before one, including after a trivial increment, the session
says who loses what if the PR never merges and how they come to need it,
what it adds that later changes must keep working, and the cheapest
other way to get the benefit. It approves when the benefit pays for what
the PR adds and nothing materially cheaper exists; otherwise it posts a
`COMMENT` naming the cost or the cheaper way. On a self-authored PR,
where the review stays silent instead of approving, the same weighing
runs before that silence, so a correct bot PR that isn't worth merging
is raised as a concern, which Review's "carry its weight" bullet used to
ask for. That bullet goes, since Submit now owns the judgment. A
`COMMENT` that holds the verdict names its reason once, as a
merge-readiness hold already did, so a later push doesn't restate it,
and a re-targeted review that empties takes its verdict from Submit
instead of approving.

## Evidence

Eleven trajectory cases (`evals/cases/review-worth-*`) replay real
worktrunk PRs at their reviewed heads. On 20 Nov, with main (including
#1646 and #1712) merged in, this PR's review skill ran against main's,
three attempts per case per arm. On the four PRs that independent
reviewers judged not worth merging as written (max-sixty/worktrunk#4664,
max-sixty/worktrunk#4665, max-sixty/worktrunk#4666,
max-sixty/worktrunk#4694), these attempts held the verdict and named the
cost or a cheaper route:

| Executor | main | This PR |
| --- | --- | --- |
| Codex gpt-6.1-sol | 6 of 10 (2 attempts failed on model capacity) | 10
of 12 |
| Claude Opus 5.5 | 2 of 12 | 7 of 12 |

- Main's six Codex holds are on max-sixty/worktrunk#4666 and
max-sixty/worktrunk#4694, which the old text approved in all three
attempts on the 5 Nov base. Each review of max-sixty/worktrunk#4666
names the second cache as a copy of the existing cached `git remote
get-url` lookup, the kind of copy #1646 widened the duplication check to
flag; the reviews of max-sixty/worktrunk#4694 name the hand-written URL
parsing as more than the IPv6 fix needs. This PR also holds
max-sixty/worktrunk#4665 and max-sixty/worktrunk#4664 (2 of 3 each),
which main's text approved in every attempt that completed.
- On the PRs that should be approved (max-sixty/worktrunk#4334,
max-sixty/worktrunk#4469, max-sixty/worktrunk#4668,
max-sixty/worktrunk#4669, max-sixty/worktrunk#4680), Codex approved in
all 15 attempts on each arm. Claude, run on this PR's text only, held
max-sixty/worktrunk#4668 in 3 of 3, citing a `git rev-parse` per noted
directory on every pane refresh and a narrower fix, and held
max-sixty/worktrunk#4669 (2 of 3) and max-sixty/worktrunk#4680 (1 of 3)
over defects.
- On the 5 Nov base, not re-run: a standing hold that should survive a
test-only push stayed silent 6/6, a hold on a per-render cost stayed
held 6/6, and `review-landing-continuation` passed 3/3 on Codex.

## Costs

A trivial follow-up push now gets a whole-PR read.

> _This was written by Claude Code on behalf of max-sixty_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants