fix: top traders section disappears on fetch error#29501
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit aad08f6. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag Selection Rationale:
No other tags are needed because:
Performance Test Selection: |
|
Bigshmow
left a comment
There was a problem hiding this comment.
Nice fix, left a non-blocking comment about explicit error messages, otherwise good to go.




Description
The Top Traders homepage section would silently disappear whenever the leaderboard API call failed. This happened because the section guard condition treated a failed fetch, where isLoading is false and traders is empty. Identically to a genuinely empty result set, causing return null.
We now show the default error state when that happens and while the user Retries the request the skeleton is also activated while the request is in-flight.
Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Moderate UI/telemetry change: alters Top Traders section render gating and adds new SocialService error telemetry (Logger extras + Sentry breadcrumbs) across multiple hooks, which could affect user-visible states and error reporting but not security-sensitive logic.
Overview
Prevents the homepage Top Traders section from disappearing on leaderboard fetch failures by distinguishing empty vs error vs background refetch states, rendering an
ErrorStatewith Retry, and showing skeletons while a retry is in-flight (while keeping cached traders visible on refetch failures).Adds shared SocialService telemetry helpers (
socialServiceTelemetry) and updates Social Leaderboard hooks to emit enrichedLogger.errorextras and Sentry breadcrumbs (including endpoint, coarse error category, and optional HTTP status/query params), with tests updated/expanded accordingly.Reviewed by Cursor Bugbot for commit fcbc39b. Bugbot is set up for automated code reviews on this repo. Configure here.