Skip to content

fix: update tiebreak scheme label from "Reps" to "Rep/Weight" with "higher is better" subtitle#382

Open
zacjones93 wants to merge 2 commits intomainfrom
claude/update-tiebreak-rep-weight-yI4dH
Open

fix: update tiebreak scheme label from "Reps" to "Rep/Weight" with "higher is better" subtitle#382
zacjones93 wants to merge 2 commits intomainfrom
claude/update-tiebreak-rep-weight-yI4dH

Conversation

@zacjones93
Copy link
Copy Markdown
Contributor

@zacjones93 zacjones93 commented Apr 11, 2026

Updates the tiebreak scheme display on both the compete public route and
organizer schedule route to show "Rep/Weight" instead of "reps", with a
"higher is better" note underneath.

https://claude.ai/code/session_016e3hj432inedpjV2oRgGsG


Summary by cubic

Renamed the tiebreak label to "Rep/Weight" and added a "higher/lower is better" hint based on scheme across compete and organizer views (forms, event badges, schedule). The compete overview now filters workouts by the registered athlete’s division (including child events) and numbers them sequentially; also updated TIEBREAK_SCHEMES so reps maps to "Rep/Weight".

Written for commit b938e03. Summary will update on new commits.

Summary by CodeRabbit

  • New Features
    • Updated tiebreak scheme labeling: "Reps" now displays as "Rep/Weight" for enhanced clarity
    • Added "higher is better" indicator beneath tiebreak displays across the interface

…igher is better" subtitle

Updates the tiebreak scheme display on both the compete public route and
organizer schedule route to show "Rep/Weight" instead of "reps", with a
"higher is better" note underneath.

https://claude.ai/code/session_016e3hj432inedpjV2oRgGsG
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 11, 2026

Walkthrough

The changes standardize the UI labeling for the "reps" tiebreak scheme from "Reps" to "Rep/Weight" across the application and add clarifying text "higher is better" to two UI components that display tiebreak information.

Changes

Cohort / File(s) Summary
Tiebreak Scheme Label Definition
apps/wodsmith-start/src/constants.ts
Updated the TIEBREAK_SCHEMES constant to rename the "reps" scheme label from "Reps" to "Rep/Weight".
Tiebreak UI Component Rendering
apps/wodsmith-start/src/components/organizer/schedule/workout-preview.tsx, apps/wodsmith-start/src/routes/compete/$slug/-components/event-section.tsx
Added conditional label mapping for "reps" tiebreak scheme to display as "Rep/Weight" and appended a secondary muted sub-label indicating "higher is better" beneath the tiebreak display.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 Hops through code with glee,
Reps now wear finery—
"Rep/Weight" shines clear,
Higher always dear,
Labels bloom, consistency!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: updating a tiebreak scheme label and adding a subtitle, which aligns with all three modified files.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/update-tiebreak-rep-weight-yI4dH

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.

Copy link
Copy Markdown
Contributor

@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: 2

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

Inline comments:
In `@apps/wodsmith-start/src/components/organizer/schedule/workout-preview.tsx`:
- Around line 96-99: The "higher is better" label is hardcoded in
workout-preview.tsx and should be conditional; update the block that renders
Tiebreak (the div using workout.tiebreakScheme) to display the direction based
on the workout's tiebreakDirection if available (e.g., show "higher is better"
when workout.tiebreakDirection === "higher" else "lower is better"), and if
tiebreakDirection is not present fall back to scheme-based logic (e.g., treat
workout.tiebreakScheme === "time" as "lower is better", otherwise "higher is
better"). Ensure you only change the small rendering logic around
workout.tiebreakScheme in WorkoutPreview.

In `@apps/wodsmith-start/src/routes/compete/`$slug/-components/event-section.tsx:
- Around line 360-363: The tiebreak direction text is hardcoded to "higher is
better"; update the JSX that renders the tiebreak info (the span that references
workout.tiebreakScheme) to conditionally show the correct hint based on
workout.tiebreakScheme (e.g., show "lower is better" when workout.tiebreakScheme
=== "time" and "higher is better" for reps/weight), keeping the existing display
for the label (Tiebreak: ...) and the nested block span for the hint so behavior
changes only the hint text.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b3e215f7-f123-4d9a-b719-e9e1b857cbd3

📥 Commits

Reviewing files that changed from the base of the PR and between 590f0bb and aab2a67.

📒 Files selected for processing (3)
  • apps/wodsmith-start/src/components/organizer/schedule/workout-preview.tsx
  • apps/wodsmith-start/src/constants.ts
  • apps/wodsmith-start/src/routes/compete/$slug/-components/event-section.tsx

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 11, 2026

🚀 Preview Deployed

URL: https://wodsmith-app-pr-382.zacjones93.workers.dev

Detail Value
Commit 7a9656e
Stage pr-382
Deployed 2026-04-11T02:06:08.318Z

This comment is automatically updated on each push to this PR.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 3 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/wodsmith-start/src/routes/compete/$slug/-components/event-section.tsx">

<violation number="1" location="apps/wodsmith-start/src/routes/compete/$slug/-components/event-section.tsx:362">
P2: Make the tiebreak guidance conditional on the scheme. Time tiebreaks are lower-is-better, so the new subtitle is incorrect for those workouts.</violation>
</file>

<file name="apps/wodsmith-start/src/components/organizer/schedule/workout-preview.tsx">

<violation number="1" location="apps/wodsmith-start/src/components/organizer/schedule/workout-preview.tsx:98">
P2: Make the tiebreak hint conditional on the scheme. `time` tie-breaks are lower-is-better, so the new subtitle is incorrect for those workouts.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread apps/wodsmith-start/src/routes/compete/$slug/-components/event-section.tsx Outdated
Comment thread apps/wodsmith-start/src/components/organizer/schedule/workout-preview.tsx Outdated
…orkouts by division mappings

- Rename tiebreak "Reps" label to "Rep/Weight" across all UI surfaces
- Make "higher/lower is better" subtitle conditional on tiebreak scheme
- Filter overview page workouts by event-division mappings for registered athlete
- Use sequential numbering after filtering so indexes don't skip

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

4 issues found across 8 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/wodsmith-start/src/components/compete/video-submission-form.tsx">

<violation number="1" location="apps/wodsmith-start/src/components/compete/video-submission-form.tsx:1055">
P2: The new `Rep/Weight` label is inconsistent with the unchanged helper copy below, which still describes reps-only input.</violation>
</file>

<file name="apps/wodsmith-start/src/components/compete/athlete-score-submission.tsx">

<violation number="1" location="apps/wodsmith-start/src/components/compete/athlete-score-submission.tsx:411">
P2: `Rep/Weight` is misleading here because non-time tiebreaks are still parsed as integer `reps`, not load values. That can silently mis-score decimal weight tie-break entries.</violation>
</file>

<file name="apps/wodsmith-start/src/routes/compete/$slug/index.tsx">

<violation number="1" location="apps/wodsmith-start/src/routes/compete/$slug/index.tsx:213">
P2: Use the event's stored `trackOrder` here; recomputing it from the filtered list renumbers workouts and makes the card number disagree with the event detail page.</violation>
</file>

<file name="apps/wodsmith-start/src/routes/compete/$slug/workouts/index.tsx">

<violation number="1" location="apps/wodsmith-start/src/routes/compete/$slug/workouts/index.tsx:451">
P2: Use the event's real `trackOrder` here; reindexing after division filtering makes the workout list disagree with event detail and schedule numbering.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

<Label htmlFor="tiebreak-input">
Tiebreak (
{workout.tiebreakScheme === "time" ? "Time" : "Reps"})
{workout.tiebreakScheme === "time" ? "Time" : "Rep/Weight"})
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Apr 11, 2026

Choose a reason for hiding this comment

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

P2: The new Rep/Weight label is inconsistent with the unchanged helper copy below, which still describes reps-only input.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/wodsmith-start/src/components/compete/video-submission-form.tsx, line 1055:

<comment>The new `Rep/Weight` label is inconsistent with the unchanged helper copy below, which still describes reps-only input.</comment>

<file context>
@@ -1052,7 +1052,7 @@ export function VideoSubmissionForm({
                   <Label htmlFor="tiebreak-input">
                     Tiebreak (
-                    {workout.tiebreakScheme === "time" ? "Time" : "Reps"})
+                    {workout.tiebreakScheme === "time" ? "Time" : "Rep/Weight"})
                   </Label>
                   <Input
</file context>
Fix with Cubic

<Label htmlFor="tiebreak-input">
Tiebreak (
{workoutDetails.tiebreakScheme === "time" ? "Time" : "Reps"})
{workoutDetails.tiebreakScheme === "time" ? "Time" : "Rep/Weight"})
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Apr 11, 2026

Choose a reason for hiding this comment

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

P2: Rep/Weight is misleading here because non-time tiebreaks are still parsed as integer reps, not load values. That can silently mis-score decimal weight tie-break entries.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/wodsmith-start/src/components/compete/athlete-score-submission.tsx, line 411:

<comment>`Rep/Weight` is misleading here because non-time tiebreaks are still parsed as integer `reps`, not load values. That can silently mis-score decimal weight tie-break entries.</comment>

<file context>
@@ -408,7 +408,7 @@ export function AthleteScoreSubmission({
                 <Label htmlFor="tiebreak-input">
                   Tiebreak (
-                  {workoutDetails.tiebreakScheme === "time" ? "Time" : "Reps"})
+                  {workoutDetails.tiebreakScheme === "time" ? "Time" : "Rep/Weight"})
                 </Label>
                 <Input
</file context>
Suggested change
{workoutDetails.tiebreakScheme === "time" ? "Time" : "Rep/Weight"})
{workoutDetails.tiebreakScheme === "time" ? "Time" : "Reps"})
Fix with Cubic

eventId={event.id}
slug={slug}
trackOrder={event.trackOrder}
trackOrder={index + 1}
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Apr 11, 2026

Choose a reason for hiding this comment

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

P2: Use the event's stored trackOrder here; recomputing it from the filtered list renumbers workouts and makes the card number disagree with the event detail page.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/wodsmith-start/src/routes/compete/$slug/index.tsx, line 213:

<comment>Use the event's stored `trackOrder` here; recomputing it from the filtered list renumbers workouts and makes the card number disagree with the event detail page.</comment>

<file context>
@@ -157,19 +198,19 @@ function CompetitionOverviewPage() {
                           eventId={event.id}
                           slug={slug}
-                          trackOrder={event.trackOrder}
+                          trackOrder={index + 1}
                           name={event.workout.name}
                           scheme={event.workout.scheme}
</file context>
Suggested change
trackOrder={index + 1}
trackOrder={event.trackOrder}
Fix with Cubic

eventId={event.id}
slug={slug}
trackOrder={event.trackOrder}
trackOrder={index + 1}
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Apr 11, 2026

Choose a reason for hiding this comment

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

P2: Use the event's real trackOrder here; reindexing after division filtering makes the workout list disagree with event detail and schedule numbering.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/wodsmith-start/src/routes/compete/$slug/workouts/index.tsx, line 451:

<comment>Use the event's real `trackOrder` here; reindexing after division filtering makes the workout list disagree with event detail and schedule numbering.</comment>

<file context>
@@ -442,13 +442,13 @@ function WorkoutsList({
             eventId={event.id}
             slug={slug}
-            trackOrder={event.trackOrder}
+            trackOrder={index + 1}
             name={event.workout.name}
             scheme={event.workout.scheme}
</file context>
Suggested change
trackOrder={index + 1}
trackOrder={event.trackOrder}
Fix with Cubic

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