Skip to content

Fix/leaderboard fetch error#1668

Merged
Priyanshu-byte-coder merged 4 commits into
Priyanshu-byte-coder:mainfrom
Shanidhya01:fix/leaderboard-fetch-error
May 31, 2026
Merged

Fix/leaderboard fetch error#1668
Priyanshu-byte-coder merged 4 commits into
Priyanshu-byte-coder:mainfrom
Shanidhya01:fix/leaderboard-fetch-error

Conversation

@Shanidhya01
Copy link
Copy Markdown
Contributor

@Shanidhya01 Shanidhya01 commented May 30, 2026

Summary

Fixes the Public Leaderboard data loading issue where users saw "Leaderboard data is temporarily unavailable" due to failed API fetch requests.

Closes #1667


Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup

Changes Made

  • Investigated leaderboard data fetching flow
  • Fixed failed API request causing leaderboard data not to load
  • Improved error handling for leaderboard requests
  • Prevented unhandled promise rejections
  • Added graceful fallback behavior when data cannot be retrieved
  • Improved logging for easier debugging of future fetch failures

How to Test

  1. Start the application locally
  2. Navigate to the Public Leaderboard page
  3. Open the Streak, Commits, and PR tabs
  4. Verify leaderboard data loads successfully
  5. Check browser console for errors
  6. Confirm no "Leaderboard data is temporarily unavailable" message appears during normal operation

Checklist

  • Linked issue in summary
  • Self-reviewed the diff
  • No new warnings or errors introduced
  • Tested leaderboard functionality locally
  • Added/updated tests if applicable

Additional Notes

This fix addresses the root cause of leaderboard fetch failures and improves resilience when API requests fail, ensuring a better user experience and easier troubleshooting.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

@Shanidhya01 is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix labels May 30, 2026
@github-actions
Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

- Add export const runtime = nodejs to middleware so

  NEXTAUTH_SECRET is available at runtime instead of being

  undefined in the Edge Runtime, which caused getToken to

  return null and redirect all authenticated test requests to /

- Add **/api/auth/session** route mock to dashboard-widgets and

  theme specs so useSession resolves immediately without hitting

  the real Supabase-backed endpoint

- Update notifications and settings specs to use **/api/auth/session**

  (with trailing **) so requests with query params are also intercepted

- Remove duplicate api/ai-insights and api/notifications route

  handlers from dashboard-widgets beforeEach
@github-actions github-actions Bot added the type:testing GSSoC type bonus: tests (+10 pts) label May 30, 2026
@Priyanshu-byte-coder Priyanshu-byte-coder added gssoc:approved GSSoC: PR approved for scoring level2 GSSoC Level 2 - Medium complexity (25 points) labels May 31, 2026
@Priyanshu-byte-coder Priyanshu-byte-coder merged commit ff596f3 into Priyanshu-byte-coder:main May 31, 2026
9 of 11 checks passed
@github-actions
Copy link
Copy Markdown

🎉 Merged! Thanks for contributing to DevTrack.

If the project has been useful to you, a ⭐ star on the repo is the easiest way to support it — it helps DevTrack get discovered by more developers.

Keep an eye on open issues for your next contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved GSSoC: PR approved for scoring gssoc26 GSSoC 2026 contribution level2 GSSoC Level 2 - Medium complexity (25 points) type:bug GSSoC type bonus: bug fix type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Public Leaderboard displays "Leaderboard data is temporarily unavailable"

2 participants