gendesign/tradein-mvp/backend/app/api/v1
lekss361 07cbcd235b feat(tradein): cian price-change badges + split price-history chart
Backend:
- New GET /api/v1/trade-in/estimate/{id}/cian-price-changes — per-analog
  price change stats (n_changes, last_diff_pct, total_change_pct) из
  offer_price_history (cian playwright_history backfill, 268+ rows).
- house-analytics: PriceHistoryYearPoint gains source field; SQL теперь
  GROUP BY year, source → 2 серии для chart (avito_imv / yandex_valuation).

Frontend:
- ListingsCard показывает colored badge ↓N ±X.X% рядом с ценой cian-аналога
  если есть price changes (зелёный = снижение, красный = рост).
- PriceHistoryChart: pivot long→wide format client-side, 2 Line components
  (синий Avito #2563eb, оранжевый Яндекс #ea580c) + Legend, connectNulls.

Использует данные:
- offer_price_history (live cian price changes)
- house_placement_history.source разделение avito_imv vs yandex_valuation
2026-05-24 21:16:03 +03:00
..
__init__.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
admin.py feat(tradein/cian): valuation backfill + runner script для prod (#539) 2026-05-24 15:16:45 +00:00
brand.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
geocode.py feat(tradein): postgres_fdw live read of gendesign.cad_buildings (replaces snapshot) (#493) 2026-05-24 08:57:30 +00:00
search.py feat(tradein): Phase 3.2 — /api/v1/search endpoint + Redis cache (#479) 2026-05-23 14:44:22 +00:00
trade_in.py feat(tradein): cian price-change badges + split price-history chart 2026-05-24 21:16:03 +03:00