feat(playground): deploy playground to GitHub Pages with extension detection#12
Merged
feat(playground): deploy playground to GitHub Pages with extension detection#12
Conversation
- Configure Vite base path for GitHub Pages subpath deployment - Add GitHub Actions workflow to build and deploy playground on push to main - Add ExtensionBanner component that detects Chrome extension via postMessage - Show green banner when extension is connected, amber banner with install link when not - Add playground link to README - Add noEmit to playground tsconfig and ignore tsc artifacts in .gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR makes the playground publicly accessible and adds Chrome extension awareness to improve the onboarding experience.
GitHub Pages deployment
deploy-playground.ymlworkflow builds the playground and deploys it to GitHub Pages on every push tomainhttps://mcpcat.github.io/webmcp-react/playground/— Vite'sbaseis conditionally set via aGITHUB_PAGESenv var so local dev remains unaffectedactions/upload-pages-artifactandactions/deploy-pageswith proper permissions and concurrency settingsChrome extension detection
ExtensionBannercomponent that probes for the WebMCP Bridge extension using the existingwindow.postMessageprotocol (WEBMCP_REQUEST_TOOLS→WEBMCP_TOOLS_UPDATED)TODOcomment) until the extension is publishedHousekeeping
noEmit: trueto the playground'stsconfig.jsonsotsc -bonly type-checks without emitting.jsartifacts alongside source.gitignorepatterns forsrc/**/*.jsandexamples/*/src/**/*.jsto catch any stray tsc outputTest plan
pnpm dev:playgroundand verify the playground loads athttp://localhost:5173/GITHUB_PAGES=true pnpm --filter webmcp-react-playground buildand inspectdist/index.htmlto confirm asset paths reference/webmcp-react/playground/https://mcpcat.github.io/webmcp-react/playground/