gendesign/tradein-mvp/frontend
bot-backend 81ae21ada9
All checks were successful
CI / changes (pull_request) Successful in 7s
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
feat(tradein/v2): CacheView history + PDF link + quota + address autocomplete (#2042)
FE-5, last FE wiring on the mappers pattern. Closes #2042.
- New hooks (lib/trade-in-api.ts): useEstimateHistory (GET /history), useGeocodeSuggest
  (GET /geocode/suggest?q=&limit=, debounced, enabled>=3 chars); useQuota reused.
- types/trade-in.ts: EstimateHistoryItem (area_m2 string, median_price), GeocodeSuggestion.
- mappers.ts: mapCache(history) -> {rows: CacheRow[], kpis: CacheKpi[]} — per-row status
  by 24h TTL; KPIs FE-derived from /history (всего/средняя цена/повторные %), NOT the
  global /cache-stats.
- CacheView: real previous-estimates list. ParamsPanel: address autocomplete dropdown →
  captures lat/lon into submit (cleared on manual edit). HeroBar: «Скачать PDF» → /estimate/
  {id}/pdf, UUID-gated + safeUrl scheme check + disabled when no estimate. TopNav: «Мои
  отчёты» from quota.used/history. page.tsx: invalidate history+quota on new estimate.
- Hydration-safe: PDF link gated behind a mounted flag (urlId is SSR-null/client-uuid).
- FE-1..4 untouched.

Verified: next build green (/v2 39.6 kB); tsx harness ran mapCache vs real /history (10
items: ВСЕГО 10 / СРЕДНЯЯ 8,85 млн / ПОВТОРНЫЕ 50%, statuses, null graceful).
code-reviewer APPROVE after hydration + reports-fallback fixes.
2026-06-28 16:14:34 +03:00
..
public refactor(tradein/v2): перенос HUD v2 в tradein-mvp frontend 2026-06-28 13:10:23 +03:00
src feat(tradein/v2): CacheView history + PDF link + quota + address autocomplete (#2042) 2026-06-28 16:14:34 +03:00
.dockerignore feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
Dockerfile chore(tradein-fe): bake NEXT_PUBLIC_ENABLE_PREVIEW build-arg (#801) 2026-05-30 18:40:21 +00:00
next.config.ts fix(tradein): убрать basePath redirect-loop 2026-05-21 01:05:49 +03:00
package.json feat(tradein): house analytics section (chart + KPI + sold list) (#546) 2026-05-24 18:09:45 +00:00
pnpm-lock.yaml feat(tradein): house analytics section (chart + KPI + sold list) (#546) 2026-05-24 18:09:45 +00:00
tsconfig.json feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00