Skip to content

fix: implement standard competition tie-ranking for leaderboard and fix tracker header mobile layout - #421

Merged
trtajim merged 2 commits into
mainfrom
fix/leaderboard-ties-and-tracker-header
Oct 13, 2026
Merged

trtajim merged 2 commits into
mainfrom
fix/leaderboard-ties-and-tracker-header

Conversation

@trtajim

@trtajim trtajim commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Description

  • Implemented standard competition ranking ("1224" ranking) without tie-breakers for both student study times and contributor resource counts. When users have identical scores, they share the same rank (e.g. 32 and 32), and the subsequent rank appropriately accounts for the count (e.g. 34).
  • Updated top 3 podium place badges on the leaderboard to respect tied ranks.
  • Fixed the header layout in Study Tracker on phone screens (flex-col sm:flex-row) so the title and action buttons (Leaderboard and View activity) wrap without horizontal conflict.

Summary by CodeRabbit

  • Improvements
    • Leaderboard users with tied scores now share the same rank, and badges reflect each user’s actual rank.
    • The tracker header adapts to smaller screens, with actions that can wrap when space is limited.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 54 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: hscstack/platform/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c596cc55-fcf4-47c3-bbee-64f2508ac78e
📥 Commits

Reviewing files that changed from the base of the PR and between 3f2b903 and c0818b4.

📒 Files selected for processing: 2
  • app/Http/Controllers/LeaderboardController.php
  • resources/js/pages/Leaderboard/Index.vue

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: hscstack/platform/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a87894b6-f3df-4f56-a770-5317ba45e50a
📥 Commits

Reviewing files that changed from the base of the PR and between c1cc6cf and 3f2b903.

📒 Files selected for processing: 3
  • app/Http/Controllers/LeaderboardController.php
  • resources/js/pages/Leaderboard/Index.vue
  • resources/js/pages/Tracker/Index.vue

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The leaderboards now assign shared ranks to tied scores, and podium badges reflect each user's rank. The tracker header now adapts its layout and spacing at smaller screen sizes.

Changes: Leaderboard ranking and badges

Layer / File(s) Summary
Assign competition ranks
app/Http/Controllers/LeaderboardController.php
Contributor and student entries share ranks when consecutive scores are equal. New scores receive their one-based position in the top 50. Current-user lookups use collections around the leaderboard arrays.
Display badges from user ranks
resources/js/pages/Leaderboard/Index.vue
Podium badges use each user's rank. Ranks other than 1, 2, or 3 display a neutral badge with the rank number.

Responsive tracker header

Layer / File(s) Summary
Adapt tracker header layout
resources/js/pages/Tracker/Index.vue
The header stacks on smaller screens and switches to a horizontal layout at the sm breakpoint. The action group can wrap, and the profile link uses breakpoint-specific padding.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 3f2b9

The leaderboard ranking and responsive header changes are mergeable after normal checks.

Security architecture risk: ⚪ Minimal · up to 3f2b9

The leaderboard changes how tied scores are ranked and displayed, without expanding public data exposure, changing access controls, or introducing writes. No material security risk was found in the changed behavior.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — The affected read endpoint remains publicly reachable through the same throttled route group. Public reachability predates this PR; selected user fields, privacy filters, and the top-50 result limit are unchanged.

Security Findings and Attack Paths

  • inferred — The inspected request-to-query-to-response path shows no newly introduced or materially expanded attack path. Rank values change display semantics, while the reachable queries, exposed fields, and rendering operations remain within the existing boundary.

Trust Boundaries and Controls

  • observed — Attacker-controlled tab and timeframe inputs remain strictly allowlisted before selecting fixed query branches. The PR does not weaken those controls or add an identity or authorization transition.
Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes both primary changes: standard competition tie-ranking for the leaderboard and the tracker header mobile layout fix.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@trtajim
trtajim merged commit cbbe281 into main Oct 13, 2026
6 checks passed
@trtajim
trtajim deleted the fix/leaderboard-ties-and-tracker-header branch October 13, 2026 19:09
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