mirror of
https://github.com/yusufipk/RepoHub.git
synced 2026-09-11 18:46:07 +00:00
perf: Optimize recommendation system and improve error handling
- Fix N+1 query problem in preset package fetching * Search with limit 5 to find best matches * Case-insensitive package name matching * Fallback to most popular when no exact match - Improve category filtering accuracy * Update category mapping to match database schema * Remove duplicate packages in category fetching * Better distribution across categories - Add version control for localStorage profile * Support future schema migrations * Auto-migrate old profiles to new version * Persist version in localStorage - Enhance error handling * Specific error messages for 400/500/404 responses * Network error detection * User-friendly error messages in UI - Fix OS detection fallback * Default to ubuntu when detection returns unknown * Prevent empty OS selection in onboarding - Add better API validation * Explicit limit range validation (1-50) * Clear error messages for invalid inputs
This commit is contained in:
@@ -21,6 +21,7 @@ export type ExperienceLevel = "beginner" | "intermediate" | "advanced";
|
||||
* User profile stored in localStorage
|
||||
*/
|
||||
export interface UserProfile {
|
||||
version: number; // Schema version for future migrations
|
||||
categories: UserCategory[];
|
||||
detectedOS?: string;
|
||||
selectedOS?: string; // Manual override
|
||||
|
||||
Reference in New Issue
Block a user