Skip to content

fix(storybook): stop stale deploys from breaking stories and fix broken story assets - #1157

Open
isaque-bock-azion wants to merge 3 commits into
mainfrom
fix/storybook-broken-stories
Open

isaque-bock-azion wants to merge 3 commits into
mainfrom
fix/storybook-broken-stories

Conversation

@isaque-bock-azion

Copy link
Copy Markdown
Contributor

Summary

  • The deployed Storybook failed on almost every story with Failed to fetch dynamically imported module: each azion deploy uploads to a new storage prefix without purging, so the edge kept a 2h-cached iframe.html pointing at chunks that no longer exist (404 NoSuchKey). The workflow now purges webkit.azion.app after deploy, and HTML/JSON/unhashed manager bundles get a short cache policy.
  • The Types stories of FeatureTiles, NetworkSection and MediaSplitStack rendered site paths (/marketing-components/...) that 404 in Storybook; they now render the bundled assets while "Show code" keeps the site paths.
  • The Motion foundations page threw on import because 5 new theme animations were missing from TAILWIND_ANIMATE_SAFELIST.

How to test

  1. pnpm storybook:build, then serve apps/storybook/dist: every story renders (checked headlessly: 855/855 stories, no page errors and no 404 image URLs).
  2. Open Components/Sections/FeatureTiles › Types, NetworkSection › Types and MediaSplitStack › Types: all illustrations and logos load; "Show code" still shows /marketing-components/... paths.
  3. Open Foundations/Design tokens/Motion: the page loads and lists page-enter, content-enter, texture-wave-a, texture-wave-b, brand-marquee.
  4. After merge, the Deploy Application Storybook run ends with the new Purge edge cache step green, and https://webkit.azion.app/?path=/docs/templates-marketing-comparesupporttiers--docs loads.

Notes

  • No package release (apps/storybook and .github only).
  • The new cache TTLs (browser 0s, edge 60s) pass the config schema; the Azion API and the CI token's purge permission are only confirmed by the first deploy after merge.

…ments fresh

Each azion deploy uploads the build under a new storage prefix but skips the
purge step, so the edge kept serving the previous iframe.html for up to two
hours. That stale HTML pointed at hashed story chunks that no longer exist in
the new prefix, and every story failed with "Failed to fetch dynamically
imported module" (404 NoSuchKey).

The workflow now purges webkit.azion.app after the deploy, and HTML, JSON
indexes, the unhashed sb-manager/sb-addons bundles and the SPA rewrite get a
short cache policy (browser 0s, edge 60s). Hashed assets keep the 2h policy.
…felist new motion utilities

The FeatureTiles, NetworkSection and MediaSplitStack Types stories rendered
site paths (/marketing-components/...) that do not exist in Storybook, so
their images 404ed. withTemplateAssets swaps those paths for the bundled
assets in the rendered template only, keeping the site paths in Show code;
MediaSplitStack now resolves its bound bands through withStoryAssets.

The Motion overview threw on import because the theme gained page-enter,
content-enter, texture-wave-a, texture-wave-b and brand-marquee without them
being added to TAILWIND_ANIMATE_SAFELIST.
@isaque-bock-azion
isaque-bock-azion requested a review from a team November 6, 2026 14:48
@isaque-bock-azion
isaque-bock-azion requested a review from a team as a code owner November 6, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant