feat: raise search results limit from 30 to 150
Build & Deploy / build (push) Failing after 3s
Build & Deploy / docker (push) Skipped

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.
This commit is contained in:
Kevin L'Hereec committed 2026-07-23 16:26:30 +02:00
1 parent 6053290501
commit a1f6ff419a
2 files changed
+7 -2

No files matched your search

+3 -1
View File
@@ -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()))
}