feat(webpage): add AI landing page generation with preview#23
Open
ram-from-tvl wants to merge 2 commits into
Open
feat(webpage): add AI landing page generation with preview#23ram-from-tvl wants to merge 2 commits into
ram-from-tvl wants to merge 2 commits into
Conversation
ram-from-tvl
force-pushed
the
feature/webpage-ai-landing
branch
from
April 4, 2026 01:26
4d8475e to
cd31625
Compare
There was a problem hiding this comment.
Pull request overview
Adds an end-to-end “AI landing page” feature that generates a single polished HTML research webpage per run, exposes it via backend endpoints (generate/list/preview/download/assets), and provides a simplified frontend UI with live preview + HTML download.
Changes:
- Backend: added webpage generation service (Gemini prompt + validation/repair), plus API routes for generate/list/preview/download and figure asset serving.
- Frontend: added a new “Webpage Generation” page with viewport preview controls and a Download HTML action, plus API client methods.
- App wiring: added route and sidebar entry for the new page and created a temp directory for webpage outputs.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/services/api.js | Adds WebpageService + ApiService helpers for generate/list/preview/download. |
| frontend/src/pages/WebpageGeneration.jsx | New UI for generate, live preview iframe, and HTML download. |
| frontend/src/components/navigation/Sidebar.jsx | Adds sidebar nav item for the new feature. |
| frontend/src/App.jsx | Registers /webpage-generation route behind ProtectedRoute. |
| backend/app/services/webpage_generator.py | Implements Gemini prompting, validation/repair, and variant persistence. |
| backend/app/routes/webpage.py | Adds generate/list/preview/download/asset endpoints. |
| backend/app/models/request_models.py | Adds request/response models for webpage generation and variants. |
| backend/app/main.py | Includes the new router and creates temp/webpages dir at startup. |
Comments suppressed due to low confidence (1)
frontend/src/components/navigation/Sidebar.jsx:78
Webpage Generationis added withstep: 0andhandleLinkClickcallssetStep(0). After this, other navigation items become inaccessible becauseisAccessiblerequiresstep <= currentStep(andcurrentStepis now 0), effectively locking the user out of the main workflow unless steps were already completed. Consider decoupling this page from the step-gated workflow (e.g., omitstep/setStepfor this item, or assign it a step number that doesn’t break gating and adjustisAccessibleaccordingly).
const navigationItems = [
{ to: '/api-setup', icon: FiKey, label: 'API Setup', step: 1 },
{ to: '/paper-processing', icon: FiUpload, label: 'Paper Upload', step: 2 },
{ to: '/script-generation', icon: FiEdit3, label: 'Script Generation', step: 3 },
{ to: '/slide-creation', icon: FiSliders, label: 'Slide Creation', step: 4 },
{ to: '/media-generation', icon: FiPlay, label: 'Media Generation', step: 5 },
{ to: '/poster', icon: FiZap, label: 'Poster Generation', step: 6 },
{ to: '/results', icon: FiDownload, label: 'Results', step: 7 },
{ to: '/webpage-generation', icon: FiGlobe, label: 'Webpage Generation', step: 0 },
];
const handleLinkClick = (step) => {
if (step === 0 || step <= currentStep || completedSteps.includes(step)) {
setStep(step);
disableAutoProgress();
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Author
|
Hi @RahulSundar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This update introduces an end-to-end webpage generation feature that creates a polished, AI-generated landing page from parsed paper content. The output is focused on clear paper highlights, figure visibility, and repository/resource links, with adaptive structure based on paper content.
Demo video
saral-webpage-demo-1_ym2wvnQd.mp4
Key improvements: