Skip to content

Fixes #305#344

Closed
davideast wants to merge 1 commit into
mainfrom
batch-resolution-5860293050553752988
Closed

Fixes #305#344
davideast wants to merge 1 commit into
mainfrom
batch-resolution-5860293050553752988

Conversation

@davideast

Copy link
Copy Markdown
Collaborator

Fixes #305
Fixes #319
Fixes #320
Fixes #322
Fixes #323
Fixes #324
Fixes #325
Fixes #326
Fixes #327
Fixes #328
Fixes #329
Fixes #330
Fixes #331

label: fleet-merge-ready
milestone: 1


PR created automatically by Jules for task 5860293050553752988 started by @davideast

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions github-actions Bot added the fleet-merge-ready Ready for fleet sequential merge label Apr 23, 2026
@github-actions github-actions Bot added this to the Code Snippets milestone Apr 23, 2026
bodyContent = bodyContent.replace(/<br>/g, "<br />");
bodyContent = bodyContent.replace(/<hr([^>]*[^\/])?>/g, "<hr$1 />");
// remove unescaped script tags from body
bodyContent = bodyContent.replace(/<script\b[^>]*>[\s\S]*?<\/script\s*[^>]*>/gi, "");
if (!htmlResponse.ok) throw new Error(`HTML fetch failed: ${htmlResponse.statusText}`);
const htmlCode = await htmlResponse.text();
const htmlPath = path.join(outDir, `${targetScreen.id}.html`);
await fs.writeFile(htmlPath, htmlCode);
if (!imageResponse.ok) throw new Error(`Image fetch failed: ${imageResponse.statusText}`);
const imageBuffer = await imageResponse.arrayBuffer();
const imagePath = path.join(outDir, `${targetScreen.id}.jpeg`);
await fs.writeFile(imagePath, Buffer.from(imageBuffer));
}
}

await writeFile(join(safeOutDir, "tailwind.config.ts"), tailwindConfigCode);
bodyContent = bodyContent.replace(/<script/gi, "<div").replace(/<\/script/gi, "</div");

const pageCode = `export default function Page() {\n return (\n <>\n${bodyContent}\n </>\n );\n}\n`;
await writeFile(join(safeOutDir, "app", "page.tsx"), pageCode);


const layoutCode = `import './globals.css';\n\nexport const metadata = {\n title: 'Stitch Next.js App',\n description: 'Generated by @google/stitch-sdk',\n};\n\nexport default function RootLayout({ children }: { children: React.ReactNode }) {\n return (\n <html lang="en">\n <head>\n ${fontLinks}\n </head>\n <body>\n {children}\n </body>\n </html>\n );\n}\n`;
await writeFile(join(safeOutDir, "app", "layout.tsx"), layoutCode);
@davideast davideast closed this Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment