-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Count distinct climbs per grade on profile page #576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add new GraphQL query `userProfileStats` that returns distinct climb counts per grade per board layout using server-side deduplication - Add backend resolver that groups ticks by climbUuid to count unique climbs rather than total ascents - Update profile page to use server-side stats for the Statistics Summary Card showing distinct climbs by grade - Charts still use frontend data with timeframe filtering This ensures that if a user climbed the same problem 5 times, it only counts as 1 climb for that grade, not 5 ascents.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Claude Review✅ Ready to merge - Minor issues noted below, but nothing blocking. Issues
No TestsThis PR adds a new GraphQL query without corresponding tests. Consider adding tests for:
|
Replace JavaScript Set-based deduplication with SQL aggregation: - Use COUNT(DISTINCT climb_uuid) GROUP BY for grade counts - More efficient database-level aggregation instead of fetching all rows
Claude Review✅ Ready to merge - Minor issues noted below, but nothing blocking. Issues
|
- Rename "Routes by Angle" to "Ascents by Angle" with distinct counts - Count distinct climbs per angle using climbUuid+angle as unique key - Add userId validation in backend resolver (return empty for invalid) - Parallelize database queries with Promise.all for better performance - Add NaN check for parseInt when parsing grade difficulty - Remove unused GqlLayoutStats import - Add climbUuid to logbook entries for angle chart deduplication
Claude Review✅ Ready to merge - Minor issues noted below, but nothing blocking. Issues
|
userProfileStatsthat returns distinct climbcounts per grade per board layout using server-side deduplication
climbs rather than total ascents
Summary Card showing distinct climbs by grade
This ensures that if a user climbed the same problem 5 times, it only
counts as 1 climb for that grade, not 5 ascents.