perf(decode): slim decode response to id + display summary

POST /vehicles/decode returned the full vehicles row while every consumer
(search, landing, service-test) only navigates by id and re-fetches via
GET /vehicles/:id. That shipped the raw upstream decode payload to the
client on every decode — rawData is 19KB avg / 127KB p95 / 207KB max in
prod — plus the provider name, for nothing.

The response is now { id, brandName, model, year } on both the DB-hit and
fresh-decode paths. Frontend drops the (now absent) source property from
the vin_decode_success event; decode source remains queryable server-side
via query_logs.source.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 02:52:43 +03:00
parent 2077a9724a
commit 02c8321023
3 changed files with 27 additions and 8 deletions

View File

@@ -299,7 +299,6 @@ function SearchPage() {
vin: cleanVin,
vehicle_id: data.id,
response_time_ms: responseTimeMs,
source: data.source ?? null,
query_source: querySourceRef.current,
});
navigate({ to: "/dashboard/vehicles/$id", params: { id: data.id } });