Skip to content

fix: correct command tab completion - #32

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

  • SU-01: Surgery completion is player-only; existing patient visibility, permissions and consent actions are preserved.

Validation: tfmc-mvn -o -B --no-transfer-progress clean verify passed (98 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: 86ba237b-192e-4635-9c47-f227b2cb597e
📥 Commits

Reviewing files that changed from the base of the PR and between 9462c28 and b298aee.

📒 Files selected for processing: 2
  • src/main/java/net/tfminecraft/surgery/commands/SurgeryCommand.java
  • src/test/java/net/tfminecraft/surgery/commands/SurgeryCommandTest.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 returns no suggestions to console and other non-player senders, including for accept and deny.
    • Player tab completion is unchanged: players can still see matching accept and deny options, and players with the required permission can see matching online player names.

SurgeryCommand.onTabComplete now returns no suggestions for non-player senders. Tests cover non-player senders and a player without permission.

Changes: Tab completion

Layer / File(s) Summary
Guard tab completion by sender
src/main/java/net/tfminecraft/surgery/commands/SurgeryCommand.java, src/test/java/net/tfminecraft/surgery/commands/SurgeryCommandTest.java
The command returns no suggestions for non-player senders. Tests check non-player senders and confirm that a player without permission receives matching subcommand suggestions.

Priority: ⬇️ Low

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

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to b298a

Non-player senders receive no suggestions, matching the command’s player-only behavior; player suggestions preserve the distinction between consent actions and surgeon-only offers. No material merge risk remains.

- [ ] 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 77ce2bf 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