Skip to content

feat: #115 Hide match result battle plans#116

Merged
ianpaschal merged 1 commit intodevelopfrom
feat-115-hide-match-result-battle-plans
Jul 15, 2025
Merged

feat: #115 Hide match result battle plans#116
ianpaschal merged 1 commit intodevelopfrom
feat-115-hide-match-result-battle-plans

Conversation

@ianpaschal
Copy link
Owner

@ianpaschal ianpaschal commented Jul 15, 2025

Summary by CodeRabbit

  • New Features

    • Battle plans in match results are now visible only to authorized users, such as tournament organizers or players, depending on tournament and pairing status.
  • Improvements

    • Match results are now consistently displayed in descending order across all relevant views.
    • Enhanced match result scoring and stats extraction to support additional input types.
  • Bug Fixes

    • Corrected wording in match outcome messages for clarity.
  • Chores

    • Removed unused or redundant components and styles from the match result details page.

@vercel
Copy link

vercel bot commented Jul 15, 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 15, 2025 5:23pm

@coderabbitai
Copy link

coderabbitai bot commented Jul 15, 2025

Walkthrough

The changes expand support for handling both Doc<'matchResults'> and DeepMatchResult types in key scoring and stats extraction functions. A new helper for determining battle plan visibility is introduced and integrated into match result deepening logic. Several queries now explicitly order results in descending order. The MatchResultDetails React component and its associated SCSS and utility files are removed, with minor wording updates elsewhere.

Changes

Files/Groups Change Summary
convex/_model/fowV4/calculateFowV4MatchResultScore.ts
convex/_model/fowV4/extractFowV4MatchResultBaseStats.ts
Updated function signatures to accept both Doc<'matchResults'> and DeepMatchResult as input types.
convex/_model/matchResults/_helpers/checkMatchResultBattlePlanVisibility.ts Added new function to determine battle plan visibility for a match result.
convex/_model/matchResults/_helpers/deepenMatchResult.ts Integrated battle plan visibility check; battle plans are conditionally included in the returned object.
convex/_model/matchResults/queries/getMatchResults.ts
convex/_model/matchResults/queries/getMatchResultsByTournament.ts
convex/_model/matchResults/queries/getMatchResultsByTournamentPairing.ts
convex/_model/matchResults/queries/getMatchResultsByTournamentRound.ts
Modified queries to explicitly order match results in descending order.
src/components/FowV4MatchResultDetails/FowV4MatchResultDetails.utils.ts Updated outcome formatting string to use singular "formation" instead of "formation(s)".
src/pages/MatchResultDetailPage/components/MatchResultDetails.module.scss Deleted the SCSS module file and all its style class declarations.
src/pages/MatchResultDetailPage/components/MatchResultDetails.tsx Deleted the MatchResultDetails React component and its props interface.
src/pages/MatchResultDetailPage/components/MatchResultDetails.utils.ts Deleted the formatOutcome utility function for formatting match outcomes.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Free

📥 Commits

Reviewing files that changed from the base of the PR and between 6999f46 and 0d20b63.

⛔ Files ignored due to path filters (1)
  • convex/_generated/api.d.ts is excluded by !**/_generated/**
📒 Files selected for processing (12)
  • convex/_model/fowV4/calculateFowV4MatchResultScore.ts (2 hunks)
  • convex/_model/fowV4/extractFowV4MatchResultBaseStats.ts (2 hunks)
  • convex/_model/matchResults/_helpers/checkMatchResultBattlePlanVisibility.ts (1 hunks)
  • convex/_model/matchResults/_helpers/deepenMatchResult.ts (2 hunks)
  • convex/_model/matchResults/queries/getMatchResults.ts (1 hunks)
  • convex/_model/matchResults/queries/getMatchResultsByTournament.ts (1 hunks)
  • convex/_model/matchResults/queries/getMatchResultsByTournamentPairing.ts (1 hunks)
  • convex/_model/matchResults/queries/getMatchResultsByTournamentRound.ts (1 hunks)
  • src/components/FowV4MatchResultDetails/FowV4MatchResultDetails.utils.ts (1 hunks)
  • src/pages/MatchResultDetailPage/components/MatchResultDetails.module.scss (0 hunks)
  • src/pages/MatchResultDetailPage/components/MatchResultDetails.tsx (0 hunks)
  • src/pages/MatchResultDetailPage/components/MatchResultDetails.utils.ts (0 hunks)
💤 Files with no reviewable changes (3)
  • src/pages/MatchResultDetailPage/components/MatchResultDetails.module.scss
  • src/pages/MatchResultDetailPage/components/MatchResultDetails.utils.ts
  • src/pages/MatchResultDetailPage/components/MatchResultDetails.tsx

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 ianpaschal merged commit 8bf4fbc into develop Jul 15, 2025
4 checks passed
@ianpaschal ianpaschal deleted the feat-115-hide-match-result-battle-plans branch July 15, 2025 17:51
ianpaschal added a commit that referenced this pull request Jul 18, 2025
* Update update-project-status.yml

* Update updateProjectStatus.js

* fix: Toast text does not wrap (#87)

* fix: #86 Sanitize sign in/sign up inputs (#91)

* feat: #32 Auto generate avatars & refactor users (#90)

* feat: Improve <TournamentDetailPage/> default tab

* feat: Improve <TournamentCard/> styling

* Update mockData.ts

* feat: #94 Improve <AccordionItem/> disabled state (#97)

* feat: #95 Hide completed pairings from match check-in (#96)

* bug: #93 Preserve <TournamentPairingsGrid/> internal state (#98)

* feat: #101 Add player count to roster (#103)

* feat: Show full player names when tournaments require it

* feat: Add activePlayerCount to deep tournaments

* feat: Sort tournament competitors by name

* task: #100 Clean-up .card mixin (#102)

* feat: #99 Improve tournament competitor edit dialog (#104)

* feat: #106 Improve signIn error handling (#107)

* Update convex/_model/tournamentCompetitors/queries/getTournamentCompetitorsByTournament.ts

* Update convex/_model/users/_helpers/checkUserTournamentForcedName.ts

* feat: Hide players with 0 matches from rankings

* feat: #112 Add more mercenary team options (#113)

* feat: #110 Add manual table assignments (#111)

* fix: Ensure round 0 rankings can be included

* Refactor tournament actions (#114)

* refactor: Improve tournament actions

* chore: Clean-up Convex errors

* fix: Do not try to clean up current round timer on tournament end

* fix: Don't allow players to be removed from tournament

* chore: Update test tournament banner image

* Update TournamentCard.tsx

* fix: Ensure round 0 rankings can be included

* fix: Fix end tournament round context menu behavior

* chore: Improve mock match result creation

* feat: Allow matchResult.playedAt to be date string or number

* feat: #115 Hide match result battle plans (#116)

* feat: Set page title based on <PageWrapper/> title prop

* fix: Use <IdentityBadge/> to fix player name spacing on match results

* fix: Correctly include match results relevant to a tournament
ianpaschal added a commit that referenced this pull request Jul 24, 2025
* Update update-project-status.yml

* Update updateProjectStatus.js

* fix: Toast text does not wrap (#87)

* fix: Sanitize sign in/sign up inputs (#91)

#86

* feat: #32 Auto generate avatars & refactor users (#90)

* feat: Improve <TournamentDetailPage/> default tab

* feat: Improve <TournamentCard/> styling

* Update mockData.ts

* feat: Improve <AccordionItem/> disabled state (#97)

#94

* feat: Hide completed pairings from match check-in (#96)

#95

* bug: Preserve <TournamentPairingsGrid/> internal state (#98)

#93

* feat: #101 Add player count to roster (#103)

* feat: Show full player names when tournaments require it

* feat: Add activePlayerCount to deep tournaments

* feat: Sort tournament competitors by name

* task: Clean-up .card mixin (#102)

#100

* feat: #99 Improve tournament competitor edit dialog (#104)

* feat: #106 Improve signIn error handling (#107)

* Update convex/_model/tournamentCompetitors/queries/getTournamentCompetitorsByTournament.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update convex/_model/users/_helpers/checkUserTournamentForcedName.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat: Hide players with 0 matches from rankings

* feat: #112 Add more mercenary team options (#113)

* feat: #110 Add manual table assignments (#111)

* fix: Ensure round 0 rankings can be included

* Refactor tournament actions (#114)

* refactor: Improve tournament actions

* chore: Clean-up Convex errors

* fix: Do not try to clean up current round timer on tournament end

* fix: Don't allow players to be removed from tournament

* chore: Update test tournament banner image

* Update TournamentCard.tsx

* fix: Ensure round 0 rankings can be included

* fix: Fix end tournament round context menu behavior

* chore: Improve mock match result creation

* feat: Allow matchResult.playedAt to be date string or number

* feat: #115 Hide match result battle plans (#116)

* feat: Set page title based on <PageWrapper/> title prop

* fix: Use <IdentityBadge/> to fix player name spacing on match results

* fix: Correctly include match results relevant to a tournament

* feat: #57 Implement basic dashboard (#119)

* fix: Remove double border on dashboard sections

* fix: Add key to dashboard tournaments

* feat: Improve <TournamentPairingRow/> styling

* fix: Remove extraneous error message

* fix: Improve <Form/> isDirty calculation

* fix: Render all competitors in <TournamentCompetitorForm/>

* fix: Also show empty state if rankings are empty

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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