8000 fix: fix(min): offer min init scaffold when add has no minimal.toml by gominimal-aw-bot[bot] · Pull Request #1538 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix: fix(min): offer min init scaffold when add has no minimal.toml - #1538

Merged
norrietaylor merged 1 commit into
mainfrom
inbox-patch/fix/min-add-scaffold-offer-838d244f9039d4ac
Sep 22, 2026
Merged

norrietaylor merged 1 commit into
mainfrom
inbox-patch/fix/min-add-scaffold-offer-838d244f9039d4ac

Conversation

@gominimal-aw-bot
@gominimal-aw-bot gominimal-aw-bot Bot commented Sep 18, 2026 •
Copy link
Copy Markdown
Contributor

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABR5q44A

min add --session <pkg> in a directory without a minimal.toml died with the bare string minimal.toml: not found instead of offering the min init scaffold that min session activate already shows.

cmd_add now catches the MFile(NotFound) error from Context::new, offers the scaffold, retries, and falls back to the min init hint that min update already gives. offer_mfile_scaffold takes an optional decline notice so cmd_add can suppress the session-specific wording.

Verification

  • cargo fmt --all --check --manifest-path target/Cargo.toml
  • cargo clippy --workspace --locked --manifest-path target/Cargo.toml -- -D warnings
  • cargo build --workspace --locked --manifest-path target/Cargo.toml
  • cargo test --locked --manifest-path target/Cargo.toml -p minimal

Summary by CodeRabbit

  • New Features
    • When adding a project without a minimal.toml file, the app now offers to set up the project configuration and retries the command if setup succeeds.
    • During session activation, users who skip configuration setup are told that activation will continue with a default environment.
  • Bug Fixes
    • If project configuration is still missing after setup is declined or skipped, the add command now provides a min init hint.

@gominimal-aw-bot gominimal-aw-bot Bot added the agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. label Sep 18, 2026
@gominimal-aw-bot
gominimal-aw-bot Bot requested a review from a team as a code owner September 18, 2026 07:28
@gominimal-aw-bot gominimal-aw-bot Bot added the agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. label Sep 18, 2026
@coderabbitai
coderabbitai Bot commented Sep 18, 2026 •
Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: d0fa2188-5a6a-4d76-a23d-9c329810a91d

📥 Commits

Reviewing files that changed from the base of the PR and between d6f7480 and 5bc8bc0.

📒 Files selected for processing (2)
  • crates/minimal/src/cmd/project.rs
  • crates/minimal/src/cmd/session.rs

Included review availability: 3 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

The scaffold helper now accepts an optional notice for skipped or declined scaffolding. The min add command offers scaffolding when minimal.toml is missing, then retries context creation.

Changes

Scaffolding and dependency addition

Layer / File(s) Summary
Custom scaffold decline handling
crates/minimal/src/cmd/project.rs, crates/minimal/src/cmd/session.rs
The scaffold helper accepts an optional decline notice. Activation passes guidance about the default environment and min init.
Missing project scaffolding in add
crates/minimal/src/cmd/project.rs
When context creation fails because minimal.toml is missing, cmd_add resolves the project path, offers scaffolding, and retries context creation. If the file remains missing, it returns an error with a min init hint.

Priority: ⬇️ Low

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

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant cmd_add
  participant Context_new
  participant offer_mfile_scaffold
  participant User
  cmd_add->>Context_new: create project context
  Context_new-->>cmd_add: report missing minimal.toml
  cmd_add->>offer_mfile_scaffold: offer scaffolding
  offer_mfile_scaffold->>User: request confirmation
  User-->>offer_mfile_scaffold: accept scaffolding
  offer_mfile_scaffold-->>cmd_add: return after scaffolding
  cmd_add->>Context_new: retry context creation
Loading

Suggested reviewers: norrietaylor

Merge Risk: ⚪ Minimal · up to 5bc8b

When minimal.toml is missing, min add offers to initialize the selected project and retries. No actionable merge risk is established; the change is ready for normal validation.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: offering the min init scaffold when min add runs without minimal.toml. The repeated fix prefix is redundant, but the title remains clear and speci…
Description check ✅ Passed The description explains the problem, the change, and the verification commands. It does not use the template’s Summary, Testing, and Checklist headings, and it provides no test output or checkl…
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 3 files.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

A rabbit checks the project door,
“No config yet,” it says once more.
A scaffold offer hops in sight,
The add command tries again just right.
Then carrots wait beneath the moon.

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

@gominimal-aw-bot gominimal-aw-bot Bot added the agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch label Sep 18, 2026
@gominimal-aw-bot
Copy link
Copy Markdown
Contributor Author

This PR has merge conflicts with its base branch (main) that need human resolution.

Conflicted files:

  • crates/minimal/src/lib.rs

Reason it's not trivial: conflict touches Rust source (*.rs), which is outside the trivial-conflict criteria.

Recommended action: rebase or merge manually, then remove the needs-human label so this chore re-evaluates.

Generated by PR conflict resolver (side-repo-ops operator) · ⊞ 18.7K · ◷

@gominimal-aw-bot gominimal-aw-bot Bot added the needs-human An agent handed off; a human must act, then clear this label. Set by defer and handoffs. label Sep 19, 2026
min add --session <pkg> in a directory without a minimal.toml died
with the bare string "minimal.toml: not found" instead of offering
the min init scaffold that min session activate already shows.

Catch the MFile(NotFound) error from Context::new in cmd_add, offer
the scaffold, retry, and fall back to the min init hint that min
update already gives. Parameterize offer_mfile_scaffold's decline
notice so cmd_add can suppress the session-specific wording.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@cursor
cursor Bot force-pushed the inbox-patch/fix/min-add-scaffold-offer-838d244f9039d4ac branch from d6f7480 to 5bc8bc0 Compare September 22, 2026 22:10
@norrietaylor
norrietaylor merged commit d8665fd into main Sep 22, 2026
32 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/fix/min-add-scaffold-offer-838d244f9039d4ac branch September 22, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch needs-human An agent handed off; a human must act, then clear this label. Set by defer and handoffs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0