Skip to content

Manager: Fix race condition in experimental_setFilter#35194

Merged
Sidnioulz merged 2 commits into
nextfrom
bill/set-filter-race-condition
Jun 17, 2026
Merged

Manager: Fix race condition in experimental_setFilter#35194
Sidnioulz merged 2 commits into
nextfrom
bill/set-filter-race-condition

Conversation

@mrginglymus

Copy link
Copy Markdown
Contributor

What I did

If two calls to this are made close together (for example, two addons initialising a filter in addons.register), only one may take effect.

Switching to the callback form of setState fixes this.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

I don't think manual testing is necessary.

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Declare whether manual QA will be needed for this PR during the next release, through qa:needed or qa:skip

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>

If two calls to this are made close together (for example, two addons
initialising a filter in `addons.register`), only one may take effect.
@mrginglymus mrginglymus added bug ci:normal Run our default set of CI jobs (choose this for most PRs). labels Jun 17, 2026
@Sidnioulz Sidnioulz self-assigned this Jun 17, 2026
@Sidnioulz Sidnioulz moved this to In Progress in Core Team Projects Jun 17, 2026
@Sidnioulz Sidnioulz added the qa:skip Pull Requests that do not need any QA. label Jun 17, 2026

@Sidnioulz Sidnioulz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ta!

@Sidnioulz

Copy link
Copy Markdown
Contributor

@mrginglymus oh no. Some tests are failing, possibly mock implems that need to be adjusted. Could you please have a look?

@mrginglymus

Copy link
Copy Markdown
Contributor Author

@Sidnioulz done!

@mrginglymus mrginglymus force-pushed the bill/set-filter-race-condition branch from 834fda3 to 6129424 Compare June 17, 2026 09:01
@Sidnioulz Sidnioulz merged commit 498a1a0 into next Jun 17, 2026
144 checks passed
@Sidnioulz Sidnioulz deleted the bill/set-filter-race-condition branch June 17, 2026 13:33
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Core Team Projects Jun 17, 2026
@Sidnioulz

Copy link
Copy Markdown
Contributor

Thanks @mrginglymus! Looking forward to merging your other PR too :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug ci:normal Run our default set of CI jobs (choose this for most PRs). qa:skip Pull Requests that do not need any QA.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants