feat: demo stage for every devknobs feature

Merged
ME
4d ago
+6229-466

summary

  • demo stage: cards that show every devknobs feature, with buttons that make network requests and fill storage
  • dev-only fold tuning page and /__tune endpoints, never in a build; scripts/dev-tools-check.ts fails the build if any of it, or a reference image, gets in
  • analytics only on knobs.dev
  • removed the "take the tour" button; the tour still starts on a first visit with a mouse
  • bump to devknobs 0.2.0 follows as soon as it is on npm

test plan

  • typecheck, lint, format:check, build
  • react-doctor as in CI
  • code review: no blockers left
  • owner check by hand on the preview

Summary by cubic

Adds a demo stage to the knobs.dev homepage: cards that react live to every devknobs knob, with buttons that make requests, fill storage, and open dialogs. Bumps devknobs to 0.2.0.

New features

  • One card per knob shows what the page reads as the panel changes; card buttons make real requests to the new /api/demo/$ endpoint.
  • The tour starts on a first visit with a mouse instead of from a "take the tour" button; analytics only fire on knobs.dev.
  • A lock screen and home screen reference image mark the new favicon and logo.

Dev tooling

  • ?tune loads a fold tuning panel backed by /__tune endpoints, both dev-only.
  • scripts/dev-tools-check.ts fails the build if any dev tool or reference image reaches the output.