Files
canina/frontend/admin-panel/SEO_TRACKING_VERIFICATION.md
T

2.8 KiB

SEO tracking UI local verification

Scope: admin-panel only; no push, deployment, migration, scheduling or production writes. Reviewed specification/plan/tasks: /opt/data/engineering/canina-spec-baseline/specs/002-seo-performance-tracking/; contract: /opt/data/analytics-engine/contract.md v2. Source at start: develop 13f4fdc58dff96f192c612a8d38f33d314f70fad; unrelated .specify/evidence existed. Shared worktree backend agent changes excluded from frontend commit.

Graphify navigation query: SeoTrackingPage seoTrackingApi adminRoutes Sidebar, graph hash 6a73473cee9e207543fdeeb668bea544f766200a1b16b8a3a9ce18d4e42e51af (4304 nodes, 287 matches; truncated query). Graph SHA binding not established, therefore navigation only; direct source verified route/sidebar, API interceptor, backend global DecimalInterceptor, controller, DTO and service. Axios preserves response, server returns raw bodies, not a success/data wrapper.

Acceptance/implementation: server-driven page/search/status/sort with page reset; distinct loading/empty/error and retained stale rows after failed refetch; read cancellation and late-response guards; portal modal with labels, initial focus, inert page content, Tab wrap, Escape and focus restoration. Detail shows latest 30 stored snapshots, newest first, Tehran dates, source status/fetchedAt/period metadata. Null, unavailable and provenance-free legacy metrics never become measured zeros. Feedback is optional, requires expectedVersion, preserves snapshots and drafts after failure, rejects stale 409 save until explicit reload. Text does not claim downstream directive enforcement or live source queries.

RED: 7 UI tests failed with missing labels/sort/dialog/error handling and null metric crash (3 unhandled errors); /opt/data/cache/scratch/seo-ui-red.log. Service RED: 12 failed / 6 passed before implementation, exercised missing cancellation/version/response validation.

Final commands, all exit 0 (2026-10-28 UTC):

  • npm test -- --maxWorkers=2: 53 files, 341 tests passed, 149.46s. Includes 10 SEO interaction tests plus 21 real Axios adapter/interceptor contract tests.
  • npx tsc -p tsconfig.app.json --noEmit: passes actual application project. Root npm typecheck alone uses references and is not sufficient.
  • npm run lint: 0 errors, 147 repository warnings; no lint errors introduced.
  • npm run build: successful Vite production build.
  • git diff --check: passes before commit.

Command logs: /opt/data/cache/scratch/seo-admin-{full-tests,typecheck,lint,build}.log.

Removed three unused Sidebar icon imports that prevented application typecheck. Route/sidebar SEO entry already existed and is unchanged. Verification uses mocked network fixtures, not live API/Google data; no browser/end-to-end or deployed acceptance is asserted. Backend version/schema rollout and legacy backfill remain backend/release responsibilities.