fix(scrapers/ui): дедуп queryKey cian test-auth + a11y (Phase-1 polish) #1824

Merged
lekss361 merged 1 commit from fix/scrapers-phase1-frontend into main 2026-06-20 07:21:30 +00:00
Owner

Phase-1 polish единой scrapers-страницы (frontend-часть).

Изменения

  1. queryKey-дубль (баг)CianCookiesSection.testAuthQuery шарил queryKey ["cian-test-auth"] с авто-поллингом баннера useTestAuth() (refetchInterval 60s) → кросс-контаминация cache между авто-статусом и ручной кнопкой «Test Current Session». Ручному query дан отдельный ключ ["cian-test-auth", "manual"].
  2. a11y scope="col" — на <th> в трёх таблицах: RunsTable, RunsLogSection (ScraperPage), proxy-таблица (ProxyHealthCard).
  3. a11y табы — табы Avito/Cian/Yandex реализованы как route-навигация (<a href> на отдельные страницы), не in-page switching → применён aria-current="page" на активный link (tablist/tabpanel семантически неверны для route-нав).
  4. a11y статус-точки — цветные dot-индикаторы browser-инстансов в ProxyHealthCard получили role="img" + aria-label (статус не только цветом).

Файлы

  • tradein-mvp/frontend/src/app/scrapers/cian/page.tsx
  • tradein-mvp/frontend/src/components/scrapers/RunsTable.tsx
  • tradein-mvp/frontend/src/app/scrapers/_components/ScraperPage.tsx
  • tradein-mvp/frontend/src/components/scrapers/ProxyHealthCard.tsx
  • tradein-mvp/frontend/src/components/trade-in/Topbar.tsx

Проверка

Pre-commit (prettier/ruff/detect-private-key) — pass. tsc в worktree без node_modules не гоняется (baseline-ошибки только в untouched-файлах); в основном repo src/ чист.

Не блокеры, чисто polish. Деплой — фронт-билд (без recreate backend).

Phase-1 polish единой scrapers-страницы (frontend-часть). ## Изменения 1. **queryKey-дубль (баг)** — `CianCookiesSection.testAuthQuery` шарил queryKey `["cian-test-auth"]` с авто-поллингом баннера `useTestAuth()` (refetchInterval 60s) → кросс-контаминация cache между авто-статусом и ручной кнопкой «Test Current Session». Ручному query дан отдельный ключ `["cian-test-auth", "manual"]`. 2. **a11y `scope="col"`** — на `<th>` в трёх таблицах: `RunsTable`, `RunsLogSection` (ScraperPage), proxy-таблица (ProxyHealthCard). 3. **a11y табы** — табы Avito/Cian/Yandex реализованы как route-навигация (`<a href>` на отдельные страницы), не in-page switching → применён `aria-current="page"` на активный link (tablist/tabpanel семантически неверны для route-нав). 4. **a11y статус-точки** — цветные dot-индикаторы browser-инстансов в ProxyHealthCard получили `role="img"` + `aria-label` (статус не только цветом). ## Файлы - `tradein-mvp/frontend/src/app/scrapers/cian/page.tsx` - `tradein-mvp/frontend/src/components/scrapers/RunsTable.tsx` - `tradein-mvp/frontend/src/app/scrapers/_components/ScraperPage.tsx` - `tradein-mvp/frontend/src/components/scrapers/ProxyHealthCard.tsx` - `tradein-mvp/frontend/src/components/trade-in/Topbar.tsx` ## Проверка Pre-commit (prettier/ruff/detect-private-key) — pass. tsc в worktree без node_modules не гоняется (baseline-ошибки только в untouched-файлах); в основном repo src/ чист. Не блокеры, чисто polish. Деплой — фронт-билд (без recreate backend).
lekss361 added 1 commit 2026-06-20 07:18:38 +00:00
fix(scrapers/ui): дедуп queryKey cian test-auth + a11y (th scope, табы ARIA, статус-точки aria-label)
All checks were successful
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI / changes (pull_request) Successful in 6s
CI / openapi-codegen-check (pull_request) Has been skipped
fa65c3f212
- cian/page.tsx: отдельный queryKey ["cian-test-auth", "manual"] для ручного
  testAuthQuery в CianCookiesSection — устраняет кросс-контаминацию с автопуллингом
  useTestAuth() (refetchInterval:60s) и ручной кнопкой "Test Current Session"
- RunsTable.tsx, ScraperPage.tsx (RunsLogSection), ProxyHealthCard.tsx:
  scope="col" на все <th> в thead — соответствие WCAG SC 1.3.1 (Info and Relationships)
- Topbar.tsx: aria-current="page" на активный nav-link вместо tablist/tabpanel —
  корректный паттерн для link-based навигации между отдельными страницами
- ProxyHealthCard.tsx: role="img" + aria-label на цветовые dot-индикаторы статуса
  browser-инстансов — цвет больше не единственный носитель смысла (WCAG 1.4.1)
lekss361 merged commit 68f6dad62f into main 2026-06-20 07:21:30 +00:00
lekss361 deleted branch fix/scrapers-phase1-frontend 2026-06-20 07:21:30 +00:00
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#1824
No description provided.