When switching to another background via the backgrounds toolbar addon on a docs page with over 4 stories, the docs page rerenders and reloads multiple times and the ff errors are thrown as shown on the console:
manager received storyRenderPhaseChanged but was unable to determine the source of the event
manager received storyRendered but was unable to determine the source of the event
manager received storybook/docs/snippet-rendered but was unable to determine the source of the event
Describe the bug
When switching to another background via the backgrounds toolbar addon on a docs page with over 4 stories, the docs page rerenders and reloads multiple times and the ff errors are thrown as shown on the console:
Reproduction link
https://github.com/merri-dei/storybook-nextjs-issue/tree/main
Reproduction steps
pnpm install
.npm run storybook
.http://localhost:6006
.Expected: The docs page rerenders once to update the background of the stoires and doesn't reload. No error is logged onto the console.
Actual: The docs page rerenders multiple times and reloads. Errors are logged onto the console:
https://github.com/user-attachments/assets/13ce6e61-c1e5-42dd-b977-15b64518c42f
Note that this doesn't happen on docs pages with 4 stories or less:
https://github.com/user-attachments/assets/3fb03824-55db-4bf3-8f71-eb601c9c9100
System
Additional context
No response