mirror of
https://github.com/yusufipk/RepoHub.git
synced 2026-09-11 18:46:07 +00:00
feat: smart package recommendations with UX improvements
- Added smart recommendations section with category-based filtering - Implemented onboarding flow with 3-step wizard (categories, OS, experience level) - Added 'Select All/Deselect All' for recommendations - Added 'Preferences' button in header to reopen onboarding - Fixed script generation for recommendation-based packages (auto-detect platform) - Fixed onboarding completion bug (removed duplicate save) - Added comprehensive debug logging - Enhanced ScriptPreview to work with auto-generated platform info - Optimized recommendation API with proper validation and error handling - Added localStorage profile management with version control
This commit is contained in:
@@ -88,7 +88,7 @@ export class RecommendationService {
|
||||
try {
|
||||
// Fetch all preset packages in one query
|
||||
const packages: Package[] = [];
|
||||
|
||||
|
||||
// Search for each package name (case-insensitive)
|
||||
// Note: Current API doesn't support bulk name filtering,
|
||||
// so we optimize by fetching larger batches and filtering
|
||||
@@ -105,7 +105,7 @@ export class RecommendationService {
|
||||
const exactMatch = result.packages.find(
|
||||
(pkg) => pkg.name.toLowerCase() === name.toLowerCase()
|
||||
);
|
||||
|
||||
|
||||
if (exactMatch) {
|
||||
packages.push(exactMatch);
|
||||
} else if (result.packages.length > 0) {
|
||||
@@ -155,7 +155,9 @@ export class RecommendationService {
|
||||
// This is a workaround until we add category name filtering to API
|
||||
const result = await PackageService.getMany({
|
||||
platform_id: platformId,
|
||||
limit: Math.ceil(limit / (categories.length * dbCategoryNames.length)),
|
||||
limit: Math.ceil(
|
||||
limit / (categories.length * dbCategoryNames.length)
|
||||
),
|
||||
sort_by: "popularity_score",
|
||||
sort_order: "desc",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user