Skip to content

Conversation

@marcodejongh
Copy link
Owner

  • Add loading spinner overlay when heatmap is enabled and data is loading
  • Combine 3 separate database queries into a single optimized query using
    LEFT JOIN with pre-aggregated subqueries for user ascents/attempts
  • Add database indexes optimized for heatmap aggregation on hold_id
  • Add indexes on ascents and bids tables for user-specific queries

- Add loading spinner overlay when heatmap is enabled and data is loading
- Combine 3 separate database queries into a single optimized query using
  LEFT JOIN with pre-aggregated subqueries for user ascents/attempts
- Add database indexes optimized for heatmap aggregation on hold_id
- Add indexes on ascents and bids tables for user-specific queries
@vercel
Copy link

vercel bot commented Nov 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
boardsesh Ready Ready Preview Comment Nov 25, 2025 11:14am

- Add enabled parameter to useHeatmapData hook to defer fetching
- Only fetch heatmap data when user clicks "Show Heatmap" button
- Move showHeatmap state declaration before hook call
The loading state is now computed as enabled && (!hasFetched || isFetching)
which ensures the spinner shows immediately when the user clicks "Show Heatmap"
rather than waiting for useEffect to run after the render.
The raw SQL approach broke because whereConditions from createClimbFilters
uses Drizzle ORM table references that don't match raw SQL aliases.

Reverted to original Drizzle ORM query while keeping the optimization of
running user ascents/attempts queries in parallel with Promise.all.
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.

3 participants