Skip to content

Hide score adjustments from leaderboard UI unless penalized#413

Open
zacjones93 wants to merge 1 commit intomainfrom
claude/leaderboard-penalty-warning-SehzH
Open

Hide score adjustments from leaderboard UI unless penalized#413
zacjones93 wants to merge 1 commit intomainfrom
claude/leaderboard-penalty-warning-SehzH

Conversation

@zacjones93
Copy link
Copy Markdown
Contributor

@zacjones93 zacjones93 commented Apr 19, 2026

Summary

Refactors the leaderboard penalty indicator logic to only display warnings for scores with Minor or Major penalties. Plain score adjustments (marked isDirectlyModified without a penaltyType) are now treated as routine data-entry corrections and no longer show warning badges or expanded notices to athletes.

Key Changes

  • PenaltyIndicator component: Changed condition from !result.penaltyType && !result.isDirectlyModified to !result.penaltyType alone, removing the "Score Adjusted" label and popover detail
  • Expanded row filtering: Removed r.isDirectlyModified from all conditions that determine which results show expandable content, so only penalty-bearing scores trigger the expanded view
  • Mobile leaderboard: Removed the "Score adjusted by organizer" notice from the collapsible result details
  • Test updates: Updated test expectations to verify that directly-modified scores without penalties no longer display any indicator or popover
  • Documentation: Added clarification to domain.md explaining that plain adjustments are intentionally hidden to avoid alarming athletes with routine fixes

Implementation Details

  • Both competition-leaderboard-table.tsx and online-competition-leaderboard-table.tsx were updated consistently
  • The aria-label attribute was added to the online table's PenaltyIndicator for accessibility
  • Popover detail text changed from "This score was modified by an organizer" to "A penalty was applied to this score" to reflect the new semantics
  • All filtering logic now uses a single condition: r.videoUrl || r.penaltyType (removing the third r.isDirectlyModified clause)

https://claude.ai/code/session_017n7WQe67Crk3vgyLMQck9j


Summary by cubic

Hide score adjustment warnings unless a Minor or Major penalty is present. Plain organizer adjustments no longer show badges, popovers, or expanded notices.

  • Bug Fixes
    • PenaltyIndicator now renders only when penaltyType is set; removes the "Score Adjusted" label and popover.
    • Expanded rows and mobile details gate on videoUrl or penaltyType (removed isDirectlyModified from conditions).
    • Added aria-label to the online table indicator and updated copy to "A penalty was applied to this score."
    • Updated tests and domain.md to reflect the new behavior.

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

The public leaderboard previously rendered a warning icon for any score
with either a minor/major penalty or a plain organizer adjustment. Plain
adjustments typically correct data-entry issues and a warning icon next
to those scores reads as if something is wrong, which can confuse
athletes.

The penalty indicator (desktop and online/mobile variants), the row-level
warning icon, and the expanded-view "Score adjusted by organizer" notices
now gate on penaltyType alone. hasExpandableContent and the expanded-row
filter likewise stop expanding rows solely because of a plain adjustment.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 19, 2026

Warning

Rate limit exceeded

@zacjones93 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 36 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 18 minutes and 36 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2374b426-1d53-4d2d-a9c6-f38ad684e31d

📥 Commits

Reviewing files that changed from the base of the PR and between 917e2ec and d7d42ec.

📒 Files selected for processing (4)
  • apps/wodsmith-start/src/components/competition-leaderboard-table.tsx
  • apps/wodsmith-start/src/components/online-competition-leaderboard-table.tsx
  • apps/wodsmith-start/test/components/leaderboard-page-content.test.tsx
  • lat.md/domain.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/leaderboard-penalty-warning-SehzH

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

@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.

No issues found across 4 files

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