Skip to content

#273 Fix tournament match submission for byes#316

Merged
ianpaschal merged 2 commits intomainfrom
273-fix-tournament-match-submission-for-byes
Mar 21, 2026
Merged

#273 Fix tournament match submission for byes#316
ianpaschal merged 2 commits intomainfrom
273-fix-tournament-match-submission-for-byes

Conversation

@ianpaschal
Copy link
Copy Markdown
Owner

@ianpaschal ianpaschal commented Mar 21, 2026

Resolves: #273


Summary by CodeRabbit

  • New Features

    • Tournament player fields now display "Bye" status distinctly for bye competitors.
    • Enhanced player selection UI with automatic dropdown or text input based on available options.
  • Bug Fixes

    • Corrected registration lookup logic for player faction auto-population.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
combat-command Ready Ready Preview, Comment Mar 21, 2026 10:56am

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 21, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 67d83a70-bdb7-4f3a-88a8-66a89c6a45fc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

The TournamentPlayerFields component was updated to handle bye competitors. Each player slot now conditionally renders as either a disabled "Bye" field (when the competitor is null) or a userId select with fallback to a text input (when not a bye). The component refactored its watched fields and memoized player options computations separately for each player. Form auto-setting behavior was extended to set "Bye" placeholders when applicable, and the Player 1 registration lookup was changed to reference Player 0's userId instead. The component's public interface remained unchanged.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete and lacks substantive detail about the changes, rationale, and implementation beyond the issue reference. Expand the description to explain what the bug was, why the fix is necessary, and summarize the key changes made to handle byes correctly.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: fixing tournament match submission for byes in the TournamentPlayerFields component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 273-fix-tournament-match-submission-for-byes

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 and usage tips.

Tip

CodeRabbit can suggest fixes for GitHub Check annotations.

Configure the reviews.tools.github-checks setting to adjust the time to wait for GitHub Checks to complete.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@src/components/MatchResultForm/components/TournamentPlayerFields/TournamentPlayerFields.tsx`:
- Around line 66-68: player1Registration is looking up the wrong user id: in
TournamentPlayerFields change the useMemo that defines player1Registration so it
finds a registration by r.userId === player1UserId (not player0UserId) and
update its dependency array to include player1UserId; this ensures the faction
auto-fill effect that reads player1Registration uses the correct player2 user id
from selectedPairing.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 03b166b7-e4c7-42f1-a919-0e42a2bc6c41

📥 Commits

Reviewing files that changed from the base of the PR and between 785fe33 and f685c38.

📒 Files selected for processing (1)
  • src/components/MatchResultForm/components/TournamentPlayerFields/TournamentPlayerFields.tsx

…ds/TournamentPlayerFields.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@ianpaschal ianpaschal merged commit 18fd560 into main Mar 21, 2026
3 checks passed
@ianpaschal ianpaschal deleted the 273-fix-tournament-match-submission-for-byes branch March 21, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant