Skip to content

Conversation

@marcodejongh
Copy link
Owner

No description provided.

This commit adds a new filter toggle that shows only climbs using holds
available exclusively on the largest board size.

Changes:
- Add tallClimbsOnly boolean to SearchRequest type
- Update filter builder with SQL logic to identify climbs extending beyond
  smaller size boundaries (checking edgeTop, edgeBottom, edgeLeft, edgeRight)
- Add isLargestSize flag to BoardDetails to determine board size hierarchy
- Add UI toggle in BasicSearchForm (visible only on largest size)
- Update URL parameter serialization and analytics tracking
- Fix test mocks to include new tallClimbsOnly property

The filter helps users identify climbs that require the full height/width
of their board configuration.
@vercel
Copy link

vercel bot commented Nov 9, 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 9, 2025 8:34am

Fixed a critical bug in the tall climbs filter SQL query. The previous
implementation incorrectly filtered size comparisons by dimension, causing
it to miss climbs or incorrectly include them.

The Bug:
- Each subquery filtered sizes by the specific dimension being compared
  (e.g., only comparing against sizes with smaller edgeTop)
- This could return no sizes in some dimensions, causing COALESCE fallbacks
  (0 or 999) to match almost all or no climbs incorrectly
- On boards like Kilter home wall where the larger board extends downward,
  this failed to identify climbs using the extended bottom area

The Fix:
- Now queries ALL other sizes for the layout without dimension filtering
- Compares climb edges against MAX/MIN of all other sizes' edges
- Better COALESCE fallbacks prevent false positives when only one size exists
- Correctly identifies climbs extending beyond ALL other sizes in any direction

This ensures "tall climbs only" shows climbs that use holds available
exclusively on the largest board size.
Fixed two issues with the tall climbs filter:

1. SQL Syntax Error:
   - Removed invalid arithmetic operations in SQL template literals
   - Changed COALESCE fallbacks from column arithmetic (edgeTop - 1) to
     static values (999/-999)
   - Fallbacks now correctly ensure no matches when only one size exists
   - MAX queries use 999 so > comparisons always fail
   - MIN queries use -999 so < comparisons always fail

2. Empty Results 404 Error:
   - Modified page.tsx to distinguish between invalid routes and empty
     filter results
   - Now only returns 404 when no climbs exist AND no filters are active
   - Empty filtered results display correctly instead of showing 404
   - Improves UX when filters legitimately return no matches

The filter now works correctly to show climbs using holds available
exclusively on the largest board size.
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