Skip to content

fix: hint min init when min update finds no minimal.toml - #1140

Merged
norrietaylor merged 1 commit into
mainfrom
inbox-patch/min-update-init-hint-d530e688a535147f
Jul 31, 2026
Merged

fix: hint min init when min update finds no minimal.toml#1140
norrietaylor merged 1 commit into
mainfrom
inbox-patch/min-update-init-hint-d530e688a535147f

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_kwDOSUhdos8AAAABKmhBEQ

min update exits with a bare minimal.toml: minimal.toml not found and no next step when run outside a project, while min session activate prints "Run 'min init' to give the project its own config." in the same situation. The not-found error from Context::new propagated straight to the top-level error printer; this intercepts it in cmd_update and appends the same hint, so the two commands stay consistent (informed by #682). No test was added: the sibling hint is itself untested and cmd_update has no unit surface (it builds a real context and downloads packages), and the interception returns before any of that.

Verification

cargo fmt --all --check --manifest-path target/Cargo.toml — passed, no drift
cargo clippy --workspace --locked -- -D warnings — passed, exit 0
cargo build --workspace --locked — passed, exit 0
cargo test --workspace --locked — passed, exit 0 (all workspace unit and doc tests green)

Generated by inbox-patch ·

Note

Show min init hint in min update when minimal.toml is not found

When cmd_update fails to load the project config due to a missing file, it now returns a user-friendly error message suggesting the user run min init instead of propagating the raw NotFound error. The change is in lib.rs.

Macroscope summarized d427f90.

`min update` exited with a bare "minimal.toml: minimal.toml not found"
and no next step when run outside a project, while `min session
activate` already points the user at `min init` in the same situation.

Intercept the not-found error from `Context::new` in `cmd_update` and
append the same hint, so the two commands stay consistent.
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 19 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 35108b58-7a5f-4943-aff7-22ec04300387

📥 Commits

Reviewing files that changed from the base of the PR and between 7e690dc and d427f90.

📒 Files selected for processing (1)
  • crates/minimal/src/lib.rs

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

@norrietaylor
norrietaylor marked this pull request as ready for review July 31, 2026 16:29
@norrietaylor
norrietaylor requested a review from a team as a code owner July 31, 2026 16:29

@norrietaylor norrietaylor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Verified against the issue and the surrounding code. The added hint string is byte-identical to the sibling path at crates/minimal/src/lib.rs:1379, so the two commands now give the same guidance in the same situation — which is exactly what gominimal/inbox#403 asked for. Error match is narrow (mctx::Error::MFile(mfile::Error::NotFound)) and every other error still propagates unchanged. CI green.

@norrietaylor
norrietaylor merged commit d67c46d into main Jul 31, 2026
30 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/min-update-init-hint-d530e688a535147f branch July 31, 2026 16:30
norrietaylor added a commit that referenced this pull request Jul 31, 2026
This branch's base predates #1140, so its copy of `cmd_update` still had
the pre-fix body. Because the branch was cut from a main that already
carried #1140, applying that stale copy silently reverted the hint —
git reports no conflict, since it is a clean content replacement inside
a file this branch legitimately edits.

Restores `cmd_update` to its state on main, byte for byte. No other
behaviour on this branch is touched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018QCWCa2XxqtLnQPPP7xMwU
norrietaylor added a commit that referenced this pull request Jul 31, 2026
This branch's agent run started before #1140 merged, so its copy of
`cmd_update` still had the pre-fix body. The branch was then cut from a
main that already carried #1140, silently reverting the hint — git
reports no conflict, since it is a clean content replacement inside a
file this branch legitimately edits.

Restores `cmd_update` to its state on main, byte for byte. The `min ls`
work on this branch is untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018QCWCa2XxqtLnQPPP7xMwU
norrietaylor added a commit that referenced this pull request Jul 31, 2026
#1142)

* feat(minimal): add create-new-session row to multi-match attach picker

The multi-match attach picker listed only existing sessions, so when
several matched the current directory there was no way to start a
fresh session from within the picker.

Add a trailing "+ Create a new session for <cwd>" row, always
rendered last so it never displaces an existing session. Selecting
it activates a new session for the cwd (autogen name, default sync)
and attaches, the same path that "min session activate --attach ."
runs. The non-TTY candidate listing is unchanged and gets no create
affordance.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(minimal): restore the `min init` hint this branch dropped

This branch's base predates #1140, so its copy of `cmd_update` still had
the pre-fix body. Because the branch was cut from a main that already
carried #1140, applying that stale copy silently reverted the hint —
git reports no conflict, since it is a clean content replacement inside
a file this branch legitimately edits.

Restores `cmd_update` to its state on main, byte for byte. No other
behaviour on this branch is touched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018QCWCa2XxqtLnQPPP7xMwU

---------

Co-authored-by: gominimal-aw-bot[bot] <281738952+gominimal-aw-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Norrie Taylor <norrie@minimal.dev>
norrietaylor added a commit that referenced this pull request Jul 31, 2026
* fix(minimal): align min ls table columns with --json field set

The `min ls` table rendered only SESSION ID, NAME, TITLE, and LAST
ACTIVITY, omitting the project_path and status fields that
`min ls --json` exposes. The two surfaces presented disjoint field
sets, so a table row and its JSON counterpart could not be read
interchangeably.

Add STATUS and PROJECT PATH columns to the table so it surfaces the
same session attributes the JSON output carries. Status renders with
the same snake_case tokens serde emits for the JSON surface.

* fix(minimal): restore the `min init` hint this branch dropped

This branch's agent run started before #1140 merged, so its copy of
`cmd_update` still had the pre-fix body. The branch was then cut from a
main that already carried #1140, silently reverting the hint — git
reports no conflict, since it is a clean content replacement inside a
file this branch legitimately edits.

Restores `cmd_update` to its state on main, byte for byte. The `min ls`
work on this branch is untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018QCWCa2XxqtLnQPPP7xMwU

---------

Co-authored-by: gominimal-aw-bot[bot] <281738952+gominimal-aw-bot[bot]@users.noreply.github.com>
Co-authored-by: Norrie Taylor <norrie@minimal.dev>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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