setting-feature-flags-in-storybook

Installation
SKILL.md

Setting feature flags in Storybook

[!WARNING] Never call featureFlagLogic.actions.setFeatureFlags(...) from a story. It silently no-ops in the visual-regression runtime (rendering the flag-OFF branch) while passing in jest — so unit tests stay green and the snapshot is wrong. Use the featureFlags story parameter instead.

Mental model: boolean flags always work (they ride the always-merged baseline); variant values need a gate that only the featureFlags parameter opens correctly.

How to use it

This is the stable contract — prefer it over anything in "Under the hood" below.

Boolean flags (flag is simply on)

Installs
3
GitHub Stars
513
First Seen
3 days ago
setting-feature-flags-in-storybook — posthog/posthog-foss