Use when adding a new private (developer experiments) feature flag to Ghost, including the backend registration and settings UI toggle.
Adds a new private feature flag to Ghost. Private flags appear in Labs settings under the "Private features" tab, visible only when developer experiments are enabled.
Add the flag to ghost/core/core/shared/labs.js
PRIVATE_FEATURES array.Add a UI toggle in apps/admin-x-settings/src/components/settings/advanced/labs/private-features.tsx
features array with title, description, and flag (must match the string in labs.js).Run tests and update the config API snapshot
cd ghost/core && pnpm test:single test/unit/shared/labs.test.jscd ghost/core && UPDATE_SNAPSHOTS=1 pnpm test:single test/e2e-api/admin/config.test.jsghost/core/test/e2e-api/admin/__snapshots__/config.test.js.snap to confirm only your new flag was added.labs setting.labs.js, private-features.tsx, and the snapshot.welcomeEmailDesignCustomization).PUBLIC_BETA_FEATURES in labs.js instead and add the toggle to apps/admin-x-settings/src/components/settings/advanced/labs/beta-features.tsx.