Skip to content

Align GSC SearchAnalytics requests to docs, fix decay logic, add task-report endpoints/UI and tests#354

Merged
AJaySi merged 1 commit intomainfrom
codex/schedule-content-strategy-tasks-for-alwrity
Feb 14, 2026
Merged

Align GSC SearchAnalytics requests to docs, fix decay logic, add task-report endpoints/UI and tests#354
AJaySi merged 1 commit intomainfrom
codex/schedule-content-strategy-tasks-for-alwrity

Conversation

@AJaySi
Copy link
Owner

@AJaySi AJaySi commented Feb 13, 2026

Motivation

  • Ensure Search Analytics payloads conform to Google Search Console documentation to avoid malformed API calls and unstable behavior.
  • Fix an incorrect decay comparison that used a sliced 60-day window and caused unreliable period-over-period insights.
  • Provide a single, reviewable contract for issue-task reporting used by both Onboarding Step 5 and the SEO Dashboard.
  • Improve reviewer confidence by adding focused tests and a concise design-review document describing changes and rationale.

Description

  • Added a docs-aligned request builder in backend/services/gsc_service.py (_build_search_analytics_request) and constants DEFAULT_SEARCH_TYPE='web' and MAX_ROW_LIMIT=25000, and switched verification/aggregate/query calls to use it to enforce type, bounded rowLimit, non-negative startRow, and omitting dimensions for aggregate totals.
  • Fixed period-over-period logic in backend/services/gsc_task_report_service.py by adding _fetch_query_rows_range(...) and comparing equivalent windows (current 30d vs previous 30d) instead of slicing a 60d set, and implemented the GSCTaskReportService used to construct the 4 issue sections and Google query templates.
  • Integrated the task-report surface across layers: new router endpoints in backend/routers/gsc_auth.py (GET /gsc/task-reports, POST /gsc/task-reports/run), onboarding bootstrap to create/verify platform-insights tasks in backend/api/onboarding_utils/onboarding_completion_service.py, a reusable frontend panel frontend/src/components/shared/GSCTaskReportsPanel.tsx, client methods in frontend/src/api/gsc.ts, and added the panel into IntegrationsStep.tsx and SEODashboard.tsx.
  • Added a concise reviewer document docs/gsc_step5_dashboard_design_review.md summarizing design considerations, issues solved (1–4), exact code edits, and validation performed.

Testing

  • Ran unit tests: PYTHONPATH=backend pytest -q backend/services/gsc_query_request_shapes_tests.py which passed (2 passed) and produced expected warnings but no failures.
  • Performed Python compilation checks with python -m compileall on modified backend modules which completed successfully.

Codex Task

@vercel
Copy link

vercel bot commented Feb 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
alwrity-ai Canceled Canceled Feb 13, 2026 6:44am

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@AJaySi AJaySi self-assigned this Feb 13, 2026
AJaySi added a commit that referenced this pull request Feb 14, 2026
@AJaySi AJaySi merged commit 7f4a1a7 into main Feb 14, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant