gendesign/frontend/src/components/site-finder
Light1YT 03e5d07907
Some checks failed
Deploy / deploy (push) Blocked by required conditions
Deploy / build-worker (push) Has been skipped
Deploy / changes (push) Successful in 7s
Deploy / build-backend (push) Has been skipped
Deploy / build-frontend (push) Has been cancelled
fix(site-finder): adapt backend egrn_block → frontend ParcelEgrn (#1217)
Бэкенд /analyze отдаёт egrn_block c snake_case-ключами
permitted_use_text/land_category/ownership_type/parcel_status/
last_egrn_update_date (parcels.py:2151-2171), фронт ждёт ParcelEgrn с
vri/category/owner_type/status/last_updated (site-finder-api.ts:255).
Section1ParcelInfo делал `data.egrn as ParcelEgrn` — каст глушит TS;
6 из 10 строк таблицы ЕГРН в prod пустые. ExportButtons тем же кастом
писал пустые ячейки в CSV. egrn={} (truthy) глушил buildFallbackEgrn.
Mock-фикстура была в старой фронт-форме — маскировала баг в dev.

Patch:
- `adaptEgrn(raw, cad)` в site-finder-api.ts: маппит backend-ключи →
  frontend, пустой `{}` → null. Тестируется в изоляции.
- AnalyzeResponse.egrn: ParcelEgrn|null → unknown (wire-shape).
- Section1ParcelInfo: `adaptEgrn(data.egrn, cad) ?? buildFallbackEgrn(cad)`.
- ExportButtons: пропс `egrn` (адаптированный) вместо bad-cast'а.
- mock parcel-analyze.json — на реальную backend-форму.
- 7 vitest-кейсов: backend→frontend mapping, {}→null, null/scalar→null,
  partial nullable→em-dash, threading cad, пустые строки=missing.

80/80 frontend тестов зелёные. tsc + lint clean.

Closes #1217
2026-06-13 05:36:52 +00:00
..
__tests__ feat(site-finder): grounded parcel-chat panel UI (#958) 2026-06-08 18:08:01 +05:00
analysis fix(site-finder): adapt backend egrn_block → frontend ParcelEgrn (#1217) 2026-06-13 05:36:52 +00:00
entry feat(site-finder): clickable parcel markers open analysis from the map 2026-06-04 12:50:37 +05:00
BestLayoutsBlock.tsx refactor(sf-19): BestLayouts inline hex → Tailwind tokens (#296) 2026-05-17 14:17:05 +00:00
CadInput.tsx fix(site-finder): handle 202 on-demand geometry in analyze + error boundaries (#1001) 2026-06-05 16:12:21 +05:00
ChatPanel.tsx feat(site-finder): grounded parcel-chat panel UI (#958) 2026-06-08 18:08:01 +05:00
CompetitorTable.tsx feat(sf-fe-a8): Section 3.2 Планировки + 3.3 Остатки/Velocity + CompetitorTable drawer pattern (#357) 2026-05-18 01:14:32 +00:00
ConfidenceBadge.tsx feat(site-finder): X2 confidence indicator + caveats (#48) (#88) 2026-05-12 01:04:25 +03:00
ConnectionPointsLayer.tsx feat(#115): Leaflet layer toggle для connection points (Макс KILLER) 2026-05-16 22:51:12 +03:00
CpLayerControlPanel.tsx feat(site-finder): toggleable market layers on analysis map (#999) 2026-06-07 14:35:24 +05:00
CustomPoiAddModal.tsx feat(#254,#114): custom POI UI + score breakdown stacked-bar viz 2026-05-17 09:35:35 +03:00
CustomPoiEditModal.tsx feat(#254,#114): custom POI UI + score breakdown stacked-bar viz 2026-05-17 09:35:35 +03:00
CustomPoiLayer.tsx feat(#254,#114): custom POI UI + score breakdown stacked-bar viz 2026-05-17 09:35:35 +03:00
CustomPoiToggleButton.tsx feat(#254,#114): custom POI UI + score breakdown stacked-bar viz 2026-05-17 09:35:35 +03:00
EnvironmentTab.tsx refactor(frontend): extract SectionLabel + EmptyState + adminStyles shared (#132) 2026-05-14 23:55:38 +03:00
FetchingState.tsx feat(site-finder): auto-fetch cadastre geometry on-demand (#93) (#95) 2026-05-12 09:02:17 +03:00
GateVerdictBanner.tsx feat(site-finder): G5 gate verdict banner in OverviewTab (#32 sub-PR 2/2 FINAL) (#143) 2026-05-15 01:09:34 +03:00
GeologyBlock.tsx feat(site-finder): v3.4 - weather enrichment (temp/precip/UV) + geology stub 2026-05-11 21:17:57 +03:00
GeometrySuitabilityBlock.tsx feat(site-finder): P1 geometry suitability score (#45) (#89) 2026-05-12 08:00:12 +03:00
GeotechRiskBlock.tsx feat(site-finder): v3.5 - seasonal weather + hydrology + geotech risk 2026-05-11 21:32:07 +03:00
HorizonSelector.tsx feat(site-finder): horizon selector (6/12/18) on analysis screen (#996) 2026-06-05 15:42:58 +05:00
HydrologyBlock.tsx feat(site-finder): v3.5 - seasonal weather + hydrology + geotech risk 2026-05-11 21:32:07 +03:00
IsochronesPanel.tsx feat(site-finder): isochrones UI + networks VKH + OSM substations 2026-05-11 21:48:21 +03:00
KpiCard.tsx feat(site-finder): tabbed UX - hero KPI band + 4 tabs (Overview/Env/Land/Market) + sticky map 2026-05-11 23:21:39 +03:00
LandTab.tsx feat(nspd): TIER 4 opportunity layers + red lines (#94 PR2 of 4) 2026-05-16 19:06:22 +03:00
MarketLayers.tsx feat(site-finder): add opportunity-ЗУ + red-line map layers (§12.1-13, #958) 2026-06-09 07:19:53 +00:00
MarketTab.tsx fix(sf-legacy): фильтр стейл competitors (>1 года Сданные → не конкурент) 2026-05-18 07:29:26 +03:00
MarketTrendBlock.tsx fix(sf-12): MarketTrend — adaptive n<30/n<100 confidence warnings 2026-05-17 16:33:22 +03:00
NeighborsBlock.tsx feat(site-finder): P2 cad_buildings соседи + overlap check (#46) (#91) 2026-05-12 01:30:53 +03:00
NspdEngineeringNearbyBlock.tsx feat(site-finder): NSPD frontend integration в LandTab (#202) (#212) 2026-05-16 11:55:31 +00:00
NspdFreshnessBadge.tsx fix(#234): NSPD harvest ETA badge + SETNX dedupe (Sub-PR C) 2026-05-17 09:13:06 +03:00
NspdOpportunityBlock.tsx feat(nspd): TIER 4 opportunity layers + red lines (#94 PR2 of 4) 2026-05-16 19:06:22 +03:00
NspdRedLinesBlock.tsx fix(nspd): rename migration 89→98, fix red lines ST_Area→ST_Length (#220) 2026-05-16 19:33:14 +03:00
NspdRiskZonesBlock.tsx feat(nspd): enable TIER 3 risk zones harvest + extract in analyze (#94 PR1) 2026-05-16 16:11:59 +03:00
NspdZoningBlock.tsx fix(#234): NSPD harvest ETA badge + SETNX dedupe (Sub-PR C) 2026-05-17 09:13:06 +03:00
NspdZouitOverlapsBlock.tsx feat(site-finder): NSPD frontend integration в LandTab (#202) (#212) 2026-05-16 11:55:31 +00:00
OverviewTab.tsx feat(sf-legacy): expose EGRN + utilities в Обзор tab 2026-05-18 07:21:53 +03:00
Pipeline24moBlock.tsx fix(site-finder): visible by-quarter pipeline bars (#167) 2026-05-15 10:35:51 +03:00
ScoreBreakdownPanel.tsx feat(site-finder): X1 score breakdown + verbal explain (#47) (#92) 2026-05-12 08:17:00 +03:00
ScoreBreakdownStackedBar.tsx feat(#254,#114): custom POI UI + score breakdown stacked-bar viz 2026-05-17 09:35:35 +03:00
ScoreCard.tsx feat(site-finder): tabbed UX - hero KPI band + 4 tabs (Overview/Env/Land/Market) + sticky map 2026-05-11 23:21:39 +03:00
SeasonalWeatherBlock.tsx feat(site-finder): v3.5 - seasonal weather + hydrology + geotech risk 2026-05-11 21:32:07 +03:00
SiteMap.tsx feat(site-finder): add opportunity-ЗУ + red-line map layers (§12.1-13, #958) 2026-06-09 07:19:53 +00:00
SuccessRecommendationBlock.tsx fix(sf-20): adaptive district threshold 30→15 with data_confidence flag 2026-05-17 16:34:52 +03:00
VelocityBlock.tsx fix(sf-17): rosreestr velocity fallback via cad_quarter (~100% EKB coverage) 2026-05-17 16:50:19 +03:00
WeightProfilePanel.tsx feat(site-finder): weight profile panel + analyze options (#114 sub-PR 4/4 FINAL) (#139) 2026-05-15 00:50:02 +03:00