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 thefeatureFlagsstory 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.