Skip to content

build(sandbox): migrate static export from Next to Vite - #6627

Merged
cixzhang merged 5 commits into
mainfrom
feat/sandbox-vite-static
Sep 25, 2026
Merged

cixzhang merged 5 commits into
mainfrom
feat/sandbox-vite-static

Conversation

@cixzhang

@cixzhang cixzhang commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Maintainer impact

Replace the separate Sandbox Next 15 static export with adapter-free Vite so the existing docsite Vercel Preview can stage it as a plain static tree alongside Storybook. This base PR changes Sandbox only; the docsite wiring and exact-head links are in the dependent #6601.

Intended invariant

Preserve the original 767 application paths plus /404/ at both / and /sandbox/, including layouts, metadata, navigation, theme behavior, component-audit fallback, public/template assets, fullscreen embeds, and real 404 behavior.

Change

  • Generate the route inventory from authored pages and generated template wrappers, prerender each page into physical HTML, hydrate with React Router, and emit 70 standalone embed documents. No SPA fallback masks missing routes.
  • Reuse Astryx Vite/StyleX integration and preserve the optional public component-audit snapshot and browser fallback.
  • Run the same template generator before clean-checkout Node tests; assert every typed template has a physical wrapper and exact route. Preserve all six previously unmapped ScrollableArea block IDs in the public CLI doc-route inventory.
  • Repair a docsite browser assertion that mistook a temporarily detached preview iframe for a fresh replacement; it now waits for an attached frame bearing a new trusted nonce.

Verification

  • Root and /sandbox/ Vite exports preserve all 768 original HTML paths and 70 embeds. Local combined docsite Preview HTTP checks covered every route/embed; nested routes, component audit, JS/CSS, template images, and unknown-route 404 were verified. The dependent ci: stage Vite Sandbox alongside Storybook in docsite previews #6601 has an exact-head live Vercel Preview with both static trees.
  • Clean-checkout Node tests were reproduced red, then passed green after generator/inventory repair. Sandbox tests (31), typecheck, full workspace build, repository guards, lint, and targeted browser assertion checks passed locally. The macOS worker cannot launch Chromium because of host permissions, so the authoritative browser proof is Linux CI.
  • Linux CI run https://github.com/facebook/astryx/actions/runs/36099293680 completed successfully, including test-node, docsite-browser, docsite-test, visual, accessibility, and builds. Independent read-only review found no remaining base defect.
  • No generated output is committed; production release docs and public URLs remain unchanged by this base PR.

Scope

  • No intended public API, product behavior, visual direction, or policy change.
  • Public text contains no private operational context.

@vercel

vercel Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Sep 25, 2026 5:41am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 25, 2026
@astracat-bot

astracat-bot Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🔄 In progress (for maintainers only) Sep 25, 2026, 6:04 AM UTC

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Preview availability: Storybook is not ready on the exact-head Vercel preview. Sandbox is unavailable because CI concluded failure.

No new or modified components detected.

Bundle Size Summary

No component packages changed.

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

25 of 420 shot(s) changed. View the report

A change here is a question, not a failure: check whether the after is the
picture you intended. Record that review on the PR. Baseline maintenance is an
explicit dispatch of CI; this report never rewrites the baseline or adds a release gate.

component story theme mode pixels
Chat Full AI Chat probe light 42,708
Chat Empty State probe light 42,708
Chat Full AI Chat probe dark 41,786
Chat Empty State probe dark 41,786
Slider Default probe light 15,617
Slider Default probe dark 15,615
Chat With Attachments probe light 12,964
Chat With Attachments probe dark 12,114
InputGroup With Typeahead probe light 11,012
InputGroup With Typeahead probe dark 9,189
ComplexSelector Tree list with search probe light 6,245
TextArea Vertical Form Alignment probe light 5,634
ComplexSelector Tree list with search probe dark 5,602
TextArea Vertical Form Alignment probe dark 5,047
ComplexSelector Fruit ripeness selector neutral light 4,007
ComplexSelector Fruit ripeness selector neutral dark 3,825
ToggleButton Group Single probe dark 1,538
ToggleButton Group Single probe light 1,538
MediaTheme On Dark neutral dark 838
Banner Collapsible Content (Expanded) probe dark 92

and 5 more.

Chat — Full AI Chat — probe light
BeforeAfterDiff
Before visual regression frame After visual regression frame Pixel difference frame
Chat — Empty State — probe light
BeforeAfterDiff
Before visual regression frame After visual regression frame Pixel difference frame
Chat — Full AI Chat — probe dark
BeforeAfterDiff
Before visual regression frame After visual regression frame Pixel difference frame

Generated by PR Enrichment workflow | View full report

github-actions Bot added a commit that referenced this pull request Sep 25, 2026
@cixzhang
cixzhang marked this pull request as ready for review September 25, 2026 06:04
@cixzhang
cixzhang merged commit 7210f0d into main Sep 25, 2026
46 checks passed
github-actions Bot added a commit that referenced this pull request Sep 25, 2026
@github-actions
github-actions Bot deleted the feat/sandbox-vite-static branch September 25, 2026 06:24
sangwook-dev added a commit to sangwook-dev/astryx that referenced this pull request Sep 25, 2026
…DE_PATH

After meta#5327 made node_modules strict, packages/build/src/next.test.mjs kept
resolving enhanced-resolve (meta#5932) without a declaration: it arrives only
transitively through next, and pnpm's vitest shim puts
node_modules/.pnpm/node_modules on NODE_PATH, which require folds in. Run
without it, the test fails with MODULE_NOT_FOUND.

Declare it as a build dev dependency at the version the lockfile already
carries, so the lockfile gains an importer entry and no new package
versions.

The other two requires this commit first declared are covered elsewhere:
meta#6605 has ./postcss let the host's postcss parse its CSS, and meta#6627
removed the sandbox's next.config.mjs.

This branch was successfully deployed

1 active deployment
Preview — 36f84a7b Deployed Sep 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant