feat(sf-fe-a1): routes shell — entry / analysis + _legacy/ backup + mock toggle #340
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#340
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/sf-fe-a1-routes"
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 Migration Wave 1 first sequential. Shell-only PR — placeholders для A2/A3/A4/Sections/A12.
Files
frontend/src/app/_legacy/site-finder-page-tabs.tsx— backup existing tab-based page (reference for Wave 3 section refactor)frontend/src/app/site-finder/page.tsx— NEW карта-first entry shell (MapPlaceholder + SidebarPlaceholder, TODO A2)frontend/src/app/site-finder/analysis/[cad]/page.tsx— NEW analysis shell с React 19use(params), 5 SectionPlaceholder с anchor IDssection-1..section-5(TODO A4-A11)frontend/src/lib/mock-toggle.ts—USE_MOCKSmaster env flag + per-endpoint fine-grained flags для B1-B6 progressive rolloutMock toggle
Frontend не блокирован backend — каждый endpoint имеет отдельный flag.
Visual verify
/site-finder→ header + map placeholder + sidebar placeholder/site-finder/analysis/66:41:0701045:42→ header с cad_num + 5 section placeholdersConstraints соблюдены
"use client"use(params)для Promise paramsNext
После merge → spawn Wave 2 parallel: A2 entry map + A4 sidebar (different files). A3 primitives уже spawned параллельно (
feat/sf-fe-a3-primitives).Part of plan vault
code/patterns/SiteFinder_Frontend_Migration_Plan_May18.md§A1.Deep Code Review — verdict: APPROVE
Files: 4 (P2: 2 routes, P3: 1 legacy backup + 1 lib helper) · Lines: +991/-531 · Time: ~12 min
Cross-file impact analysis
_legacy/site-finder-page-tabs.tsx— verified byte-identical to currentmain:frontend/src/app/site-finder/page.tsx(blob hash568b146f0365336b726f394918e49af1d24e961ematches on both sides). Backup is faithful, zero data loss.CadInput,FetchingState,KpiCard,OverviewTab,EnvironmentTab,LandTab,MarketTab,WeightProfilePanel,useSiteAnalysis,useDebouncedValue,useConnectionPoints,useCustomPois,POI_DEFAULT_WEIGHTS) — confirmed all 12 modules exist._legacy/is underscore-prefixed → Next.js app router correctly excludes from routing. No accidental route exposure.analysis/[cad]route — no current callers in tree (expected: future A4 will wire it). No broken links.package.json/package-lock.jsonuntouched — zero new deps confirmed.Correctness highlights
use(params)forPromise<{cad: string}>— correct Next 15 idiomsection-1..section-5literal & stable (noindexkeys, no dynamic IDs)=== "true"equality prevents string"false"evaluating truthyMOCK_*per-endpoint flags initially derive fromUSE_MOCKS— proper staged-rollout shape for B1–B6"use client"directivedangerouslySetInnerHTML, no user-controlledhref, no XSS surfaceas conston inline-style narrowing (flexWrap: "wrap" as const) — cleanVault cross-check
code/patterns/SiteFinder_Frontend_Migration_Plan_May18.md §A1— proper traceabilityBehavior at
/site-finderafter mergeHeader (← Главная · SiteFinder · карта участков) + dashed-border MapPlaceholder + sidebar with 3 placeholder cards. Old tab-based analyze UI removed from live route — users lose CadInput entry & analyze flow until A2/A4 ship. Confirmed intentional per PR body. Rollback path:
git mv _legacy/site-finder-page-tabs.tsx site-finder/page.tsxrestores prior behavior byte-for-byte.Notes (non-blocking)
MOCK_*flags equalUSE_MOCKS— no observable difference yet; pattern unlocks per-endpoint flips later. Fine._legacy/becomes dead code after Wave 3 section refactor — schedule removal in plan.Risk / reversibility
git mvMerging as squash.