Skip to content

fix: add canonical min session list command with min ls alias - #1119

Merged
norrietaylor merged 6 commits into
mainfrom
inbox-patch/session-list-command-0620e0480963317d
Jul 31, 2026
Merged

fix: add canonical min session list command with min ls alias#1119
norrietaylor merged 6 commits into
mainfrom
inbox-patch/session-list-command-0620e0480963317d

Conversation

@gominimal-aw-bot

@gominimal-aw-bot gominimal-aw-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABK4Q7hA

min session list did not exist — the SessionCommand subcommand had no List variant — so the guessable <noun> list form of the flagship session noun errored under clap, while every other noun (e.g. min loadout list) accepts it. This adds SessionCommand::List delegating to the same cmd_ls path so its output is byte-identical, with ls as a visible noun-level alias; the existing top-level min ls is kept as a visible alias. The cli.md and cli-min.md references now present min session list as canonical, and a parse test covers all three spellings plus their --raw/--json flags.

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)

Generated by inbox-patch ·

Note

Add canonical min session list command with min ls as a top-level alias

  • Adds a List(LsArgs) variant to SessionCommand with a visible_alias = "ls" attribute, making min session list and min session ls valid spellings that invoke the same list behavior as the existing min ls.
  • Updates cli-min.md and cli.md to document min session list as the canonical form and clarify that min ls is retained as a high-traffic alias.
  • A new test session_list_spellings_all_reach_ls confirms all three spellings parse to identical LsArgs defaults.

Macroscope summarized 098bd17.

Summary by CodeRabbit

  • New Features

    • Added min session list as the canonical command for listing sessions.
    • Added min session ls as an additional visible alias.
    • All session-list command spellings support the same --raw and --json options and produce identical output.
  • Documentation

    • Updated CLI reference documentation to reflect the canonical command and available aliases.

`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.
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The CLI now uses min session list as the canonical session-list command. min ls and min session ls remain visible aliases. All spellings share parsing, flags, output, dispatch, tests, and documentation.

Changes

Session list aliases

Layer / File(s) Summary
Command declaration and alias
crates/minimal/src/lib.rs
Adds SessionCommand::List(LsArgs) with ls as its visible alias and identifies min session list as canonical.
Dispatch and parser validation
crates/minimal/src/lib.rs
Routes List to cmd_ls. Tests verify all spellings and their --raw and --json parsing.
Command reference updates
docs/reference/cli-min.md, docs/reference/cli.md
Documents the canonical spelling, aliases, shared flags, and shared output.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

  • gominimal/inbox#438 — Directly covers the min session list command, aliases, documentation, and parser tests.

Possibly related PRs

Suggested reviewers: twitchyliquid64

Poem

A rabbit typed session list with care,
Then kept ls aliases hopping there.
Raw and JSON flags follow the trail,
Tests confirm each command will prevail.
Documentation now points the way.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the canonical command and its alias, and it uses a concise Conventional Commit format.
Description check ✅ Passed The description explains the change and provides detailed verification results, but it uses Verification instead of Testing and omits the checklist.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch inbox-patch/session-list-command-0620e0480963317d

Comment @coderabbitai help to get the list of available commands.

@norrietaylor

Copy link
Copy Markdown
Member

Two problems before this is mergeable:

  1. Same refactor(min): unify interactive prompts on inquire with a brand theme #1114 reverts as fix: skip non-VCS-root upload in headless activate #1117: -pub mod theme;, can_prompt_interactively() back to dialoguer::console, and the SIGINT doc-comment rewrite all unwind the prompt unification merged earlier today (refactor(min): unify interactive prompts on inquire with a brand theme #1114). Rebase on current main and drop those hunks — only the SessionCommand::List wiring, tests, and docs belong here.

  2. The daemon-stop half of the issue is missing: the spec asks for min daemon stop as the canonical spelling with min stop kept as the visible alias. This PR only delivers the session list half; docs/reference/cli.md still lists min stop as a bare exception. Please add the daemon noun (wrapping the existing cmd_stop) with the alias, matching test coverage, and the docs rows.

The session list half itself looks right: canonical + two visible aliases, one cmd_ls implementation, parse test covers all spellings and flags.

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
@norrietaylor

Copy link
Copy Markdown
Member

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.

norrietaylor and others added 2 commits July 30, 2026 21:57
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
@norrietaylor
norrietaylor marked this pull request as ready for review July 31, 2026 05:00
@norrietaylor
norrietaylor requested a review from a team as a code owner July 31, 2026 05:00
norrietaylor and others added 2 commits July 30, 2026 22:01

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between d13896c and 098bd17.

📒 Files selected for processing (3)
  • crates/minimal/src/lib.rs
  • docs/reference/cli-min.md
  • docs/reference/cli.md

Comment thread docs/reference/cli-min.md
Comment on lines 42 to 44
```
min ls [--raw] [--json]
min session list [--raw] [--json]
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 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.

Suggested change
```
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

@norrietaylor
norrietaylor merged commit 7ee301d into main Jul 31, 2026
30 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/session-list-command-0620e0480963317d branch July 31, 2026 05:11
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.

1 participant