Skip to content

feat(init): add tab completion hint to first-run output - #110

Merged
tonythethompson merged 4 commits into
masterfrom
add-completions-hint
Aug 10, 2026
Merged

feat(init): add tab completion hint to first-run output#110
tonythethompson merged 4 commits into
masterfrom
add-completions-hint

Conversation

@tonythethompson

@tonythethompson tonythethompson commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

After numan init, suggest running 'numan completions nushell' to enable tab completion. This helps newcomers discover the feature immediately.

Review in cubic

After numan init, suggest running 'numan completions nushell' to enable
tab completion. This helps newcomers discover the feature immediately.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry @tonythethompson, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@tonythethompson, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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: ASSERTIVE

Plan: Pro Plus

Run ID: 77676692-504d-41bf-ac9f-f094a04d7613

📥 Commits

Reviewing files that changed from the base of the PR and between 63c61ba and 13fef66.

📒 Files selected for processing (1)
  • src/cmd/init.rs
📝 Walkthrough

Walkthrough

The initialization output now includes a Nushell tab-completion command in its listed next steps.

Changes

Initialization guidance

Layer / File(s) Summary
Add Nushell completion guidance
src/cmd/init.rs
The initialization output lists the command to enable Nushell tab completion for Numan commands.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 7 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 60.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (7 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the added tab-completion hint in the numan init first-run output.
Description check ✅ Passed The description directly explains the new Nushell completion hint and its benefit for newcomers.
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.
Pipeline Stage Enum Ordering ✅ Passed The PR changes only src/cmd/init.rs to print a completions hint; no SessionWorkflowStage enum, member comparison, or pipeline-stage change exists.
Gpu/Cpu Runtime Boundary ✅ Passed The PR changes only src/cmd/init.rs; it does not modify inference/, runtime requirements, main.py, or C# diarization code, so this boundary check is not applicable.
Managed Host Restart Safety ✅ Passed The change only adds a completion hint in src/cmd/init.rs; no managed-host component, restart call, lease guard, or readiness transition is modified.
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-completions-hint
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch add-completions-hint

Warning

Review ran into problems

🔥 Problems

Linked repositories: Public OSS repositories can only analyze public repositories installed in this organization. Analyzed tonythethompson/QuickShell, tonythethompson/numan, tonythethompson/dependency-chain-substrate, skipped Trackdubllc/Trackdub.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Add tab completion hint to first-run numan init output

✨ Enhancement 🕐 Less than 5 minutes

Grey Divider

AI Description

• Print a post-numan init hint to enable Nushell tab completion.
• Improve first-run discoverability of the numan completions feature.
High-Level Assessment

The following are alternative approaches to this PR:

1. Shell-aware completion hinting
  • ➕ More relevant guidance by suggesting the user’s detected shell (e.g., bash/zsh/fish/nushell).
  • ➕ Avoids potentially confusing Nushell-specific instructions for non-Nushell users.
  • ➖ Requires shell detection heuristics or environment inspection that may be unreliable across platforms.
  • ➖ Adds branching complexity to a simple onboarding message.
2. Link to docs/help instead of a specific command
  • ➕ Keeps onboarding output short and avoids endorsing one shell.
  • ➕ Centralizes instructions in one place (docs/help), reducing future maintenance.
  • ➖ Less immediate/actionable; users may not click through.
  • ➖ Reduced discoverability compared to a concrete copy-paste command.

Recommendation: Current approach is a good low-risk UX win. If confusion from Nushell-specific guidance becomes an issue, consider switching to a shell-aware hint or a short pointer to numan completions --help while keeping the onboarding message concise.

Files changed (1) +3 / -0

Enhancement (1) +3 / -0
init.rsPrint Nushell tab-completion next-step after 'numan init' +3/-0

Print Nushell tab-completion next-step after 'numan init'

• Adds an additional onboarding line instructing users to run 'numan completions nushell' to enable tab completion. This makes completion support discoverable immediately after initialization.

src/cmd/init.rs

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e84962f47e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/cmd/init.rs
@greptile-apps

greptile-apps Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a first-run onboarding message that directs users to install Nushell tab completion.

  • Suggests running numan completions nushell.
  • Mentions the --print option for manual installation steps.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/cmd/init.rs Adds a syntactically valid completion-installation hint to the existing onboarding output.

Reviews (3): Last reviewed commit: "fix(init): clarify completions hint inst..." | Re-trigger Greptile

greptile-apps[bot]
greptile-apps Bot previously approved these changes Aug 9, 2026
@qodo-code-review

qodo-code-review Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Completion hint does not install completions ✓ Resolved 📘 Rule violation ≡ Correctness
Description
The new onboarding message says running numan completions nushell enables tab completion, but the
command only generates and prints the script with installation instructions rather than installing
or loading it. Users who follow the hint literally therefore leave tab completion disabled because
they must pipe the output to Nushell’s vendor autoload path.
Code

src/cmd/init.rs[R158-160]

+    println!(
+        "Run 'numan completions nushell' to enable tab completion for Numan commands."
+    );
Relevance

●●● Strong

Team often fixes misleading CLI guidance; similar accepted changes corrected hints and completions
install messaging.

PR-#105
PR-#108
PR-#71

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The changed onboarding line presents the generator command as sufficient to enable completion, but
the implementation only generates and prints the script. The documented Nushell installation
sequence separately creates the vendor autoload directory and pipes the output to save -f, proving
that these additional steps are required to persist and enable the completion script.

Rule 2604083: numan completions must write shell completion files by default and only print when --print is used
src/cmd/init.rs[158-160]
src/cmd/completions.rs[28-33]
src/cmd/completions.rs[62-66]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The onboarding hint claims that `numan completions nushell` enables tab completion, but the command emits the script rather than installing or loading it, so users following the instruction literally remain without completions.

## Issue Context
`src/cmd/completions.rs[28-33]` prints the generated script, while the Nushell installation hint requires creating `$nu.data-dir/vendor/autoload` and piping the output through `save -f` to persist it. Update the onboarding text to provide the complete Nushell installation steps, or explicitly tell users to run the command and follow its installation instructions.

## Fix Focus Areas
- src/cmd/init.rs[158-160]
- src/cmd/completions.rs[62-66]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context used
✅ Compliance rules (platform): 31 rules
✅ REVIEW.md
Review mode: 🚀 Fast: This is a single localized, low-risk runtime output change with no security, API, data, or control-flow impact.

Grey Divider

Tip of the day
💡 Did you know, you can reply 'qodo' on any finding to push back, ask questions, or dig deeper

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread src/cmd/init.rs
@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo Fixer

No findings are within the configured fix scope. To change which findings are fixed, adjust the setting on your Qodo configuration page.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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 `@src/cmd/init.rs`:
- Around line 158-160: Add regression coverage for the init onboarding output
around the relevant initialization command or test helper: assert first-time
initialization includes “numan completions nushell”, and assert repeat or
refresh initialization omits it when that remains the intended behavior. Keep
the test focused on captured user-visible output.
- Around line 158-160: Run cargo fmt and verify cargo fmt --check passes for the
code around the completion println! in the init command. Apply only the
formatter’s required changes in src/cmd/init.rs, preserving the completion
command text unchanged.
🪄 Autofix

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: ASSERTIVE

Plan: Pro Plus

Run ID: 673518ca-c31e-4f9e-8af2-40a9b91a2142

📥 Commits

Reviewing files that changed from the base of the PR and between 7c66501 and 63c61ba.

📒 Files selected for processing (1)
  • src/cmd/init.rs
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • tonythethompson/QuickShell (manual)
  • tonythethompson/numan (manual)
  • tonythethompson/dependency-chain-substrate (manual)
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: Test (windows-latest)
  • GitHub Check: Real-Nu acceptance (windows-latest)
  • GitHub Check: Analyze (rust)
🧰 Additional context used
📓 Path-based instructions (10)
**/*

📄 CodeRabbit inference engine (CLAUDE.md)

**/*: Use Serena's semantic, symbol-aware tools as the primary tools for reading and editing code; use built-in Read, Glob, Grep, and Edit only under the stated exceptions.
Before editing a code file, inspect its symbol overview, read the specific symbols being changed, and edit them with Serena's symbol-aware tools.
Understand the existing code before changing it and make the smallest change that satisfies the request; avoid unrelated cleanup, premature abstractions, unnecessary error handling, feature flags, and compatibility shims.
Prefer editing existing files over creating new ones, and never create Markdown or README files unless explicitly requested.
For exploratory questions, provide a 2–3 sentence recommendation with the main tradeoff and do not implement until the user agrees.
For UI or frontend changes that cannot be tested in a browser, explicitly state that browser testing was not performed rather than claiming success.
Address security issues when discovered, including injection, XSS, SQL injection, path traversal, and secret leaks.
Pause and obtain confirmation before destructive, hard-to-reverse, externally visible, or third-party-upload actions, including deleting files or branches, dropping tables, force-pushing, modifying CI/CD, posting externally, or uploading content.
When blocked, investigate the root cause instead of bypassing it with --no-verify, --force, or deletion; investigate unfamiliar files, branches, and configuration before deleting them.
Only commit when explicitly asked; do not proactively update git configuration or push changes.
Do not skip Git hooks unless explicitly asked; if a pre-commit hook fails, fix the issue, re-stage, and create a new commit rather than amending.
Stage files by name rather than using git add -A or git add ., to avoid accidentally including secrets or large binaries.
Use a HEREDOC for commit messages, and add co-author attribution only when the user explicitly requests the exact trailer.
Do not force-pus...

Files:

  • src/cmd/init.rs
**/*.{js,jsx,ts,tsx,py,java,go,rs,rb,php,c,cpp,h,hpp,cs,swift,kt,kts}

📄 CodeRabbit inference engine (CLAUDE.md)

Add comments only when the WHY is non-obvious; do not narrate what the code does, reference the current task, or reference the PR in comments.

Files:

  • src/cmd/init.rs
!**/.env,!**/credentials.json,!**/*.pem

📄 CodeRabbit inference engine (CLAUDE.md)

Do not commit files that appear to contain secrets, including .env, credentials.json, and PEM files; warn before doing so even if explicitly requested.

Files:

  • src/cmd/init.rs
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.rs: Use the Rust 2021 edition.
Use anyhow::Result with .context(...) in application code; use thiserror for library error types that callers match on.
Use clap derive macros for CLI definitions.
Use serde with serde_json or toml for serialization.
Function parameters must use &Path, not &PathBuf.
Library code must not panic; error paths should return anyhow::Result with context where appropriate.
Add or update tests for behavior changes, including relevant failure paths.
New mutating code paths must acquire the mutation lock via acquire_mutation_lock(root) and snapshot the lockfile before writes.
Lockfile, journal, and state-file JSON writes must use write_json_atomic.
numan install must write only to $NUMAN_ROOT; it must not invoke Nu or register plugins/autoloads.
Only activate and deactivate may modify Nu integration state.
Treat the lockfile as the authoritative source of truth; derived projections such as autoload state must not be authoritative.
Install payloads under versioned, content-addressed paths and never overwrite them in place.
Never overwrite foreign autoload files; respect OWNERSHIP_MARKER.
Pass plugin paths through environment variables only; do not use runtime interpolation in Nu program strings.

**/*.rs: All CI gates must pass: cargo test, cargo clippy -- -D warnings, and cargo fmt --check.
Every mutating command—including install, remove, update, gc, and future nupm import—must call acquire_mutation_lock(root).
Lockfiles, journals, and state files must use write_json_atomic; partial writes are not allowed.
Pending activation, autoload, and lifecycle journals must be stored under $NUMAN_ROOT/state/.
Module autoload identity must match all four fields: Nu executable hash, Nu version, vendor autoload directory, and managed file path; the lockfile module_activation value is authoritative.
Never overwrite foreign autoload files; respect OWNERSHIP_MARKER.
Pass paths to Nu only throu...

Files:

  • src/cmd/init.rs
**/*.{rs,toml}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Run and keep cargo fmt/rustfmt clean, and ensure cargo clippy -- -D warnings passes.

Files:

  • src/cmd/init.rs
**/*.{rs,nu}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.{rs,nu}: Real-Nu acceptance tests must be marked #[ignore] and should be run when changes affect activation or nupm import; unit tests must not spawn real nu and should use injectable seams such as FakeCandidateRunner or registrars.
The nupm integration must be read-only toward NUPM_HOME, must not execute build.nu, and must not perform bidirectional synchronization.

Unit tests must use FakeCandidateRunner or injectable registrars and must not spawn a real nu process.

Files:

  • src/cmd/init.rs
**/*.{rs,md}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Match existing naming, module layout, and documentation level in the file being edited; update AGENTS.md, docs/, or command help when structure, conventions, or user-visible behavior changes.

Tests must cover failure modes, not only successful execution.

Files:

  • src/cmd/init.rs
**/*.{rs,md,toml}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use the repository's established serialization and module conventions rather than introducing unrelated refactors.

Files:

  • src/cmd/init.rs
src/cmd/{activate,deactivate,update,install,remove,init,nupm}.rs

📄 CodeRabbit inference engine (AGENTS.md)

Create an activation snapshot before mutations performed by install, update, remove, activate, deactivate, nupm import, and init --refresh.

Files:

  • src/cmd/init.rs
src/cmd/**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

Pass Nu paths and names through environment variables (NUMAN_PLUGIN_BINARY, NUMAN_PLUGIN_CONFIG, and NUMAN_PLUGIN_NAME); the Nu program string must be a compile-time constant with no runtime interpolation.

Files:

  • src/cmd/init.rs
🔍 Remote MCP DeepWiki, GitHub Copilot

Relevant review context

  • The supplied mta1124-1629472/Babel-Player repository was unavailable. The matching PR was found in tonythethompson/numan, PR #110.
  • PR #110 changes only src/cmd/init.rs, adding the hint after the doctor message.
  • The hint is printed only during first-init onboarding when the config is newly created, registries are empty, or the official registry was added—not on every numan init or numan init --refresh.
  • numan completions nushell is an install-by-default command: it writes to Nushell’s vendor-autoload path and creates parent directories; --print is the print-only mode. Therefore, the hint is consistent with the current implementation.
  • Existing tests cover initialization state and completion generation/install separately, but no test asserts the onboarding text itself.
  • CI currently reports Format: failure; Clippy, MSRV, Package, Deny, and completed Ubuntu/macOS acceptance checks passed. Several checks remained in progress when queried. REVIEW.md lists cargo fmt --check as a required gate.

Comment thread src/cmd/init.rs
Address review feedback and satisfy rustfmt by using a single-line println.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tonythethompson
tonythethompson merged commit ee857f1 into master Aug 10, 2026
29 checks passed
@tonythethompson
tonythethompson deleted the add-completions-hint branch August 10, 2026 04:20
@linear-code

linear-code Bot commented Aug 10, 2026

Copy link
Copy Markdown

NUM-95

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