feat(tradein): unify scraper admin pages (avito/cian/yandex) + /scrapers hub #878
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#878
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/unify-scraper-admin-pages"
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
Унификация admin-страниц скрапперов — каждая идентична через shared компонент.
Shared
<ScraperPage source>(_components/ScraperPage.tsx) — 4 одинаковые секции для каждого провайдера:{source}-city-sweep/runsтаблица со статусами + cancel, auto-refresh 5sPUT /scrape/schedules/{source}_city_sweep, next_run/last_runPUT /scraper-settings/{source}(каждый скраппер своя задержка)Новый хаб
/scrapers— глобальная задержка (scraper-settings/global) + сводная таблица всехscrape_schedules(enable/disable + next_run) + карточки провайдеров. Добавлен в Topbar («Скрапперы»).cian-cookies (DMIR_AUTH upload + test-auth) → секция внутри
/scrapers/cian; старый route теперь client-redirect.Страницы avito/cian/yandex стали тонкими врапперами.
Backend
Без изменений — endpoints
cian-city-sweep/yandex-city-sweep(+runs/cancel) уже на main (#860/#867/#868/#875).⚠️ Cian sweep требует валидный DMIR_AUTH (existing #868): при протухших куках sweep done с lots=0 (не fatal). Refresh через Cookies-секцию (#639).
Test plan
✅ APPROVE — unify scraper admin pages (avito/cian/yandex) +
/scrapershub. Deep-read всего диффа (4895 строк) через code-reviewer subagent.4 crux'а подтверждены:
(r.settings ?? []).map(s => ({...s, request_delay_sec: Number(...)}))сохранён в shared-хуке (ScraperPage.tsx:190-197). Bare-array баг не реинтродьюснут./scrape/{source}-city-sweep[/runs|/{id}/cancel],PUT /scrape/schedules/{source}_city_sweep,PUT /scraper-settings/{source},scraper-settings/global.QueryKey изоляция per-source корректна (
["city-sweep-runs", source]— нет cross-cache),refetchInterval:5000managed TanStack'ом (нет утечки interval), cancel-optimistic сохранён,anyнет. Backend не тронут, SQL/секретов/self-extending нет.Nits (не блок, не завожу — косметика/конвенция): double
scraper-sectionpadding (admin-only CSS),<a>vs<Link>(project-wide паттерн), интенциональный shared cachecian-test-auth, redirect-flash на cian-cookies shim.Мержу. (Refactor, без linked issue.)