Skip to content

fix: correct command tab completion - #43

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

  • CP-01: Owner completion verifies directory identity and uses unique executable single-token names or character UUIDs for multiword, duplicate or reserved names. Unresolved owners are omitted. Online create targets require current living identity; account aliases that collide with duplicate names use UUIDs. Executor parsing semantics are preserved.
  • CP-02: The executable list unassigned keyword appears only in list argument two, with permission and prefix filtering, without colliding with a character literally named unassigned.

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

The three skips are unchanged opt-in deployed-config comparisons requiring local configuration properties; all 46 focused completion/ownership/lifecycle regressions passed with zero skips.

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: b44b0193-8ca3-4ceb-85cd-3bc8ad0e64c9
📥 Commits

Reviewing files that changed from the base of the PR and between 56bd4d7 and 49d51f9.

📒 Files selected for processing: 2
  • src/main/java/net/tfminecraft/companionpets/staff/StaffCommands.java
  • src/test/java/net/tfminecraft/companionpets/staff/StaffCommandsTest.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
    • Owner suggestions now use character names only when they uniquely identify the character; ambiguous or unsuitable names are shown as UUIDs instead.
    • Creation suggestions exclude dead characters and names that cannot be reliably matched to an owner.
    • Added unassigned as a completion option when listing owners.

Staff owner completion now uses validated character names or UUIDs. Create suggestions also check online character sessions and exclude dead characters. List completion includes unassigned; find and create completion do not.

Changes: Staff owner completion

Layer / File(s) Summary
Validate owner candidates
src/main/java/net/tfminecraft/companionpets/staff/StaffCommands.java, src/test/java/net/tfminecraft/companionpets/staff/StaffCommandsTest.java
Owner suggestions use a character name only when it resolves uniquely to the same identity and meets the name restrictions; otherwise, they use the UUID. Create suggestions also validate eligible online character sessions. Tests cover duplicate and multi-word names, dead characters, UUID resolution, and unassigned completion for list commands.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: nowkoo

Merge Risk: ⚪ Minimal · up to 49d51

This change adjusts command tab completion for owner names and the unassigned keyword. It does not alter command execution, and no merge-blocking risk was found.

- [ ] 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:S 10-29 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 d97b238 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