Skip to content

Conversation

@ianpaschal
Copy link
Owner

@ianpaschal ianpaschal commented Jul 25, 2025

Summary by CodeRabbit

  • New Features

    • Introduced a Tournament Pairing Detail page, accessible via a new route, displaying detailed information and match results for a specific pairing.
    • Added navigation buttons to tournament pairing tables for quick access to pairing details.
  • Improvements

    • Enhanced match result forms to accept full match result objects, simplifying data flow and initialization.
    • Updated context menu logic to restrict editing of tournament results to organizers only.
    • Improved layout responsiveness and styling for the Dashboard and Active Tournament sections.
    • Refined type safety and prop structures in several components for better maintainability.
  • Bug Fixes

    • Fixed conditional rendering and loading states in player selection fields and forms.
  • Chores

    • Updated type exports and documentation for better clarity and consistency.
    • Added and restructured SCSS modules for new and existing pages.

@vercel
Copy link

vercel bot commented Jul 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
combat-command ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 26, 2025 5:56am

@coderabbitai
Copy link

coderabbitai bot commented Jul 25, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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.

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

Walkthrough

This update introduces a new Tournament Pairing Detail Page, including its route, layout, and supporting styles. Several components are refactored for improved data flow and type safety, particularly around match result forms and dialogs. Additional UI and logic adjustments are made for tournament pairing navigation, match result context menus, and dashboard layout responsiveness. Minor style and documentation corrections are also included.

Changes

Files / Areas Change Summary
convex/_model/fowV4/calculateFowV4MatchResultScore.ts Function signature narrowed to accept only Doc<'matchResults'>; removed DeepMatchResult union and related import.
convex/_model/matchResults/_helpers/deepenMatchResult.ts Added FowV4-specific score calculation; now includes player0Score and player1Score in returned details.
convex/_model/tournamentPairings/_helpers/deepenTournamentPairing.ts JSDoc parameter name updated for accuracy; no logic changes.
src/components/FowV4MatchResultDetails/FowV4MatchResultDetails.types.ts FowV4MatchResultDetailsData type updated to omit missionName, player0Score, and player1Score from details.
src/components/FowV4MatchResultForm/FowV4MatchResultForm.tsx Refactored to accept matchResult object instead of matchResultId; removed internal fetching; updated form initialization and conditional rendering.
src/components/FowV4MatchResultForm/components/CommonFields.hooks.ts Removed handling of experimental missions; simplified mission ID aggregation logic.
src/components/FowV4MatchResultForm/components/TournamentPlayersFields.tsx Replaced useMemo with direct calls for player options; added loading placeholder when pairing data is unavailable.
src/components/IdentityBadge/index.ts Expanded type exports to include IdentityBadgePlaceholder.
src/components/MatchResultContextMenu/MatchResultContextMenu.tsx Added logic to allow only organizers to edit tournament results; improved user role checks using tournament data.
src/components/MatchResultCreateDialog/MatchResultCreateDialog.hooks.tsx useModal now typed to expect { tournamentPairingId: TournamentPairingId } payload for type safety.
src/components/MatchResultCreateDialog/MatchResultCreateDialog.tsx Component now accepts optional tournamentPairingId prop; uses prop or modal data for form; updated prop interface.
src/components/MatchResultEditDialog/MatchResultEditDialog.tsx Passes entire matchResult object to form instead of just the ID.
src/pages/DashboardPage/DashboardPage.tsx fitToWindow prop for PageWrapper now set conditionally based on screen size (isDesktop).
src/pages/DashboardPage/components/ActiveTournament/ActiveTournament.module.scss CSS grid layout for opponent section restructured; check-in button moved to new row; added margin for spacing.
src/pages/DashboardPage/components/ActiveTournament/ActiveTournament.tsx Updated CSS class names from ActiveTournamentCard_ to ActiveTournament_.
src/pages/TournamentDetailPage/components/TournamentPairingsCard/TournamentPairingsCard.tsx Added navigation capability to table config by passing navigate function.
src/pages/TournamentDetailPage/components/TournamentPairingsCard/TournamentPairingsCard.utils.tsx getTournamentPairingTableConfig now takes navigate function; added "view pairing" column with navigation button.
src/pages/TournamentPairingDetailPage/TournamentPairingDetailPage.module.scss New SCSS module for pairing detail page; sets up grid layout and card styling.
src/pages/TournamentPairingDetailPage/TournamentPairingDetailPage.tsx New React component for tournament pairing details; fetches data, determines user role, conditionally renders match results and creation dialog.
src/pages/TournamentPairingDetailPage/index.ts New export for TournamentPairingDetailPage component.
src/routes.tsx Added new route for pairing detail page using PATHS.tournamentPairingDetails.
src/settings.ts Added tournamentPairingDetails: '/pairings/:id' to PATHS export.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~18 minutes

  • Complexity: The update introduces a new page with supporting logic and styles, refactors several forms and dialogs for improved data flow and type safety, and makes targeted UI/UX adjustments. The changes span multiple files but are well-scoped and mostly additive or refactor-oriented.
  • Review time: Estimated at 18 minutes, covering new component logic, type changes, and ensuring data flow correctness across related components and routes.

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Join our Discord community for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ianpaschal
Copy link
Owner Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Jul 25, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ianpaschal ianpaschal merged commit 3f93d77 into develop Jul 26, 2025
3 checks passed
@ianpaschal ianpaschal deleted the etc-improvements-day-2 branch July 26, 2025 06:40
ianpaschal added a commit that referenced this pull request Jul 26, 2025
* ETC improvements day 2 (#127)

* feat: Add tournament pairing detail page

* feat: Add score to match results

* feat: Improve match result editing and creation for tournaments

* fix: Improve dashboard styling

* feat: Improve match result editing and creation for tournaments (pt2)
ianpaschal added a commit that referenced this pull request Sep 5, 2025
* feat: Add tournament pairing detail page

* feat: Add score to match results

* feat: Improve match result editing and creation for tournaments

* fix: Improve dashboard styling

* feat: Improve match result editing and creation for tournaments (pt2)
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.

2 participants