Fix AI search to filter and display recommended tires on page - #132
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The AI search was broken in two ways:
Changes:
https://claude.ai/code/session_01N746AFJ7gZ4DAdpnsaGA8M