chore: add SDK route infrastructure and parity tests#773
Conversation
Introduce the variant type system, Astro component wrappers, and visual regression tests that validate per-SDK routes render identically to legacy ?f= query parameter pages. - Add ArcjetSdkVariant type and helpers (sdkVariants, sdksWithVariants, sdkVariantFromPathname, legacyKeyFromPathname, pathnameForSdkVariant) - Rename React components to *React.tsx and wrap with Astro server components (SlotByFramework, TextByFramework, FrameworkLinks) that render statically on SDK routes and delegate to React on legacy pages - Update MDX imports to use .astro wrappers and remove client:load - Add stub MDX files for variant get-started pages (bun+hono, node+express, node+hono, python+fastapi, python+flask) - Add Playwright screenshot parity tests covering all 16 page types across all supported frameworks (114 tests)
|
This sets up the plumbing for per-SDK routes ( The main idea: Astro wrapper components that render content statically on This is a stepping stone — once the SDK routes are live and linked, we can It replaces the approach in #729 where I tried to do it all at once. Instead here we have parity guarantee without duplicated content! Once we swap over we can continue to leverage the screenshots and refactor to something more in line with #729 You should notice testing this preview that going to |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Hoping its due to the outage or the preview or something but this seems to break with the Vercel adapter 🤔 |

Introduce the variant type system, Astro component wrappers, and visual regression tests that validate per-SDK routes render identically to legacy ?f= query parameter pages.