Skip to content

fix: correct command tab completion - #44

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

  • GAMES-1: Poker kick completes matching online tournament registrants only for permitted players at an editable, enabled, idle table; excludes live/paying tables and invalid targets.
  • GAMES-2: Deal table completes back directly after board/dealer and after a valid positive card count, filtering prefixes and excluding console or invalid argument sequences.
  • GAMES-3: Reload is suggested only when games.admin and games.admin.reload are both granted, including an explicit child-permission denial.

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

Documentation: TF-Minecraft/Docs#266.

@github-actions github-actions Bot added the size:S 10-29 effective changed lines (tests excluded in mixed PRs). label Oct 15, 2026
@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: 2dbd003e-4146-4bac-bcc0-3d5f161d81ca
📥 Commits

Reviewing files that changed from the base of the PR and between 0ce39e4 and 0ca8d57.

📒 Files selected for processing: 2
  • src/main/java/net/tfminecraft/games/command/CommandManager.java
  • src/test/java/net/tfminecraft/games/command/CommandManagerTest.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
    • Tab completion now shows the reload command only to players with the required permission.
    • Poker kick suggestions are limited to eligible online players at nearby tables where the action is available.
    • Deal commands now suggest the back modifier in the relevant position and validate numeric counts before offering completions.

Command completion now filters reload and poker kick suggestions by permissions and table conditions. It also suggests the back modifier for supported deal table arguments.

Changes: Command completion

Layer / File(s) Summary
Reload permission filtering
src/main/java/net/tfminecraft/games/command/CommandManager.java, src/test/java/net/tfminecraft/games/command/CommandManagerTest.java
The reload suggestion requires games.admin.reload. Tests check the permission conditions for top-level suggestions.
Poker kick target completion
src/main/java/net/tfminecraft/games/command/CommandManager.java, src/test/java/net/tfminecraft/games/command/CommandManagerTest.java
Player-name suggestions require an eligible sender and an editable, idle poker table. Suggestions are limited to online players registered at that table. Tests cover these checks and prefix matching.
Deal table back modifier completion
src/main/java/net/tfminecraft/games/command/CommandManager.java, src/test/java/net/tfminecraft/games/command/CommandManagerTest.java
The back suggestion is available for board and dealer piles at supported argument positions. Completion after a count requires an integer of at least one. Tests cover invalid arguments and sender conditions.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: xxfran10xx

Merge Risk: ⚪ Minimal · up to 0ca8d

The reviewed completion changes appear ready to merge after normal checks.

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

@ryanbarlow97
ryanbarlow97 merged commit 100b5ed into main Oct 15, 2026
4 checks passed
@ryanbarlow97
ryanbarlow97 deleted the fix/command-tab-completion-20261015 branch October 15, 2026 18:56
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