Skip to content

fix: correct command tab completion - #37

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

  • INTERACTIBLEFURNITURE-01: Console completion offers reload only when permitted; nested and debug actions and descendants are player-only.

Validation: tfmc-mvn -o -B --no-transfer-progress clean verify passed (303 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: 7e535526-ab88-4736-bd6b-5a5371d6f1fa
📥 Commits

Reviewing files that changed from the base of the PR and between 8e105ef and ce71381.

📒 Files selected for processing: 2
  • src/main/java/net/tfminecraft/interactiblefurniture/command/IfCommand.java
  • src/test/java/net/tfminecraft/interactiblefurniture/command/IfCommandCoverageTest.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
    • Restricted nested and debug command suggestions to players with the relevant permissions.
    • Console senders can still receive permitted reload suggestions but no longer receive player-only subcommand suggestions.
  • Tests
    • Added coverage for console tab-completion behaviour with and without reload permission.

Tab completion now restricts nested and debug suggestions based on sender type and permissions. A console test checks reload suggestions and confirms that nested and debug suggestions are not returned.

Changes: Tab completion

Layer / File(s) Summary
Filter suggestions by sender and permission
src/main/java/net/tfminecraft/interactiblefurniture/command/IfCommand.java, src/test/java/net/tfminecraft/interactiblefurniture/command/IfCommandCoverageTest.java
nested suggestions require a player with reload permission. debug suggestions require a player with debug permission. Non-player senders receive no suggestions for subsequent arguments. Tests check console suggestions for reload, nested, and debug.

Priority: ⬇️ Low

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to ce713

Suggestions follow the command’s sender and permission rules, and tests cover representative prefixes. No concrete merge-blocking behavior is established.

- [ ] 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 ba6aaf1 into main Oct 15, 2026
4 checks passed
@ryanbarlow97
ryanbarlow97 deleted the fix/command-tab-completion-20261015 branch October 15, 2026 18:50
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