Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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 e4313f9. Configure here.
Bigshmow
left a comment
There was a problem hiding this comment.
Just a note on median vs mean, otherwise LGTM.
| /** Median holding time in minutes. */ | ||
| avgHoldMinutes?: number | null; |
There was a problem hiding this comment.
I just realized our UI designs show this as "avg. hold" but clicker calls this medianHoldingTimeMinutes
See profile response: https://docs.clicker.xyz/api-reference/profile
And the comment acknowledge this discrepancy, so wdyt is it ok to keep as is or is the misrepresentation (median vs mean) not acceptable?
There was a problem hiding this comment.
We can go with medianHoldMinutes here instead, aligned with product needs the front end will now simply say "hold time" instead of avg. hold.
| /** Median holding time in minutes. */ | |
| avgHoldMinutes?: number | null; | |
| /** Median holding time in minutes. */ | |
| medianHoldMinutes?: number | null; |

Explanation
Add tokenImageUrl to Position and avgHoldMinutes to TraderStats types and superstruct schemas so the extension can consume the new API fields. Also fixes fetchClosedPositions hitting a v2 URL that doesn't exist (the closed positions endpoint is v1-only), which was causing 404s.
References
Checklist
Note
Medium Risk
Moderate risk because it changes the URL selection logic for position fetching (v1 vs v2), which could affect production API calls and caching, though the change is small and covered by tests.
Overview
Updates social-api response typing/validation to accept two new optional fields:
Position.tokenImageUrlandTraderStats.avgHoldMinutes(including superstruct schemas and test fixtures).Fixes
fetchClosedPositionsto call the v1 closed-positions endpoint (v2 doesn’t exist), by selecting v1/v2 base URLs based on open vs closed status; tests are updated to assert the corrected URL.Reviewed by Cursor Bugbot for commit b316248. Bugbot is set up for automated code reviews on this repo. Configure here.