Skip to content

Conversation

@marcodejongh
Copy link
Owner

Bug Fix:

  • Fixed setter name filter not actually filtering climbs
  • The parameter was flowing through UI → URL → API but never used in SQL WHERE clause
  • Added setterNameCondition to create-climb-filters.ts using inArray()

Enhancements:

  • Changed setter filter from single text input to multiselect autocomplete
  • Added route count display next to each setter name (e.g., "John Doe (42)")
  • Created new API endpoint: /api/v1/[board]/[layout]/[size]/[sets]/[angle]/setters
  • Uses AntD Select component with mode="multiple" for better UX

Type Changes:

  • Updated SearchRequest.settername from string to string[]
  • Updated URL parameter handling to support comma-separated values
  • Fixed analytics tracking to check array length

Technical Details:

  • New query: app/lib/db/queries/climbs/setter-stats.ts
  • New component: app/components/search-drawer/setter-name-select.tsx
  • Uses SWR for data fetching with client-side search filtering
  • Maintains AntD design system best practices

…e counts

**Bug Fix:**
- Fixed setter name filter not actually filtering climbs
- The parameter was flowing through UI → URL → API but never used in SQL WHERE clause
- Added setterNameCondition to create-climb-filters.ts using inArray()

**Enhancements:**
- Changed setter filter from single text input to multiselect autocomplete
- Added route count display next to each setter name (e.g., "John Doe (42)")
- Created new API endpoint: /api/v1/[board]/[layout]/[size]/[sets]/[angle]/setters
- Uses AntD Select component with mode="multiple" for better UX

**Type Changes:**
- Updated SearchRequest.settername from string to string[]
- Updated URL parameter handling to support comma-separated values
- Fixed analytics tracking to check array length

**Technical Details:**
- New query: app/lib/db/queries/climbs/setter-stats.ts
- New component: app/components/search-drawer/setter-name-select.tsx
- Uses SWR for data fetching with client-side search filtering
- Maintains AntD design system best practices
@vercel
Copy link

vercel bot commented Nov 5, 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 5, 2025 6:11am

const pathname = usePathname();
const [searchValue, setSearchValue] = useState('');

// Extract board URL from pathname (e.g., /kilter/123/456/789/40/list -> /api/v1/kilter/123/456/789/40)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are already utility methods for performing the URL parsing, we should invent a seperate method of doing that here

}, [pathname]);

// Fetch setter stats from the API
const { data: setterStats, isLoading } = useSWR<SetterStat[]>(
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean it uses progressive loading? We probably dont want to load all the setters by default. We need progressive load, and if the user types in text, we should filter on that text

…tter search

- Replace manual pathname regex parsing with constructSetterStatsUrl utility
- Add parsedParams to QueueContext for better component access
- Implement progressive loading: only fetch when user types 2+ characters
- Add search query parameter support to setter-stats API
- Use server-side filtering with ILIKE for better performance
- Add 50-result limit to setter stats query
- Improve UX with helpful placeholder and notFoundContent messages
- Track dropdown open state with onDropdownVisibleChange
- Fetch top setters when dropdown opens (before user types)
- Switch to search mode when user types 2+ characters
- Improves UX by showing popular setters immediately
@marcodejongh marcodejongh merged commit 8844bb3 into main Nov 5, 2025
4 checks passed
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