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

  • MB-01: Trade IDs are prefix-filtered without losing their spelling; console completes reload only, while editing actions are player-only.
  • MB-02: Trade IDs are prefix-filtered without losing their spelling; console completes reload only, while editing actions are player-only.

Validation: tfmc-mvn -o -B --no-transfer-progress clean verify passed (147 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: 8e15c0fa-a7ba-4731-8d64-8fdbcbfcc3a2
📥 Commits

Reviewing files that changed from the base of the PR and between 3c9dc68 and c84270a.

📒 Files selected for processing: 2
  • src/main/java/net/tfminecraft/marketblock/manager/commands/TabCompletion.java
  • src/test/java/net/tfminecraft/marketblock/manager/MarketCommandsTest.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

  • New Features
    • Command suggestions now match typed prefixes without regard to letter case.
    • Players receive trade ID suggestions for delete and reset commands, filtered to match the text already entered. Unknown prefixes return no trade ID suggestions.
    • Non-player senders are offered only the reload subcommand. Players continue to see the available subcommands, subject to existing command and permission checks.

Tab completion now restricts first-argument suggestions for non-player senders and filters player trade ID suggestions by command and case-insensitive prefix. The updated test covers these rules and permission checks.

Changes: Tab completion

Layer / File(s) Summary
Completion rules and validation
src/main/java/net/tfminecraft/marketblock/manager/commands/TabCompletion.java, src/test/java/net/tfminecraft/marketblock/manager/MarketCommandsTest.java
First-argument matching uses Locale.ROOT. Non-player senders receive only reload. Players using delete or reset receive trade IDs that match the typed prefix. Tests cover sender types, prefix matching, and permission checks.

Priority: ⬇️ Low

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to c8427

No issue requiring a change before merge was identified in the supplied completion changes. Normal checks remain appropriate.

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