fix: add canonical min session list command with min ls alias - #1119
Conversation
`min session list` did not exist: `SessionCommand` had no `List` variant, so the guessable `<noun> list` form of the flagship session noun errored under clap where every other noun (e.g. `min loadout list`) accepts it. Add `SessionCommand::List`, delegating to the existing `cmd_ls` so output is byte-identical, with `ls` as a visible noun-level alias. `min ls` keeps its bare top-level form as a visible alias. Docs now present `min session list` as canonical.
📝 WalkthroughWalkthroughThe CLI now uses ChangesSession list aliases
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
Two problems before this is mergeable:
The |
Un-clobber the theme module, TTY predicate, and doc comments the stale base reverted, and complete the issue's second half: min daemon stop is canonical with min stop kept as the visible top-level alias, mirroring the session list / ls pattern. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KyZLpkRf9G4A2hUDgDvn5f
|
Restored the #1114 content the stale base clobbered and added the missing daemon-stop half: min daemon stop canonical, min stop visible alias, parse test + docs mirroring the session-list pattern. CI re-running. |
Keep the PR to the session-list half: `min session list` canonical with `min ls`/`min session ls` as visible aliases. `min stop` stays the bare top-level command it is on main, unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KyZLpkRf9G4A2hUDgDvn5f
…-0620e0480963317d' into wt-1119-work # Conflicts: # docs/reference/cli-min.md
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/reference/cli-min.md`:
- Around line 42-44: Update the fenced code block containing the “min session
list” command to declare the console language, resolving the markdownlint MD040
violation while preserving the command text.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d5a102ce-6167-4f62-a1c5-7981e002ffc8
📒 Files selected for processing (3)
crates/minimal/src/lib.rsdocs/reference/cli-min.mddocs/reference/cli.md
| ``` | ||
| min ls [--raw] [--json] | ||
| min session list [--raw] [--json] | ||
| ``` |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add a language identifier to the fenced block.
markdownlint-cli2 reports MD040 because line 42 opens a fenced block without a language. Use console or shell.
Proposed fix
-```
+```console
min session list [--raw] [--json]📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ``` | |
| min ls [--raw] [--json] | |
| min session list [--raw] [--json] | |
| ``` |
🧰 Tools
🪛 markdownlint-cli2 (0.23.1)
[warning] 42-42: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/reference/cli-min.md` around lines 42 - 44, Update the fenced code block
containing the “min session list” command to declare the console language,
resolving the markdownlint MD040 violation while preserving the command text.
Source: Linters/SAST tools
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABK4Q7hA
min session listdid not exist — theSessionCommandsubcommand had noListvariant — so the guessable<noun> listform of the flagship session noun errored under clap, while every other noun (e.g.min loadout list) accepts it. This addsSessionCommand::Listdelegating to the samecmd_lspath so its output is byte-identical, withlsas a visible noun-level alias; the existing top-levelmin lsis kept as a visible alias. Thecli.mdandcli-min.mdreferences now presentmin session listas canonical, and a parse test covers all three spellings plus their--raw/--jsonflags.Verification
cargo fmt --all --check — clean, no drift
cargo clippy --workspace --locked -- -D warnings — 0 warnings
cargo build --workspace --locked — ok
cargo test --workspace --locked — ok; minimal lib suite 139 passed, 0 failed (incl. new session_list_spellings_all_reach_ls)
Note
Add canonical
min session listcommand withmin lsas a top-level aliasList(LsArgs)variant toSessionCommandwith avisible_alias = "ls"attribute, makingmin session listandmin session lsvalid spellings that invoke the same list behavior as the existingmin ls.min session listas the canonical form and clarify thatmin lsis retained as a high-traffic alias.session_list_spellings_all_reach_lsconfirms all three spellings parse to identicalLsArgsdefaults.Macroscope summarized 098bd17.
Summary by CodeRabbit
New Features
min session listas the canonical command for listing sessions.min session lsas an additional visible alias.--rawand--jsonoptions and produce identical output.Documentation