Skip to content

fix: correct command tab completion - #51

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 TFMCCore, including the current prefix and applicable permission or sender context.

  • TFMCCore-01: Administrators can complete online account names for pack and packretry, with case-insensitive prefix matching and empty terminal positions.

Validation: tfmc-mvn -o -B --no-transfer-progress clean verify passed (793 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: 6ea1f3df-05d3-4929-ba13-951292e35e1a
📥 Commits

Reviewing files that changed from the base of the PR and between 7703f52 and ba2b11f.

📒 Files selected for processing: 2
  • src/main/java/net/tfminecraft/tfmccore/commands/CoreTabCompletion.java
  • src/test/java/net/tfminecraft/tfmccore/commands/CoreTabCompletionCoverageTest.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

  • Improvements
    • Tab completion for pack and pack retry commands now suggests online player names to administrators, filtering suggestions by the entered prefix.
    • Suggestions are withheld when the sender lacks permission, the prefix has no match, or an additional argument has already been entered.
    • The tcore command no longer displays suggestions when entered without arguments.

Tab completion now rejects empty argument arrays for tcore. For pack and packretry, admins receive online player-name suggestions filtered by the entered prefix. Tests cover permissions, prefixes and argument positions.

Changes: Core command tab completion

Layer / File(s) Summary
Completion logic and coverage
src/main/java/net/tfminecraft/tfmccore/commands/CoreTabCompletion.java, src/test/java/net/tfminecraft/tfmccore/commands/CoreTabCompletionCoverageTest.java
The handler rejects empty argument arrays and provides filtered online player names for pack and packretry when the sender has ADMIN_PERMISSION. Tests cover permissions, case-insensitive prefix matching, unmatched prefixes and additional arguments.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: justinasla

Merge Risk: ⚪ Minimal · up to ba2b1

Authorized users can complete player targets for pack and packretry at the expected argument position. No actionable merge risk is identified.

- [ ] 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:S 10-29 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 fd3491e 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:S 10-29 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant