[PR #316] [MERGED] Add per-page onboarding image generation and persist images in intake cache #618

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

📋 Pull Request Information

Original PR: https://github.com/AJaySi/ALwrity/pull/316
Author: @AJaySi
Created: 2/4/2026
Status: Merged
Merged: 2/4/2026
Merged by: @AJaySi

Base: mainHead: codex/add-per-page-image-generation-buttons


📝 Commits (1)

  • 379e5f9 Add onboarding page image generation

📊 Changes

7 files changed (+298 additions, -13 deletions)

View changed files

backend/api/onboarding_utils/website_automation_service.py (+31 -0)
backend/services/onboarding/website_intake_service.py (+33 -0)
backend/services/website_automation_service.py (+42 -0)
📝 frontend/src/components/OnboardingWizard/BusinessDescriptionStep.tsx (+2 -2)
📝 frontend/src/components/OnboardingWizard/FinalStep/FinalStep.tsx (+156 -5)
📝 frontend/src/components/OnboardingWizard/WebsiteStep.tsx (+18 -0)
📝 frontend/src/services/onboardingCache.ts (+16 -6)

📄 Description

Motivation

  • Enable generation and preview of AI‑generated hero images for key website pages during onboarding and ensure those images travel with the intake data for site generation and previews.
  • Persist page images and the website intake context in the frontend cache so downstream rendering and deployment helpers can include imagery in generated HTML/markdown.

Description

  • Frontend: extended frontend/src/services/onboardingCache.ts with PageImages and WebsiteIntakeCache types and persisted step2 shape; WebsiteStep.tsx now saves website/analysis/business info into the onboarding cache on continue; BusinessDescriptionStep.tsx loads cached business info with typed access.
  • Frontend: added per‑page image generation UI to frontend/src/components/OnboardingWizard/FinalStep/FinalStep.tsx, integrating ImageGeneratorModal, building defaultPrompt from intake, previewing generated images, and saving page_images to the onboarding cache.
  • Backend: added backend/services/onboarding/website_intake_service.py to normalize intake and include page_images in built site_brief, backend/services/website_automation_service.py to inject <img> tags and set og:image when rendering pages, and backend/api/onboarding_utils/website_automation_service.py to prepend page images into markdown outputs for deployment.
  • Misc: cleaned up unused imports in FinalStep.tsx and wired cache usage across the onboarding flow so page image generation has context.

Testing

  • Launched the frontend dev server with npm start to sanity‑check the UI wiring and the dev server started successfully; no automated unit/integration tests were executed.
  • Attempted an automated Playwright screenshot of the onboarding page, but the Playwright run timed out and the screenshot step failed. No visual artifact was produced.
  • No other automated tests were run as part of this rollout.

Codex Task


Note

Medium Risk
Adds new onboarding data fields and injects base64 images into generated HTML/markdown, which can impact payload size and rendering/SEO meta behavior if malformed or large.

Overview
Adds per-page image generation to the onboarding Final Step (Home/About/Contact/Products) with preview, prompt auto-fill from cached website/business analysis, and persistence of page_images into the step-2 onboarding cache.

Extends the step-2 cache shape (WebsiteIntakeCache) and updates Step 2/Business Description flows to consistently save/load website URL, analysis, business info, and page_images. On the backend, introduces helpers to propagate page_images into the normalized site_brief and to inject these images into rendered HTML (including og:image) and prepend them to generated markdown outputs.

Written by Cursor Bugbot for commit 379e5f954c. Configure here.


🔄 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/316 **Author:** [@AJaySi](https://github.com/AJaySi) **Created:** 2/4/2026 **Status:** ✅ Merged **Merged:** 2/4/2026 **Merged by:** [@AJaySi](https://github.com/AJaySi) **Base:** `main` ← **Head:** `codex/add-per-page-image-generation-buttons` --- ### 📝 Commits (1) - [`379e5f9`](https://github.com/AJaySi/ALwrity/commit/379e5f954c6a6bd3f0861c052e765ac76bf8183d) Add onboarding page image generation ### 📊 Changes **7 files changed** (+298 additions, -13 deletions) <details> <summary>View changed files</summary> ➕ `backend/api/onboarding_utils/website_automation_service.py` (+31 -0) ➕ `backend/services/onboarding/website_intake_service.py` (+33 -0) ➕ `backend/services/website_automation_service.py` (+42 -0) 📝 `frontend/src/components/OnboardingWizard/BusinessDescriptionStep.tsx` (+2 -2) 📝 `frontend/src/components/OnboardingWizard/FinalStep/FinalStep.tsx` (+156 -5) 📝 `frontend/src/components/OnboardingWizard/WebsiteStep.tsx` (+18 -0) 📝 `frontend/src/services/onboardingCache.ts` (+16 -6) </details> ### 📄 Description ### Motivation - Enable generation and preview of AI‑generated hero images for key website pages during onboarding and ensure those images travel with the intake data for site generation and previews. - Persist page images and the website intake context in the frontend cache so downstream rendering and deployment helpers can include imagery in generated HTML/markdown. ### Description - Frontend: extended `frontend/src/services/onboardingCache.ts` with `PageImages` and `WebsiteIntakeCache` types and persisted `step2` shape; `WebsiteStep.tsx` now saves website/analysis/business info into the onboarding cache on continue; `BusinessDescriptionStep.tsx` loads cached business info with typed access. - Frontend: added per‑page image generation UI to `frontend/src/components/OnboardingWizard/FinalStep/FinalStep.tsx`, integrating `ImageGeneratorModal`, building `defaultPrompt` from intake, previewing generated images, and saving `page_images` to the onboarding cache. - Backend: added `backend/services/onboarding/website_intake_service.py` to normalize intake and include `page_images` in built `site_brief`, `backend/services/website_automation_service.py` to inject `<img>` tags and set `og:image` when rendering pages, and `backend/api/onboarding_utils/website_automation_service.py` to prepend page images into markdown outputs for deployment. - Misc: cleaned up unused imports in `FinalStep.tsx` and wired cache usage across the onboarding flow so page image generation has context. ### Testing - Launched the frontend dev server with `npm start` to sanity‑check the UI wiring and the dev server started successfully; no automated unit/integration tests were executed. - Attempted an automated Playwright screenshot of the onboarding page, but the Playwright run timed out and the screenshot step failed. No visual artifact was produced. - No other automated tests were run as part of this rollout. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_6982bfc6aa348328970d71e7e2625758) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Adds new onboarding data fields and injects base64 images into generated HTML/markdown, which can impact payload size and rendering/SEO meta behavior if malformed or large. > > **Overview** > Adds per-page image generation to the onboarding *Final Step* (Home/About/Contact/Products) with preview, prompt auto-fill from cached website/business analysis, and persistence of `page_images` into the step-2 onboarding cache. > > Extends the step-2 cache shape (`WebsiteIntakeCache`) and updates Step 2/Business Description flows to consistently save/load website URL, analysis, business info, and `page_images`. On the backend, introduces helpers to propagate `page_images` into the normalized `site_brief` and to inject these images into rendered HTML (including `og:image`) and prepend them to generated markdown outputs. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 379e5f954c6a6bd3f0861c052e765ac76bf8183d. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-13 21:00:13 +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#618
No description provided.