Skip to content

fix: correct command tab completion - #21

Merged
ryanbarlow97 merged 1 commit into
mainfrom
fix/command-tab-completion-20261015
Oct 15, 2026
Merged

ryanbarlow97 merged 1 commit into
mainfrom
fix/command-tab-completion-20261015

Conversation

@ryanbarlow97

Copy link
Copy Markdown
Contributor

Correct command suggestions to match the arguments accepted by Research, including the current prefix and applicable permission or sender context.

  • RS-01: Research completion offers reload only for matching case-insensitive prefixes and authorized senders.

Validation: tfmc-mvn -o -B --no-transfer-progress clean verify passed (298 tests, zero failures, errors or skips), including command-completion regressions. git diff --check passed.

Documentation: TF-Minecraft/Docs#266.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9ca29ee5-365a-4a67-aa7d-466c625a5fa0
📥 Commits

Reviewing files that changed from the base of the PR and between 99b0d4e and e399715.

📒 Files selected for processing: 2
  • src/main/java/net/tfminecraft/research/command/CommandManager.java
  • src/test/java/net/tfminecraft/research/ResearchLifecycleTest.java

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Command tab completion now filters suggestions according to the first argument, rather than showing every subcommand. Matching is case-insensitive, so entering RE suggests reload, while an unmatched prefix returns no suggestions.

Tab completion now returns subcommands that match the first argument, using case-insensitive prefix matching. The lifecycle test checks matching and non-matching inputs.

Changes: Command completion

Layer / File(s) Summary
Filter subcommands by prefix
src/main/java/net/tfminecraft/research/command/CommandManager.java, src/test/java/net/tfminecraft/research/ResearchLifecycleTest.java
onTabComplete lowercases the first argument with Locale.ROOT and returns subcommands that start with it. The test checks RE, reload, and zzz.

Priority: ⬇️ Low

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to e3997

The command completion change is ready to merge with authorization and prefix behavior covered.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions github-actions Bot added the size:XS 0-9 effective changed lines (tests excluded in mixed PRs). label Oct 15, 2026
@ryanbarlow97
ryanbarlow97 marked this pull request as ready for review October 15, 2026 18:44
@ryanbarlow97
ryanbarlow97 merged commit 940d5d0 into main Oct 15, 2026
4 checks passed
@ryanbarlow97
ryanbarlow97 deleted the fix/command-tab-completion-20261015 branch October 15, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant