Skip to content

perf: improve playground Lighthouse loading#615

Open
Christayc wants to merge 1 commit into
tailcallhq:developfrom
Christayc:codex/playground-static-launcher-216
Open

perf: improve playground Lighthouse loading#615
Christayc wants to merge 1 commit into
tailcallhq:developfrom
Christayc:codex/playground-static-launcher-216

Conversation

@Christayc
Copy link
Copy Markdown

@Christayc Christayc commented May 31, 2026

/claim #216

Summary

This PR makes /playground/ a lightweight static launcher and moves the full Docusaurus/GraphiQL app to /playground/app/.

Changes:

  • replace the Docusaurus /playground route with static/playground/index.html
  • preserve ?u= deep links by redirecting /playground/?u=... to /playground/app/?u=...
  • add the full React playground route at src/pages/playground/app.tsx
  • lazy-load the GraphiQL panel only after a valid endpoint is present on the app route
  • move GraphiQL, @graphiql/create-fetcher, toolkit types, cookie-aware storage, and GraphiQL CSS imports into GraphiQLPanel
  • remove an unused Announcement import from the playground index module

Validation

  • npm ci passed
  • npm run build passed and generated static files in build
  • git diff --check passed
  • inspected build/playground/index.html: it is 4773 bytes, contains no Docusaurus JS bundle references, and only includes the endpoint form plus the small ?u= redirect script
  • confirmed build/playground/app/index.html is generated for the full React playground route
  • confirmed Playground.tsx no longer statically imports graphiql, @graphiql/create-fetcher, @graphiql/toolkit, or GraphiQL CSS

npm run typecheck still fails on existing unrelated repo issues in publish-externals and Algolia/DocSearch theme types, but it reports no errors from src/components/playground.

I could not run Lighthouse locally in this environment because Chrome/Edge were not available in PATH and npx lighthouse timed out while resolving.

@Christayc Christayc changed the title Improve playground Lighthouse loading perf: improve playground Lighthouse loading May 31, 2026
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