[PR #399] [MERGED] Centralize onboarding scheduled SEO task health endpoint and add dashboard panel #706

Closed
opened 2026-03-13 21:04:48 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AJaySi/ALwrity/pull/399
Author: @AJaySi
Created: 3/8/2026
Status: Merged
Merged: 3/9/2026
Merged by: @AJaySi

Base: mainHead: codex/implement-central-visibility-for-seo-onboarding-tasks


📝 Commits (2)

  • 936dd14 Add consolidated onboarding SEO task health API and dashboard panel
  • 6b141ee Merge branch 'main' into codex/implement-central-visibility-for-seo-onboarding-tasks

📊 Changes

5 files changed (+298 additions, -363 deletions)

View changed files

📝 backend/api/seo_dashboard.py (+40 -41)
📝 backend/app.py (+9 -1)
📝 backend/services/seo/dashboard_service.py (+123 -2)
📝 frontend/src/api/seoDashboard.ts (+40 -0)
📝 frontend/src/components/SEODashboard/SEODashboard.tsx (+86 -319)

📄 Description

Motivation

  • Provide a single source of truth for the health/status of onboarding-scheduled SEO jobs and avoid duplicated DB/query logic across endpoints while exposing a concise UI surface for operators.
  • Surface the four onboarding tasks (full website audit, deep competitor analysis, SIF indexing, market trends) in a single, actionable panel on the SEO dashboard.

Description

  • Added SEODashboardService.get_onboarding_scheduled_task_health(...) with helpers _get_single_task_health(...) and _summarize_execution_result(...) to consolidate status, next_execution, last_success, last_failure, consecutive_failures, and a latest execution log summary for the four onboarding task models (OnboardingFullWebsiteAnalysisTask, DeepCompetitorAnalysisTask, SIFIndexingTask, MarketTrendsTask) in backend/services/seo/dashboard_service.py.
  • Added a new API handler get_onboarding_task_health(...) and exposed route GET /api/seo-dashboard/onboarding-task-health in backend/api/seo_dashboard.py and wired it into the app in backend/app.py so callers can fetch the unified task health payload.
  • Refactored get_sif_indexing_health(...) to reuse the new centralized service method instead of running its own duplicate queries and to return a consistent task/last_run structure.
  • Frontend changes include new TypeScript types and a getOnboardingTaskHealth(...) client call in frontend/src/api/seoDashboard.ts, and UI updates in frontend/src/components/SEODashboard/SEODashboard.tsx to fetch the consolidated task health, render a single “Onboarding Scheduled SEO Tasks” panel listing all four tasks, and align status chips and actionable copy for statuses: active, failed, paused, needs_intervention, and not_scheduled.
  • Removed the previous per-SIF drawer behavior and consolidated scheduler visibility into the new panel while keeping backward-compatible dashboard overview flows.

Testing

  • Ran Python static compile check with python -m py_compile backend/services/seo/dashboard_service.py backend/api/seo_dashboard.py backend/app.py, which completed successfully.
  • Attempted frontend build with cd frontend && npm run -s build, which failed in this environment due to missing react-scripts (environment dependency issue), so the production frontend build was not validated here.
  • Attempted an automated Playwright screenshot to validate the UI, but the frontend server was not running (http://localhost:3000 returned an empty response), so UI runtime verification could not be captured in this environment.

Codex Task


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AJaySi/ALwrity/pull/399 **Author:** [@AJaySi](https://github.com/AJaySi) **Created:** 3/8/2026 **Status:** ✅ Merged **Merged:** 3/9/2026 **Merged by:** [@AJaySi](https://github.com/AJaySi) **Base:** `main` ← **Head:** `codex/implement-central-visibility-for-seo-onboarding-tasks` --- ### 📝 Commits (2) - [`936dd14`](https://github.com/AJaySi/ALwrity/commit/936dd14e0d5b1190a104748e460561db462a1aa0) Add consolidated onboarding SEO task health API and dashboard panel - [`6b141ee`](https://github.com/AJaySi/ALwrity/commit/6b141ee5540dec5a54f09475800c5a20e60fddd9) Merge branch 'main' into codex/implement-central-visibility-for-seo-onboarding-tasks ### 📊 Changes **5 files changed** (+298 additions, -363 deletions) <details> <summary>View changed files</summary> 📝 `backend/api/seo_dashboard.py` (+40 -41) 📝 `backend/app.py` (+9 -1) 📝 `backend/services/seo/dashboard_service.py` (+123 -2) 📝 `frontend/src/api/seoDashboard.ts` (+40 -0) 📝 `frontend/src/components/SEODashboard/SEODashboard.tsx` (+86 -319) </details> ### 📄 Description ### Motivation - Provide a single source of truth for the health/status of onboarding-scheduled SEO jobs and avoid duplicated DB/query logic across endpoints while exposing a concise UI surface for operators. - Surface the four onboarding tasks (full website audit, deep competitor analysis, SIF indexing, market trends) in a single, actionable panel on the SEO dashboard. ### Description - Added `SEODashboardService.get_onboarding_scheduled_task_health(...)` with helpers `_get_single_task_health(...)` and `_summarize_execution_result(...)` to consolidate status, `next_execution`, `last_success`, `last_failure`, `consecutive_failures`, and a latest execution log summary for the four onboarding task models (`OnboardingFullWebsiteAnalysisTask`, `DeepCompetitorAnalysisTask`, `SIFIndexingTask`, `MarketTrendsTask`) in `backend/services/seo/dashboard_service.py`. - Added a new API handler `get_onboarding_task_health(...)` and exposed route `GET /api/seo-dashboard/onboarding-task-health` in `backend/api/seo_dashboard.py` and wired it into the app in `backend/app.py` so callers can fetch the unified task health payload. - Refactored `get_sif_indexing_health(...)` to reuse the new centralized service method instead of running its own duplicate queries and to return a consistent task/last_run structure. - Frontend changes include new TypeScript types and a `getOnboardingTaskHealth(...)` client call in `frontend/src/api/seoDashboard.ts`, and UI updates in `frontend/src/components/SEODashboard/SEODashboard.tsx` to fetch the consolidated task health, render a single “Onboarding Scheduled SEO Tasks” panel listing all four tasks, and align status chips and actionable copy for statuses: `active`, `failed`, `paused`, `needs_intervention`, and `not_scheduled`. - Removed the previous per-SIF drawer behavior and consolidated scheduler visibility into the new panel while keeping backward-compatible dashboard overview flows. ### Testing - Ran Python static compile check with `python -m py_compile backend/services/seo/dashboard_service.py backend/api/seo_dashboard.py backend/app.py`, which completed successfully. - Attempted frontend build with `cd frontend && npm run -s build`, which failed in this environment due to missing `react-scripts` (environment dependency issue), so the production frontend build was not validated here. - Attempted an automated Playwright screenshot to validate the UI, but the frontend server was not running (`http://localhost:3000` returned an empty response), so UI runtime verification could not be captured in this environment. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_69abc218c5c88328b9710e5e992329b6) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-13 21:04:48 +03:00
Sign in to join this conversation.
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
starred/ALwrity#706
No description provided.