Skip to content

fix: correct command tab completion - #11

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

  • TR-01: Authorized players can complete resetcooldowns; console, denied senders, unknown prefixes and later arguments get no candidates.

Validation: tfmc-mvn -o -B --no-transfer-progress clean verify passed (118 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: bc936ace-e41d-45c0-b2dd-69b0bb4fb3d4
📥 Commits

Reviewing files that changed from the base of the PR and between a30ed32 and 973422f.

📒 Files selected for processing: 2
  • src/main/java/net/tfminecraft/trialrooms/manager/CommandManager.java
  • src/test/java/net/tfminecraft/trialrooms/ManagersTest.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 resetcooldowns is now limited to players with admin permission and a single argument. Suggestions match the argument regardless of capitalisation; other senders and arguments receive no suggestions.

Tab completion now returns resetcooldowns for players with trialrooms.admin permission when they provide one argument that is a case-insensitive prefix of the command. Tests cover matching and non-matching input, console input, and player permissions.

Changes: Admin tab completion

Layer / File(s) Summary
Filter tab-completion suggestions
src/main/java/net/tfminecraft/trialrooms/manager/CommandManager.java, src/test/java/net/tfminecraft/trialrooms/ManagersTest.java
Tab completion requires a permitted player and exactly one argument. It suggests resetcooldowns when the argument is a case-insensitive prefix. Tests cover console input, player permissions, matching prefixes, unknown input, and additional arguments.

Priority: ⬇️ Low

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 97342

Permitted players receive matching resetcooldowns suggestions, while denied players do not. The reviewed change presents no actionable merge risk.

- [ ] 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 a678652 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