[PR #427] Fix SEO dashboard overview URL resolution and audit empty states #732

Open
opened 2026-03-13 21:06:25 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AJaySi/ALwrity/pull/427
Author: @AJaySi
Created: 3/12/2026
Status: 🔄 Open

Base: mainHead: codex/refactor-seodashboard-site-url-handling


📝 Commits (1)

  • 430d5eb Fix SEO dashboard site URL resolution and empty audit states

📊 Changes

1 file changed (+55 additions, -21 deletions)

View changed files

📝 frontend/src/components/SEODashboard/SEODashboard.tsx (+55 -21)

📄 Description

Motivation

  • Prevent querying the backend with an incorrect hardcoded site URL and let the backend derive the truth-of-record (onboarding SSOT), and make the audit UI show clear states when the site is not configured or has no audited pages.

Description

  • Remove the hardcoded https://alwrity.com fallback and initialize websiteUrl as null in the dashboard data loader.
  • Call /api/seo-dashboard/overview without a site_url param by default and only pass site_url when an explicit selectedSiteUrl is present, avoiding wrong-site queries.
  • Resolve site URL in priority order: response.data.website_url from the overview response, then the authenticated userDataAPI.getWebsiteURL() fallback, otherwise remain unconfigured.
  • Update technical audit empty-state alerts to present the clearer messages: Audit scheduled, No pages audited yet, and Site not configured.

Testing

  • Attempted lint via npm run eslint but the project has no eslint script so the lint step could not run in this environment.
  • Attempted build via npm run build but the build failed due to missing react-scripts/frontend dependencies in the environment.
  • Attempted tests via npm test but test execution failed because react-scripts is not available here.
  • Attempted a Playwright screenshot of http://localhost:3000/seo-dashboard which failed with ERR_EMPTY_RESPONSE because the frontend server was not running 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/427 **Author:** [@AJaySi](https://github.com/AJaySi) **Created:** 3/12/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `codex/refactor-seodashboard-site-url-handling` --- ### 📝 Commits (1) - [`430d5eb`](https://github.com/AJaySi/ALwrity/commit/430d5ebccd95743c6f7fb7b078f2574d7520f8e8) Fix SEO dashboard site URL resolution and empty audit states ### 📊 Changes **1 file changed** (+55 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/SEODashboard/SEODashboard.tsx` (+55 -21) </details> ### 📄 Description ### Motivation - Prevent querying the backend with an incorrect hardcoded site URL and let the backend derive the truth-of-record (onboarding SSOT), and make the audit UI show clear states when the site is not configured or has no audited pages. ### Description - Remove the hardcoded `https://alwrity.com` fallback and initialize `websiteUrl` as `null` in the dashboard data loader. - Call `/api/seo-dashboard/overview` without a `site_url` param by default and only pass `site_url` when an explicit `selectedSiteUrl` is present, avoiding wrong-site queries. - Resolve site URL in priority order: `response.data.website_url` from the overview response, then the authenticated `userDataAPI.getWebsiteURL()` fallback, otherwise remain unconfigured. - Update technical audit empty-state alerts to present the clearer messages: `Audit scheduled`, `No pages audited yet`, and `Site not configured`. ### Testing - Attempted lint via `npm run eslint` but the project has no `eslint` script so the lint step could not run in this environment. - Attempted build via `npm run build` but the build failed due to missing `react-scripts`/frontend dependencies in the environment. - Attempted tests via `npm test` but test execution failed because `react-scripts` is not available here. - Attempted a Playwright screenshot of `http://localhost:3000/seo-dashboard` which failed with `ERR_EMPTY_RESPONSE` because the frontend server was not running in this environment. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_69b26c1917548328a0211e2745440595) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#732
No description provided.