feat(tradein): Stage 4b — IMV benchmark badge + house info card on estimate result #461

Merged
lekss361 merged 1 commit from feat/tradein-frontend-stage4b into main 2026-05-23 13:28:24 +00:00

1 commit

Author SHA1 Message Date
lekss361
ab57e5756c feat(tradein): Stage 4b — IMV benchmark badge + house info card on estimate result
UI exposure for Stage 3 (IMV cache) + Stage 2c (houses data).

New components:
- IMVBenchmark: показывает Avito recommended price + range + market_count + сравнение с нашей оценкой (diff %)
- HouseInfoCard: показывает ближайший дом — rating + reviews + 9 characteristics (year/floors/elevators/concierge/etc)

New hooks:
- useEstimateImvBenchmark(id) → GET /api/v1/trade-in/estimate/{id}/imv-benchmark
- useEstimateHouses(id) → GET /api/v1/trade-in/estimate/{id}/houses

2 new TS types: HouseInfoForEstimate, IMVBenchmarkResponse (mirror Stage 4a backend Pydantic schemas).

Wired в page.tsx между HeroSummary и ListingsCard в result section.
Components conditionally render: возвращают null если data unavailable.

CSS: добавлены .imv-benchmark + .house-info-card стили (responsive grid).
TS strict, ESLint clean, next build pass.

Refs: AvitoScraper_v2_Implementation_Plan Stage 4b. Backend contract: PR Stage 4a (паралельный).
2026-05-23 16:20:42 +03:00