Add local demo app for previewing the builder - #1
Merged
Conversation
Adds a Vite + React demo under demo/ that imports the library directly from src/ via a Vite alias, so changes to library source hot-reload in the browser. Mocks loadChannels, loadSendAsUserStatus, and onSend so the full builder UX (palette, surface, send dialog) can be exercised without a backend. Also adds .claude/launch.json so `preview_start demo` can boot the dev server on port 5173. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
demo/so the library can be exercised in a browser without publishing or wiring up the full template repo.BlockKitBuilderdirectly fromsrc/index.tsvia a Vite alias — edits to library source hot-reload in the demo.loadChannels,loadSendAsUserStatus, andonSendso the palette → surface → send-dialog flow works end-to-end without a backend..claude/launch.jsonso the Claude Code preview tool can boot the server on port 5173.Why
There was no first-party way to render the component locally — the closest thing is the external
block-kit-builder-templaterepo, which couples preview to a full Cloudflare Workers + slack-hono backend. That's heavy for iterating on the builder itself.This adds a minimal in-tree harness for fast visual iteration, similar in spirit to a Storybook setup but cheaper.
Notes for reviewers
demo/package.json) with its ownnode_modulesso librarydevDependenciesdon't grow.pnpm buildin the root to see updates.--background,--primary, etc.) since the library only declares fallbacks.demo/pnpm-workspace.yamlwas generated bypnpm approve-builds esbuildand is needed so a freshpnpm installindemo/doesn't error on pnpm 11's ignored-builds check.Test plan
cd demo && pnpm installsucceeds on a clean checkoutpnpm --dir demo devstarts on port 5173🤖 Generated with Claude Code