feat(sf-fe-a6): Section 2 «Сети и точки подключения» — real B5 utilities data #354
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#354
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/sf-fe-a6-section2-networks"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
SF Frontend Wave 2 §A6: Section 2 «Сети и точки подключения» на analysis page. Реальные данные через
useParcelAnalyzeQuery(B5 endpointanalyze.utilities).Files
NEW
frontend/src/components/site-finder/analysis/Section2NetworksUtilities.tsx(~526 lines):"use client"— TanStack Query через existinguseParcelAnalyzeQueryUtilitiesTable: 5-column grid (icon / label /nearest_m/count_within_2km/ presence badge)substation/power_line→Zap,pipeline→Flame,water_intake→Droplet,pumping_station→Pipette, unknown →Infopower_line_охранная_зона_flag: true→AlertTriangledanger bannerHeadlineBarsubtitle auto-builds: «электричество 59 м · газ 320 м»id="section-2"для scrollspyTypes
frontend/src/lib/site-finder-api.ts:UtilitySubtype,UtilitySummaryItem,UtilitiesDatautilities?: UtilitiesData | nullнаParcelAnalyzeResponsePage wire
frontend/src/app/site-finder/analysis/[cad]/page.tsx— Section 2 placeholder →<Section2NetworksUtilities cad={cad} />Mock fixture
frontend/src/lib/mocks/parcel-analyze.json—utilitiesblock для dev (USE_MOCKS) matches prod shapeReal data flow
66:41:0204016:10→utilities.summary= substation 59m / pipeline 320m / power_line 630m66:41:0701045:42→utilities: {}→ graceful no-data stateConstraints
--bg-card,--accent, etc.) из globals.css (#353)Visual verify (post-deploy)
/site-finder/analysis/66:41:0204016:10→ Section 2 HeadlineBar + 3-row table + badges/site-finder/analysis/66:41:0701045:42→ graceful «нет данных»power_line_охранная_зона_flag: true→ red AlertTriangle bannerPart of plan vault
code/patterns/SiteFinder_Frontend_Migration_Plan_May18.md§A6.Deep Code Review — verdict APPROVE
Status: APPROVE
Files reviewed: 4 (P2: 1 page wire + 1 types + 1 mock, P3: 1 new component) +616/-6
Critical / High / Medium: none
Cross-file contract check (the key concern)
app/api/v1/parcels.py:1750literally emits"power_line_охранная_зона_flag"(snake_case + Cyrillic identifier). FrontendUtilitiesDataand the destructure inSection2NetworksUtilities.tsx:464use the same literal key. No silent feature loss.utilities = Noneon failure (parcels.py:1762), never{}. The component guard!utilities || utilities.summary.length === 0is correct —summaryis always emitted whenutilitiesobject exists (parcels.py:1748).notetypedstring | nullis slightly loose (backend always emits a non-null string in this branch), but safe.subtypeunion... | stringkeeps type-safety while covering future OSMroad_classvalues;getUtilityConfigdefault branch handles unknowns with Info icon + raw label.State machine (4 states)
isLoading→ Skeleton;isError || !data→ Error;!utilities || summary.length === 0→ NoData; otherwise → full render with optional banner + note.id="section-2"preserved in all four states — scrollspy from A4 won't break.Conventions per
.claude/rules/ui-ux.md--bg-card,--bg-card-alt,--border-card,--border-soft,--border-strong,--fg-*,--accent,--success/-soft,--warn/-soft,--danger/-soft,--viz-2,--viz-4). No raw hex.any, TanStack Query reused (no bare fetch).Lockfile / deps
package.json/package-lock.jsonchanges.lucide-react,@tanstack/react-query,HeadlineBarall pre-existing. Clean.Mock fixture
last_updated, then utilities block). 3 entries cover substation/pipeline/power_line.power_line_охранная_зона_flag: falseexercises the non-banner path; for visual smoke on banner path you'd toggle totruelocally.Nits (non-blocking, optional follow-up)
buildSubtitleonly surfaces electricity/gas/water — канализация (pumping_station) never shows in subtitle. Acceptable per design; consider extending later ifusefulfor развития._components/if reused elsewhere. Not blocking.Merging.