Skip to content

Hosting only

View as Markdown

createShelfApp({ database, storage }) is a complete deployment. Without the testing option StoryShelf hosts Storybooks only: it takes uploads, publishes them, and serves the library, component and build pages. Nothing renders, diffs or posts a testing status; a git channel still shows the <prefix>/review gate (review on) and the informational <prefix>/storybook status, linking to the published Storybook, when a build is published (as everywhere, only with a confirmed public origin; the git channel form is offered in this mode too). Add testing: { runner, ... } and the same instance also captures, compares and keeps baselines.

createShelfApp({ database, storage }); // hosting only
createShelfApp({ database, storage, testing: { runner: createPlaywrightCaptureRunner() } });

Uploads (zip, and the file-by-file /dedup, /content, /manifest routes), published Storybooks, projects, tokens, members, labels, webhooks, notifications, design links, and the library, component and build pages (Published Storybook). Auth is unchanged: who may view a Storybook or upload to a project is decided by the auth adapter and the project’s access settings, with or without testing.

Routes for capture, compare and baselines answer 404 with Testing is not enabled on this instance.:

  • snapshots (list, approve, reject, approve-all, reject-all, re-diff, images and diffs), attempts and their logs, baselines export and import, build retry, and the affected-capture route;
  • the build diff page, the compute-jobs page, the project capture, tests and AI settings pages, and the AI insights routes (they read snapshots).

Every route carries a class (hosting, testing, review or both) in one table, and a test boots the app without testing to check that each testing route answers 404 and no hosting route does. The navigation hides what is off: the Jobs entry and the capture, tests and AI settings tabs.

  • System page. A notice says testing is off, with the number of stored snapshots it hides.
  • Startup log. Boot logs testing is off and, when the database holds snapshots, a warning with hiddenSnapshots.
  • CLI. POST /api/v1/projects/:slug/builds returns testing: false, and storyshelf upload prints that the Storybook is published but no checks will run (and skips the affected-capture computation).

Existing snapshots are hidden, not deleted: they reappear when testing is turned back on. A repository that requires the <prefix>/testing commit status must drop that requirement before testing is turned off.

A published build on the project’s default branch becomes approved when publishing finishes, and so does a build on any other branch when the project has review off. With review on (the default) a build on another branch stays pending until an approver or admin gives it a build-level verdict; see Review. With testing on, capture sets the status. See Published Storybook.

testing needs a long-running process, so Vercel, AWS Lambda, Netlify and Cloudflare Workers host Storybooks only: boot refuses testing.runner on AWS Lambda, warns on Vercel and Netlify, and refuses it on the Cloudflare D1 database preset. STORYSHELF_ALLOW_SERVERLESS=1 overrides the host check. See Cloud assembly.