Skip to content

fix(target-astro): start the render server before the first test - #229

Draft
alexgrozav wants to merge 5 commits into
mainfrom
astro-render-boot-uxf-916
Draft

alexgrozav wants to merge 5 commits into
mainfrom
astro-render-boot-uxf-916

Conversation

@alexgrozav

@alexgrozav alexgrozav commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

What changed

The Astro browser project now starts its render server when Vitest configures the project, not on the first render. No other framework's output or tests change.

astroBrowserRef(context) gets the toolchain context from vite("browser", context). Its configureVitest hook starts the server for that root, with the project's plugins. The first render waits for the same server, so no render starts a second one.

hydrate:astro uses the same root, so it shares that server. If the start fails, the first render fails with the start's error, as it did before. Outside Vitest, as in the preview (ADR-0088), the hook never runs. There, the server still starts on the first render.

Why

In a full local run, the first test of each Astro spec file in the first wave took 50 to 64 s, and several passed the 60 s timeout. Each one waited in the render queue while the first render started the server.

Inside the busy follower group, the server's import("astro/container") took 42 to 75 s through Vite's SSR module runner. Run alone, it takes 0.2 s.

Where ufAstroRender's time went, measured on main with a local timing probe that this PR doesn't include:

Step Alone (browser:vue + browser:astro) Full run 1 Full run 2 Full run on this PR
boot.createServer 0.08 s 5.9 s 4.5 s 1.2 s
boot.importContainer 0.21 s 74.6 s 41.7 s 2.6 s
Longest wait in the render queue 0.33 s 81.7 s 47.5 s 7.8 s
Slowest Astro test 1.4 s 64.2 s (timed out) 58.8 s 10.1 s
Astro test files that failed 0 20 0 0

On this PR, the server finished starting 130 s before the first Astro render, during group 0. No render waited for it.

Three more full local runs on this PR passed every test file. Their slowest Astro tests took 8.7, 11.3 and 9.6 s. Two other runs broke before most Astro tests ran: whole projects failed to import the testing setup file, or a tester page never loaded. A run on main broke the same way, so this PR doesn't cause it.

Checklist

  • The title follows Conventional Commits, as in feat(web): sell the next framework on the homepage.
  • pnpm format:check, pnpm lint, pnpm check-types and pnpm test pass.
  • Changes to a published package: a changeset from pnpm changeset (see .changeset/README.md).
  • Homepage changes: pnpm build, then pnpm --filter web lighthouse, still scores at least 0.95 in every category.

The full repository loop didn't run. These checks did: the tests of target-astro and every package that depends on it, target-astro's types, lint and format on the changed files, the L7 canary and full local integration runs.

alexgrozav and others added 2 commits November 20, 2026 23:09
… browser project

Co-authored-by: multica-agent <github@multica.ai>
…geset

Co-authored-by: multica-agent <github@multica.ai>
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Visual report: ✓ passed

3 examples on 7 targets. Pixels: live, compared with the reference's capture in this run. Reference: vue. Commit 8c6c651.

Example react vue (reference) svelte solid angular qwik astro
examples/Buttons ✓ matched, 0 px ✓ published-reference ✓ matched, 0 px ✓ matched, 0 px ✓ matched, 0 px ✓ matched, 0 px ✓ matched, 0 px
examples/Card ✓ matched, 0 px ✓ published-reference ✓ matched, 0 px ✓ matched, 0 px ✓ matched, 0 px ✓ matched, 0 px ✓ matched, 0 px
examples/TextField ✓ matched, 0 px ✓ published-reference ✓ matched, 0 px ✓ matched, 0 px ✓ matched, 0 px ✓ matched, 0 px ✓ matched, 0 px

The run uploaded the full report as the design-system-visual artefact, kept for 7 days. Download it, unzip it and open report.html.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://astro-render-boot-uxf-916.unframework.dev, https://astro-render-boot-uxf-916-unframework.uxfront.workers.dev (commit 8c6c651)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://4a6cc4bd.unframework.dev, https://4a6cc4bd-unframework.uxfront.workers.dev 8c6c651 2026-11-25T21:46:19.931Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://1fd45163.unframework.dev, https://1fd45163-unframework.uxfront.workers.dev 322d9ac 2026-11-25T06:14:16.003Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://c623c970.unframework.dev, https://c623c970-unframework.uxfront.workers.dev 1e0f0e3 2026-11-24T15:15:34.626Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://89f7e0f2.unframework.dev, https://89f7e0f2-unframework.blue-water-0397.workers.dev 5872f7f 2026-11-20T22:12:14.622Z Visit the dashboard ↗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant