deep-code-reviewer caught 2 critical bugs in both yandex/page.tsx (#488)
and cian/page.tsx (#486 already merged):
1. useScraperSettings types response as ScraperSetting[] but backend returns
{settings: [...]} -> .find is not a function -> settings panel never renders,
slider input never auto-populates from DB. Fix: unwrap .settings in queryFn.
2. PUT body missing required `source` field -- backend Pydantic
ScraperSettingPayload validates source==path source. Result: 422 on every
save. Fix: include {source, ...payload} in PUT body.
Plus M (non-blocking): useEffect race -- refetch every 30s clobbered user input
mid-edit. Guarded with initializedRef first-load-only flag.
Refs PR #488 review (deep-code-reviewer, 2026-05-23).
Replaces the 'В разработке' stub at /scrapers/yandex with a full page mirroring
the Avito admin pattern, adapted for the 4 Yandex scrapers landed in
PRs #453/#456/#462/#466/#467/#468 + admin endpoints from #484.
Sections:
- Global delay (top, highlighted) — GET/PUT /api/v1/admin/scraper-settings,
one knob applies to all 4 Yandex scrapers via umbrella 'yandex' key
- 1. Search around — POST /api/v1/admin/scrape with sources=['yandex'] +
multi_room_yandex / deep_yandex toggles
- 2. Detail — POST /api/v1/admin/scrape/yandex-detail?offer_url= (snapshot)
- 3. JK Newbuilding — POST /api/v1/admin/scrape/yandex-newbuilding?slug=&id=&city=
- 4. Valuation — POST /api/v1/admin/scrape/yandex-valuation?address=&offer_category=&offer_type=&page=
Skipped vs Avito: city-sweep + schedule sections — no Yandex cron/sweep job
exists yet (PR follow-up if needed).
Defaults: EKB lat 56.84 / lon 60.605, JK Tatlin (tatlin/1592987), Uchiteley 18.
TypeScript strict, reuses trade-in.css classes, TanStack Query hooks +
apiFetch. ResultPanel inlined.