Skip to content

🤖 tests: stabilize settings experiment stories#3562

Merged
ThomasK33 merged 1 commit into
mainfrom
chromatic-tests-n7yc
Jun 15, 2026
Merged

🤖 tests: stabilize settings experiment stories#3562
ThomasK33 merged 1 commit into
mainfrom
chromatic-tests-n7yc

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Jun 15, 2026

Copy link
Copy Markdown
Member

Summary

Stabilizes the Settings → Experiments Storybook snapshots by clearing experiment localStorage overrides before each settings section story setup, while still allowing individual stories to seed the experiments they need.

Background

The PTC toggle in the Heartbeat Settings Enabled Chromatic snapshot could inherit experiment:programmatic-tool-calling from the ExperimentsToggleOn story because Storybook/Chromatic reuse the same browser origin across story renders.

Implementation

  • Clear every registered experiment localStorage key in the shared settings story reset helper.
  • Keep story-specific experiment seeding in setupSettingsStory() so stories can opt back into required toggle states.
  • Add regression coverage proving a pre-existing PTC localStorage override is cleared before story setup and that explicit story seeding still restores the requested value.

Validation

  • bun test src/browser/features/Settings/Sections/settingsStoryUtils.test.tsx
  • bun test src/browser/features/Settings/Sections/*.test.tsx
  • MUX_ESLINT_CONCURRENCY=1 make static-check
  • bun x test-storybook --url http://localhost:6006 --testTimeout 30000 --maxWorkers=2
  • Dogfooded in Storybook by visiting the PTC-on story, then the heartbeat story, and confirming PTC was reset off while Workspace Heartbeats remained on.

Risks

Low. This only affects the shared Storybook wrapper for settings section stories. Production experiment persistence remains unchanged, and stories can still seed explicit experiment values through setupSettingsStory().


Generated with mux • Model: openai:gpt-5.5 • Thinking: xhigh • Cost: $8.46

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 16ffabcfc6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33 ThomasK33 force-pushed the chromatic-tests-n7yc branch from 16ffabc to e211589 Compare June 15, 2026 16:38
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: e211589532

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33 ThomasK33 added this pull request to the merge queue Jun 15, 2026
Merged via the queue into main with commit eabaace Jun 15, 2026
23 checks passed
@ThomasK33 ThomasK33 deleted the chromatic-tests-n7yc branch June 15, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant