fix: hint min init when min update finds no minimal.toml - #1140
Conversation
`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.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 19 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Comment |
norrietaylor
left a comment
There was a problem hiding this comment.
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.
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
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
#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>
* 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>
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABKmhBEQ
min updateexits with a bareminimal.toml: minimal.toml not foundand no next step when run outside a project, whilemin session activateprints "Run 'min init' to give the project its own config." in the same situation. The not-found error fromContext::newpropagated straight to the top-level error printer; this intercepts it incmd_updateand appends the same hint, so the two commands stay consistent (informed by #682). No test was added: the sibling hint is itself untested andcmd_updatehas 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)
Note
Show
min inithint inmin updatewhenminimal.tomlis not foundWhen
cmd_updatefails to load the project config due to a missing file, it now returns a user-friendly error message suggesting the user runmin initinstead of propagating the rawNotFounderror. The change is in lib.rs.Macroscope summarized d427f90.