feat(sf-fe-a7): Section 3.1 «Настройки выборки» + Server/Client split #355

Closed
lekss361 wants to merge 2 commits from feat/sf-fe-a7-section3-1-settings into main
Owner

Summary

SF Frontend Wave 3 §A7: Section 3.1 «Настройки выборки» в Section 3 «Продажи конкурентов» wrapper. Параллельно — split [cad]/page.tsx на Server (metadata + Suspense) + AnalysisPageContent.tsx (Client с TanStack Query) для будущего SEO + SSR streaming.

Files

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

  • Section 3 wrapper id="section-3" с HeadlineBar + competitor count
  • Sub-section 3.1 id="section-3-1" «Настройки выборки»:
    • Radius slider 1-5 км (default 2 км)
    • 4 chips: «Только строящиеся» / «+3 мес срок» / «-6 мес от сегодня» / «Только квартиры» (aria-pressed)
    • Reuse <WeightProfilePanel/> (existing) — POI weights tuning
  • Sub-sections 3.2 / 3.3 — dashed placeholders (ждут A8)

Refactor frontend/src/app/site-finder/analysis/[cad]/page.tsx → Server Component:

  • generateMetadata для SEO
  • Wraps <AnalysisPageContent cad={cad}/> в <Suspense/>
  • decodeURIComponent(cad) preserved

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

  • "use client" для TanStack + scrollspy
  • Imports canonical useParcelAnalyzeQuery из @/lib/site-finder-api (NOT duplicate hook)
  • Wires Section 1 (<Section1ParcelInfo/>) — preserve A5 #346
  • Wires Section 2 (<Section2NetworksUtilities/>) — preserve A6 #354
  • Wires Section 3 (<Section3SettingsAndCompetitors/>) — new
  • Sections 4 + 5 — placeholders (TODO A10/A11)

Fixup commit 9065cca: restore Section1+2 wiring + delete duplicate frontend/src/hooks/useParcelAnalyzeQuery.ts (canonical в lib/site-finder-api.ts:302)

Real data

  • useParcelAnalyzeQuery (B5 endpoint) — реальные данные
  • Filters пока влияют только на frontend client-side через apply на existing score_breakdown (B6 extension — later PR)
  • НЕТ mock fallback в prod codepath

Constraints

  • TS strict, server/client split правильно annotated
  • TanStack Query reuse
  • Real backend data
  • CSS tokens из globals.css
  • pre-commit prettier + lint pass
  • Sections 1+2 preserved (no regression)

Verify post-deploy

  • /site-finder/analysis/66:41:0204016:10 — Section 3 HeadlineBar + 3.1 radius slider + chips + weight panel; Sections 1+2 рендерятся как раньше
  • Toggle chips → aria-pressed updates
  • Radius slider → competitor count в headline bar updates live

Part of plan vault code/patterns/SiteFinder_Frontend_Migration_Plan_May18.md §A7.

## Summary SF Frontend Wave 3 §A7: Section 3.1 «Настройки выборки» в Section 3 «Продажи конкурентов» wrapper. Параллельно — split `[cad]/page.tsx` на Server (metadata + Suspense) + `AnalysisPageContent.tsx` (Client с TanStack Query) для будущего SEO + SSR streaming. ## Files **NEW** `frontend/src/components/site-finder/analysis/Section3SettingsAndCompetitors.tsx`: - Section 3 wrapper `id="section-3"` с HeadlineBar + competitor count - Sub-section 3.1 `id="section-3-1"` «Настройки выборки»: - Radius slider 1-5 км (default 2 км) - 4 chips: «Только строящиеся» / «+3 мес срок» / «-6 мес от сегодня» / «Только квартиры» (aria-pressed) - Reuse `<WeightProfilePanel/>` (existing) — POI weights tuning - Sub-sections 3.2 / 3.3 — dashed placeholders (ждут A8) **Refactor** `frontend/src/app/site-finder/analysis/[cad]/page.tsx` → Server Component: - `generateMetadata` для SEO - Wraps `<AnalysisPageContent cad={cad}/>` в `<Suspense/>` - `decodeURIComponent(cad)` preserved **NEW** `frontend/src/app/site-finder/analysis/[cad]/AnalysisPageContent.tsx`: - `"use client"` для TanStack + scrollspy - Imports canonical `useParcelAnalyzeQuery` из `@/lib/site-finder-api` (NOT duplicate hook) - Wires Section 1 (`<Section1ParcelInfo/>`) — preserve A5 #346 - Wires Section 2 (`<Section2NetworksUtilities/>`) — preserve A6 #354 - Wires Section 3 (`<Section3SettingsAndCompetitors/>`) — new - Sections 4 + 5 — placeholders (TODO A10/A11) **Fixup commit** `9065cca`: restore Section1+2 wiring + delete duplicate `frontend/src/hooks/useParcelAnalyzeQuery.ts` (canonical в `lib/site-finder-api.ts:302`) ## Real data - `useParcelAnalyzeQuery` (B5 endpoint) — реальные данные - Filters пока влияют только на frontend client-side через apply на existing `score_breakdown` (B6 extension — later PR) - НЕТ mock fallback в prod codepath ## Constraints - ✅ TS strict, server/client split правильно annotated - ✅ TanStack Query reuse - ✅ Real backend data - ✅ CSS tokens из globals.css - ✅ pre-commit prettier + lint pass - ✅ Sections 1+2 preserved (no regression) ## Verify post-deploy - `/site-finder/analysis/66:41:0204016:10` — Section 3 HeadlineBar + 3.1 radius slider + chips + weight panel; Sections 1+2 рендерятся как раньше - Toggle chips → `aria-pressed` updates - Radius slider → competitor count в headline bar updates live Part of plan vault `code/patterns/SiteFinder_Frontend_Migration_Plan_May18.md` §A7.
lekss361 added 2 commits 2026-05-18 00:49:36 +00:00
lekss361 closed this pull request 2026-05-18 00:50:33 +00:00
Some checks failed
CI / backend (pull_request) Failing after 41s
CI / frontend (pull_request) Failing after 1m24s

Pull request closed

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#355
No description provided.