Skip to content

Fix AI search to filter and display recommended tires on page - #132

Merged
RivianTrackr merged 1 commit into
mainfrom
claude/filter-tire-recommendations-rNe6F
Feb 21, 2026
Merged

Fix AI search to filter and display recommended tires on page#132
RivianTrackr merged 1 commit into
mainfrom
claude/filter-tire-recommendations-rNe6F

Conversation

@RivianTrackr

Copy link
Copy Markdown
Owner

The AI search was broken in two ways:

  1. renderAiResults() called renderCards() with no arguments, causing it to crash silently instead of rendering the recommended tires
  2. In server-side pagination mode, state.allRows is empty so recommended tire IDs couldn't be matched to any row data for rendering

Changes:

  • Backend now returns full tire row data (tire_rows) alongside AI recommendations so the frontend can render cards for any tire
  • Added RTG_Database::get_tires_by_ids() to fetch tire data by ID array
  • Frontend now merges server-provided tire data with local state, falling back to server data for tires not already loaded
  • Fixed renderAiResults() to pass state.filteredRows to renderCards()
  • Added proper grid/no-results visibility toggling and pagination cleanup
  • Clear AI now correctly restores server-side mode when applicable
  • Loads tire ratings before rendering AI result cards

https://claude.ai/code/session_01N746AFJ7gZ4DAdpnsaGA8M

The AI search was broken in two ways:
1. renderAiResults() called renderCards() with no arguments, causing it to
   crash silently instead of rendering the recommended tires
2. In server-side pagination mode, state.allRows is empty so recommended
   tire IDs couldn't be matched to any row data for rendering

Changes:
- Backend now returns full tire row data (tire_rows) alongside AI
  recommendations so the frontend can render cards for any tire
- Added RTG_Database::get_tires_by_ids() to fetch tire data by ID array
- Frontend now merges server-provided tire data with local state, falling
  back to server data for tires not already loaded
- Fixed renderAiResults() to pass state.filteredRows to renderCards()
- Added proper grid/no-results visibility toggling and pagination cleanup
- Clear AI now correctly restores server-side mode when applicable
- Loads tire ratings before rendering AI result cards

https://claude.ai/code/session_01N746AFJ7gZ4DAdpnsaGA8M
@RivianTrackr
RivianTrackr merged commit f087e93 into main Feb 21, 2026
4 checks passed
@RivianTrackr
RivianTrackr deleted the claude/filter-tire-recommendations-rNe6F branch February 21, 2026 01:56
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.

2 participants