From a1f6ff419a297f4ba905e453d2dbe7fb859a5887 Mon Sep 17 00:00:00 2001 From: Kevin L'Hereec Date: Thu, 23 Jul 2026 16:26:30 +0200 Subject: [PATCH] feat: raise search results limit from 30 to 150 30 results was too low once pc-builder.io's full catalog is scraped (e.g. 47 RTX 5070/5070 Ti variants alone), silently truncating results a user would otherwise see. Also added a result count hint in NewPartSearch.vue since the list is scrollable (max-h-96) rather than paginated, so it wasn't obvious more results existed below the fold. --- app/controllers/scraped_parts_controller.ts | 4 +++- inertia/pages/widgets/NewPartSearch.vue | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/controllers/scraped_parts_controller.ts b/app/controllers/scraped_parts_controller.ts index 9c0b775..15c0883 100644 --- a/app/controllers/scraped_parts_controller.ts +++ b/app/controllers/scraped_parts_controller.ts @@ -5,6 +5,8 @@ import ComponentType from '#models/component_type' import { ensureFreshCategory, updatePriceIfCheaper } from '#services/part_scraper_service' import { findCheapestOffers } from '#services/merchant_price_service' +const SEARCH_RESULTS_LIMIT = 150 + const searchValidator = vine.compile( vine.object({ q: vine.string().trim().minLength(1).optional(), @@ -59,7 +61,7 @@ export default class ScrapedPartsController { query.where('typeId', typeId) } - const parts = await query.limit(30) + const parts = await query.limit(SEARCH_RESULTS_LIMIT) return response.json(parts.map((part) => part.serialize())) } diff --git a/inertia/pages/widgets/NewPartSearch.vue b/inertia/pages/widgets/NewPartSearch.vue index 0951e9d..3581aa3 100644 --- a/inertia/pages/widgets/NewPartSearch.vue +++ b/inertia/pages/widgets/NewPartSearch.vue @@ -110,8 +110,11 @@ function importPart(part: ScrapedPart) {

No matching part found.

+

+ {{ results.length }} result{{ results.length > 1 ? 's' : '' }} — scroll for more +

-