feat(sf-fe-a11): Section 5 «Атмосфера / воздух» #361

Merged
lekss361 merged 1 commit from feat/sf-fe-a11-section5-atmosphere into main 2026-05-18 04:07:48 +00:00
Owner

Summary

SF Frontend Wave 4 §A11: Section 5 «Атмосфера / воздух» — последняя из 5 sections на analysis page.

Files (2)

NEW frontend/src/components/site-finder/analysis/Section5Atmosphere.tsx:

  • id="section-5" + scrollMarginTop
  • Canonical useParcelAnalyzeQuery(cad) — TanStack Query cache shared
  • Loading skeleton + error + graceful empty state
  • HeadlineBar с summary
  • Noise / Air quality / Wind blocks — conditional per field из B5 response
  • Reuse <SeasonalWeatherBlock/> (existing) для seasonality
  • Extract block logic из EnvironmentTab без import full tab (avoid pulling Hydrology/SectionLabel)

Modified frontend/src/app/site-finder/analysis/[cad]/AnalysisPageContent.tsx:

  • Section 5 placeholder → <Section5Atmosphere cad={cad}/>
  • Sections 1-4 wiring PRESERVED (zero diff на этих блоках)

Constraints

  • TS strict
  • Canonical useParcelAnalyzeQuery (lib/site-finder-api)
  • Real backend data, graceful empty per field
  • CSS tokens (globals.css), Lucide icons
  • pre-commit prettier + lint pass
  • Sections 1-4 PRESERVED

Verify post-deploy

  • /site-finder/analysis/66:41:0204016:10 — Section 5 рендерится (noise/air/wind + seasonality)
  • Graceful empty если backend null атмосфера
  • Mobile: grid 1-col via auto-fit minmax(220px, 1fr)

Part of plan vault code/patterns/SiteFinder_Frontend_Migration_Plan_May18.md §A11. Все Wave 1-4 sections (1/2/3/4/5) теперь заполнены. Остаётся A12 (Landing redesign) + final acceptance audit.

## Summary SF Frontend Wave 4 §A11: Section 5 «Атмосфера / воздух» — последняя из 5 sections на analysis page. ## Files (2) **NEW** `frontend/src/components/site-finder/analysis/Section5Atmosphere.tsx`: - `id="section-5"` + scrollMarginTop - Canonical `useParcelAnalyzeQuery(cad)` — TanStack Query cache shared - Loading skeleton + error + graceful empty state - HeadlineBar с summary - Noise / Air quality / Wind blocks — conditional per field из B5 response - Reuse `<SeasonalWeatherBlock/>` (existing) для seasonality - Extract block logic из `EnvironmentTab` без import full tab (avoid pulling Hydrology/SectionLabel) **Modified** `frontend/src/app/site-finder/analysis/[cad]/AnalysisPageContent.tsx`: - Section 5 placeholder → `<Section5Atmosphere cad={cad}/>` - Sections 1-4 wiring **PRESERVED** (zero diff на этих блоках) ## Constraints - ✅ TS strict - ✅ Canonical `useParcelAnalyzeQuery` (lib/site-finder-api) - ✅ Real backend data, graceful empty per field - ✅ CSS tokens (globals.css), Lucide icons - ✅ pre-commit prettier + lint pass - ✅ Sections 1-4 PRESERVED ## Verify post-deploy - `/site-finder/analysis/66:41:0204016:10` — Section 5 рендерится (noise/air/wind + seasonality) - Graceful empty если backend null атмосфера - Mobile: grid 1-col via `auto-fit minmax(220px, 1fr)` Part of plan vault `code/patterns/SiteFinder_Frontend_Migration_Plan_May18.md` §A11. **Все Wave 1-4 sections (1/2/3/4/5) теперь заполнены.** Остаётся A12 (Landing redesign) + final acceptance audit.
lekss361 added 1 commit 2026-05-18 04:05:37 +00:00
Author
Owner

Deep Code Review — verdict: APPROVE

Imports / extraction

  • HeadlineBar (components/ui/HeadlineBar.tsx) and SeasonalWeatherBlock (components/site-finder/SeasonalWeatherBlock.tsx) resolve, signatures match ({ title, subtitle, rightSlot }, { seasonal }).
  • Types ParcelAnalysisNoise/AirQuality/Wind exist in types/site-finder.ts; noise/air_quality/wind/seasonal_weather nullable on ParcelAnalysis — null-guards correct.
  • NoiseBlock/AirQualityBlock/WindBlock/WeatherWindBlock/WindArrow defined inline — no import of EnvironmentTab (grep confirms), so Hydrology/SectionLabel transitive deps avoided as documented.

Sections 1-4 preservation

  • AnalysisPageContent.tsx diff is exactly: +1 import line, -7/+2 lines swapping the placeholder block. Sections 1-4 wiring byte-identical, sidebar nav anchors 1..5 still present.

Duplication justification

  • ~580 LoC of new block code is the cost of avoiding EnvironmentTab transitive import — explicitly called out in PR body. Block components are scoped to file and could be extracted into shared components/site-finder/atmosphere/* later. Non-blocking; flag as MINOR follow-up candidate.

Conventions

  • TS strict OK: single as unknown as ParcelAnalysis cast mirrors existing pattern at AnalysisPageContent.tsx:88; non-null assertions gated by has* flags. No bare any.
  • Canonical useParcelAnalyzeQuery(cad) — cache shared, no new HTTP, no useEffect antipattern.
  • Color tokens with hex fallbacks (var(--success-soft, #DCFCE7) etc.) — token-first, acceptable.
  • Lucide icons (Wind, Thermometer, Droplets); no emoji; aria-label on WindArrow; aria-hidden on decorative skeleton/icons.
  • Auto-fit grid repeat(auto-fit, minmax(220px, 1fr)) — mobile collapse ready.
  • Loading skeleton + error card + per-block EmptyCard + full empty state all present; wind fallback chain (windweather.wind → empty).

Merging.

## Deep Code Review — verdict: APPROVE ### Imports / extraction - `HeadlineBar` (`components/ui/HeadlineBar.tsx`) and `SeasonalWeatherBlock` (`components/site-finder/SeasonalWeatherBlock.tsx`) resolve, signatures match (`{ title, subtitle, rightSlot }`, `{ seasonal }`). - Types `ParcelAnalysisNoise/AirQuality/Wind` exist in `types/site-finder.ts`; `noise/air_quality/wind/seasonal_weather` nullable on `ParcelAnalysis` — null-guards correct. - `NoiseBlock/AirQualityBlock/WindBlock/WeatherWindBlock/WindArrow` defined inline — no import of `EnvironmentTab` (grep confirms), so Hydrology/SectionLabel transitive deps avoided as documented. ### Sections 1-4 preservation - `AnalysisPageContent.tsx` diff is exactly: +1 import line, -7/+2 lines swapping the placeholder block. Sections 1-4 wiring byte-identical, sidebar nav anchors 1..5 still present. ### Duplication justification - ~580 LoC of new block code is the cost of avoiding `EnvironmentTab` transitive import — explicitly called out in PR body. Block components are scoped to file and could be extracted into shared `components/site-finder/atmosphere/*` later. Non-blocking; flag as MINOR follow-up candidate. ### Conventions - TS strict OK: single `as unknown as ParcelAnalysis` cast mirrors existing pattern at `AnalysisPageContent.tsx:88`; non-null assertions gated by `has*` flags. No bare `any`. - Canonical `useParcelAnalyzeQuery(cad)` — cache shared, no new HTTP, no `useEffect` antipattern. - Color tokens with hex fallbacks (`var(--success-soft, #DCFCE7)` etc.) — token-first, acceptable. - Lucide icons (`Wind`, `Thermometer`, `Droplets`); no emoji; `aria-label` on `WindArrow`; `aria-hidden` on decorative skeleton/icons. - Auto-fit grid `repeat(auto-fit, minmax(220px, 1fr))` — mobile collapse ready. - Loading skeleton + error card + per-block `EmptyCard` + full empty state all present; wind fallback chain (`wind` → `weather.wind` → empty). Merging.
lekss361 merged commit 607be225b0 into main 2026-05-18 04:07:48 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lekss361/gendesign#361
No description provided.