fix: update tiebreak scheme label from "Reps" to "Rep/Weight" with "higher is better" subtitle#382
fix: update tiebreak scheme label from "Reps" to "Rep/Weight" with "higher is better" subtitle#382zacjones93 wants to merge 2 commits intomainfrom
Conversation
…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
WalkthroughThe 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (3)
apps/wodsmith-start/src/components/organizer/schedule/workout-preview.tsxapps/wodsmith-start/src/constants.tsapps/wodsmith-start/src/routes/compete/$slug/-components/event-section.tsx
🚀 Preview DeployedURL: https://wodsmith-app-pr-382.zacjones93.workers.dev
This comment is automatically updated on each push to this PR. |
There was a problem hiding this comment.
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.
…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>
There was a problem hiding this comment.
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"}) |
There was a problem hiding this comment.
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>
| <Label htmlFor="tiebreak-input"> | ||
| Tiebreak ( | ||
| {workoutDetails.tiebreakScheme === "time" ? "Time" : "Reps"}) | ||
| {workoutDetails.tiebreakScheme === "time" ? "Time" : "Rep/Weight"}) |
There was a problem hiding this comment.
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>
| {workoutDetails.tiebreakScheme === "time" ? "Time" : "Rep/Weight"}) | |
| {workoutDetails.tiebreakScheme === "time" ? "Time" : "Reps"}) |
| eventId={event.id} | ||
| slug={slug} | ||
| trackOrder={event.trackOrder} | ||
| trackOrder={index + 1} |
There was a problem hiding this comment.
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>
| trackOrder={index + 1} | |
| trackOrder={event.trackOrder} |
| eventId={event.id} | ||
| slug={slug} | ||
| trackOrder={event.trackOrder} | ||
| trackOrder={index + 1} |
There was a problem hiding this comment.
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>
| trackOrder={index + 1} | |
| trackOrder={event.trackOrder} |
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_SCHEMESsorepsmaps to "Rep/Weight".Written for commit b938e03. Summary will update on new commits.
Summary by CodeRabbit