Repository navigation
Add set-based scoring support for matches - #43
Merged
davidohnee merged 8 commits intoOct 26, 2025
Merged
Conversation
Deploying bracketeer with
|
| Latest commit: |
d699774
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f1407b03.bracketeer-3cf.pages.dev |
| Branch Preview URL: | https://copilot-fix-6b9ef98d-23e4-45.bracketeer-3cf.pages.dev |
Co-authored-by: davidohnee <48208462+davidohnee@users.noreply.github.com>
Co-authored-by: davidohnee <48208462+davidohnee@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Match: support sets
Add set-based scoring support for matches
Oct 4, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements set-based scoring for matches, enabling tournaments to track individual set scores (e.g., 6-4, 7-5) with automatic match score calculation based on sets won.
Key Changes:
- Added type system support for set scores with
SetScoretype andsetsarray on theMatchinterface - Implemented automatic score calculation that counts sets won by each team
- Created UI for managing set scores in the match editor with add/remove functionality and manual override warnings
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types/tournament.ts | Added SetScore type and optional sets array to Match interface, plus useSets flag in tournament config |
| src/helpers/scoring.ts | Implemented calculateScoresFromSets() function to compute match scores from set wins |
| src/helpers/defaults.ts | Restructured sport defaults with courtLabel as nested object and added sets configuration with supported and default flags |
| src/views/Create/BasicsView.vue | Added checkbox UI for enabling set-based scoring when creating tournaments, with computed property to check sport support |
| src/components/modals/MatchEditorModal.vue | Added sets management UI with add/remove buttons, score inputs, sync functionality, and out-of-sync detection |
| src/assets/css/dialogs.css | Added max-height: 80vh constraint to dialogs and increased close button font size |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
davidohnee
force-pushed
the
copilot/fix-6b9ef98d-23e4-4543-913c-fcb334ab9e68
branch
from
October 26, 2025 16:28
5083a1e to
b5be4a8
Compare
davidohnee
force-pushed
the
copilot/fix-6b9ef98d-23e4-4543-913c-fcb334ab9e68
branch
from
October 26, 2025 16:31
b5be4a8 to
db0b6fe
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
davidohnee
marked this pull request as ready for review
October 26, 2025 16:37
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
davidohnee
requested changes
Oct 26, 2025
davidohnee
self-requested a review
October 26, 2025 18:27
davidohnee
approved these changes
Oct 26, 2025
davidohnee
deleted the
copilot/fix-6b9ef98d-23e4-4543-913c-fcb334ab9e68
branch
October 26, 2025 18:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements set-based scoring for matches, enabling tournaments to track individual set scores (e.g., 6-4, 7-5 for tennis or volleyball) with automatic match score calculation.
Overview
The feature allows tournament organizers to:
Implementation Details
Type System
Added new types to support set-based scoring:
SetScoretype for individual set scores (team1 vs team2)setsarray onMatchinterface to store set scoresmanualScoreOverrideflag to track when scores don't match setsuseSetsflag in tournament config to enable the featureSport Configuration
Extended sport defaults with
supportsSetsflag. Currently enabled for the "Other" sport type, but can easily be extended to tennis, volleyball, and other set-based sports.Score Calculation
Implemented
calculateScoresFromSets()helper function that counts the number of sets won by each team. The match score automatically updates as set scores are entered.User Interface
Tournament Creation:
When selecting a sport that supports sets, a checkbox appears to enable set-based scoring with helpful descriptive text.
Match Editor - Sets Section:
Added a dedicated "Sets" section in the match editor modal with:
Automatic Score Calculation:
As users enter set scores, the main match score automatically updates. In this example, Team 16 won the first set 6-4, so their match score shows 1:
Manual Override Warning:
If users manually change the match score to differ from the sets, a warning banner appears with a "Sync with sets" button to restore automatic calculation:
Example Usage
Code Quality
Fixes #6
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.