fix: eurogold/gold false-hit + feature top keyword hits & fresh-added products larger/on-top

#4
by bep40 - opened

Frontend fixes:

  1. Search: compact-SKU substring tier now requires sku >= max(5, len(query)/2) chars. A query "eurogold" was awarding +400 to any product whose sku contains "gold" (e.g. Grob sku=GOLD, 4 chars) just because "eurogold".includes("gold") — this polluted brand searches with unrelated "gold" items above the real Eurogold results.

  2. Featured sizing: top keyword hits (top 3 by vai-avatar score, score >= 300) are now featured too, not only the decisive exact winner. Queries like "xoong noi" that match 4 Eurogold racks at equal score now enlarge the strongest ones instead of leaving them at normal size.

  3. Fresh products: recently-added products (via vai-avatar "Thêm SP" → products_url_added.json, which write _added_at; preserved as addedAt by normalizeProduct) get the featured 1.45x size among the top 4 newest if they also matched.

  4. Z-order: featured tiles now draw at z-index 300+ (above the 1..100 seed range of ordinary tiles) so enlarged results actually sit ON TOP of the adjacent photographs, as requested ("sp mới et résultats de recherche doivent être plus grands et au-dessus des autres").

bep40 changed pull request status to open
bep40 changed pull request status to merged

Sign up or log in to comment