Skip to content

[harness eval #34687] fix: narrow CSF factory decorator context types#33

Open
valentinpalkovic wants to merge 1 commit into
nextfrom
try-pr-34687
Open

[harness eval #34687] fix: narrow CSF factory decorator context types#33
valentinpalkovic wants to merge 1 commit into
nextfrom
try-pr-34687

Conversation

@valentinpalkovic
Copy link
Copy Markdown
Owner

Synthetic fork PR for agentic harness eval against storybookjs#34687.

@valentinpalkovic valentinpalkovic added the ci:verify Trigger PR Verification Harness label May 14, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 14, 2026

Fails
🚫

PR is not labeled with one of: ["cleanup","BREAKING CHANGE","feature request","bug","documentation","maintenance","build","dependencies"]

🚫

PR is not labeled with one of: ["ci:normal","ci:merged","ci:daily","ci:docs"]

🚫 PR title must be in the format of "Area: Summary", With both Area and Summary starting with a capital letter Good examples: - "Docs: Describe Canvas Doc Block" - "Svelte: Support Svelte v4" Bad examples: - "add new api docs" - "fix: Svelte 4 support" - "Vue: improve docs"

Generated by 🚫 dangerJS against 8fec210

@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: regression (target internal-ui)

Reason: PR-added unit tests failed (see unitTests.details)

Evidence (vision-check, claude-haiku-4-5-20251001): missing

Vision reasoning

Recipe produced no screenshots — cannot verify visible evidence.

PR-added unit tests: ❌ failed — vitest exited 1 without writing a JSON report (likely setup error); see Action log

Files: code/core/src/csf/csf-factories.test.ts

vitest output (last 4KB)
 /tmp/claude/eval-sync-baselines-nested-no-legacy-cF51Xq/remotes/excalidraw.git
 * [new branch]      main -> main
Cloning into '/tmp/claude/eval-sync-staging-WxJOPV'...
warning: You appear to have cloned an empty repository.
done.
To /tmp/claude/eval-sync-baselines-auto-clone-1IgD0v/remotes/mealdrop.git
 * [new branch]      main -> main
Cloning into '/tmp/claude/eval-sync-staging-IxJVdT'...
warning: You appear to have cloned an empty repository.
done.
To /tmp/claude/eval-sync-baselines-auto-clone-1IgD0v/remotes/wikitok.git
 * [new branch]      main -> main
To /tmp/claude/eval-sync-storybook-version-3q1Tfr/remotes/mealdrop.git
 * [new branch]      main -> main
To /tmp/claude/eval-sync-storybook-version-3q1Tfr/remotes/wikitok.git
 * [new branch]      main -> main
To /tmp/claude/eval-sync-storybook-version-noop-9oolty/remotes/mealdrop.git
 * [new branch]      main -> main
To /tmp/claude/eval-sync-baselines-target-behind-GhV2Fz/remotes/mealdrop.git
 * [new branch]      main -> main
To /tmp/claude/eval-sync-baselines-target-behind-GhV2Fz/remotes/edgy.git
 * [new branch]      main -> main
Cloning into '/tmp/claude/eval-sync-baselines-target-behind-GhV2Fz/edgy-remote-worktree'...
done.
To /tmp/claude/eval-sync-baselines-target-behind-GhV2Fz/remotes/edgy.git
   73d8e0a..4b65232  main -> main
To /tmp/claude/eval-sync-storybook-version-dirty-6AsUIJ/remotes/mealdrop.git
 * [new branch]      main -> main
Cloning into '/tmp/claude/eval-sync-storybook-version-staging-eWriNd'...
warning: You appear to have cloned an empty repository.
done.
To /tmp/claude/eval-sync-storybook-version-auto-clone-lxYhj9/remotes/mealdrop.git
 * [new branch]      main -> main
To /tmp/claude/eval-sync-storybook-version-skip-push-wWFiCj/remotes/mealdrop.git
 * [new branch]      main -> main
(node:21) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
To /tmp/claude/eval-sync-storybook-version-resume-push-TtHHZD/remotes/mealdrop.git
 * [new branch]      main -> main
(node:21) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:21) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:21) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

������ Unhandled Error �������
Error: EROFS: read-only file system, open '/home/runner/work/_temp/unit-tests-report.json'
 � open node:internal/fs/promises:636:25
 � Object.writeFile node:internal/fs/promises:1205:14
 � JsonReporter.writeReport node_modules/vitest/dist/chunks/index.UpGiHP7g.js:3626:4
 � JsonReporter.onTestRunEnd node_modules/vitest/dist/chunks/index.UpGiHP7g.js:3613:3
 � Vitest.report node_modules/vitest/dist/chunks/cli-api.Cjt90eJu.js:13968:3
 � TestRun.end node_modules/vitest/dist/chunks/cli-api.Cjt90eJu.js:12591:3
 � node_modules/vitest/dist/chunks/cli-api.Cjt90eJu.js:13591:6
 � node_modules/vitest/dist/chunks/cli-api.Cjt90eJu.js:13601:11
 � node_modules/vitest/dist/chunks/cli-api.Cjt90eJu.js:13463:19

������������������������������
Serialized Error: { errno: -30, code: 'EROFS', syscall: 'open', path: '/home/runner/work/_temp/unit-tests-report.json' }




Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

Screenshots

2026-05-14T13-55-50.041Z/pr-33-CSF-story-renders-cl-721d0-ator-context-type-narrowing-chromium/preview-secondary.png

2026-05-14T13-55-50.041Z/pr-33-CSF-story-renders-cl-721d0-ator-context-type-narrowing-chromium/preview-secondary.png

2026-05-14T13-55-50.041Z/pr-33-CSF-story-renders-cl-721d0-ator-context-type-narrowing-chromium/test-finished-1.png

2026-05-14T13-55-50.041Z/pr-33-CSF-story-renders-cl-721d0-ator-context-type-narrowing-chromium/test-finished-1.png

@valentinpalkovic valentinpalkovic force-pushed the next branch 2 times, most recently from fe2f521 to e537022 Compare May 14, 2026 14:09
@valentinpalkovic valentinpalkovic added ci:verify Trigger PR Verification Harness and removed ci:verify Trigger PR Verification Harness labels May 14, 2026
github-actions Bot pushed a commit that referenced this pull request May 14, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: regression (target internal-ui)

Reason: PR-added unit tests failed (see unitTests.details)

Evidence (vision-check, claude-haiku-4-5-20251001): undetermined

Vision reasoning

The diff is primarily a type-level change to CSF factory decorator context (narrowing TS types for parameters/globals in story.ts) with no runtime behavior changes. The Playwright recipe explicitly confirms this is a pure type-level change with no observable UI differences, and the screenshots show a functional Button story rendering correctly—which is exactly what the recipe validates (that touching the types doesn't break story rendering). The screenshots contain the expected UI but cannot demonstrate the absence or presence of invisible type narrowing.

PR-added unit tests: ❌ failed — vitest exited 1 without writing a JSON report (likely setup error); see Action log

Files: code/core/src/csf/csf-factories.test.ts

vitest output (last 4KB)
 /tmp/claude/eval-sync-baselines-nested-no-legacy-Mf522N/remotes/excalidraw.git
 * [new branch]      main -> main
To /tmp/claude/eval-sync-storybook-version-BhDhGA/remotes/mealdrop.git
 * [new branch]      main -> main
To /tmp/claude/eval-sync-storybook-version-BhDhGA/remotes/wikitok.git
 * [new branch]      main -> main
Cloning into '/tmp/claude/eval-sync-staging-Tlayxo'...
warning: You appear to have cloned an empty repository.
done.
To /tmp/claude/eval-sync-baselines-auto-clone-v5m9VF/remotes/mealdrop.git
 * [new branch]      main -> main
Cloning into '/tmp/claude/eval-sync-staging-fxE809'...
warning: You appear to have cloned an empty repository.
done.
To /tmp/claude/eval-sync-baselines-auto-clone-v5m9VF/remotes/wikitok.git
 * [new branch]      main -> main
To /tmp/claude/eval-sync-storybook-version-noop-r4YTsj/remotes/mealdrop.git
 * [new branch]      main -> main
To /tmp/claude/eval-sync-storybook-version-dirty-5GSus0/remotes/mealdrop.git
 * [new branch]      main -> main
Cloning into '/tmp/claude/eval-sync-storybook-version-staging-f3MnJI'...
warning: You appear to have cloned an empty repository.
done.
To /tmp/claude/eval-sync-storybook-version-auto-clone-ZqNMCo/remotes/mealdrop.git
 * [new branch]      main -> main
(node:21) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
To /tmp/claude/eval-sync-baselines-target-behind-AzsOdM/remotes/mealdrop.git
 * [new branch]      main -> main
To /tmp/claude/eval-sync-baselines-target-behind-AzsOdM/remotes/edgy.git
 * [new branch]      main -> main
Cloning into '/tmp/claude/eval-sync-baselines-target-behind-AzsOdM/edgy-remote-worktree'...
done.
To /tmp/claude/eval-sync-baselines-target-behind-AzsOdM/remotes/edgy.git
   9111e88..2765d20  main -> main
To /tmp/claude/eval-sync-storybook-version-skip-push-gCNJrm/remotes/mealdrop.git
 * [new branch]      main -> main
To /tmp/claude/eval-sync-storybook-version-resume-push-M27hgF/remotes/mealdrop.git
 * [new branch]      main -> main
(node:21) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:21) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:21) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

������ Unhandled Error �������
Error: EROFS: read-only file system, open '/home/runner/work/_temp/unit-tests-report.json'
 � open node:internal/fs/promises:636:25
 � Object.writeFile node:internal/fs/promises:1205:14
 � JsonReporter.writeReport node_modules/vitest/dist/chunks/index.UpGiHP7g.js:3626:4
 � JsonReporter.onTestRunEnd node_modules/vitest/dist/chunks/index.UpGiHP7g.js:3613:3
 � Vitest.report node_modules/vitest/dist/chunks/cli-api.Cjt90eJu.js:13968:3
 � TestRun.end node_modules/vitest/dist/chunks/cli-api.Cjt90eJu.js:12591:3
 � node_modules/vitest/dist/chunks/cli-api.Cjt90eJu.js:13591:6
 � node_modules/vitest/dist/chunks/cli-api.Cjt90eJu.js:13601:11
 � node_modules/vitest/dist/chunks/cli-api.Cjt90eJu.js:13463:19

������������������������������
Serialized Error: { errno: -30, code: 'EROFS', syscall: 'open', path: '/home/runner/work/_temp/unit-tests-report.json' }




Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

Screenshots

2026-05-14T14-24-51.988Z/pr-33-csf-factory-typed-de-e1c40-ries-without-runtime-errors-chromium/preview.png

2026-05-14T14-24-51.988Z/pr-33-csf-factory-typed-de-e1c40-ries-without-runtime-errors-chromium/preview.png

2026-05-14T14-24-51.988Z/pr-33-csf-factory-typed-de-e1c40-ries-without-runtime-errors-chromium/test-finished-1.png

2026-05-14T14-24-51.988Z/pr-33-csf-factory-typed-de-e1c40-ries-without-runtime-errors-chromium/test-finished-1.png

@valentinpalkovic valentinpalkovic added ci:verify Trigger PR Verification Harness and removed ci:verify Trigger PR Verification Harness labels May 14, 2026
github-actions Bot pushed a commit that referenced this pull request May 14, 2026
@github-actions github-actions Bot added the verified-by-harness Verified by PR Verify Harness label May 14, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: verified (target internal-ui)

Evidence (vision-check, claude-haiku-4-5-20251001): undetermined

Vision reasoning

The diff consists entirely of non-user-visible changes: TypeScript type narrowing (TypedParameters, TypedGlobals), CI/build configuration simplifications, and test additions. The Playwright recipe explicitly acknowledges this is a type-only change with no runtime behavior changes, confirming the visible UI (a rendered button in the preview) should be identical before and after. The screenshots show the button rendering correctly, which is the expected outcome—not evidence of a visible change.

PR-added unit tests: ✅ passed — 6713 passed, 0 failed across 2118 suite(s)

Files: code/core/src/csf/csf-factories.test.ts

Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

Screenshots

2026-05-14T14-40-04.713Z/pr-33-csf-factory-story-re-aefb5-ator-context-type-narrowing-chromium/preview.png

2026-05-14T14-40-04.713Z/pr-33-csf-factory-story-re-aefb5-ator-context-type-narrowing-chromium/preview.png

2026-05-14T14-40-04.713Z/pr-33-csf-factory-story-re-aefb5-ator-context-type-narrowing-chromium/test-finished-1.png

2026-05-14T14-40-04.713Z/pr-33-csf-factory-story-re-aefb5-ator-context-type-narrowing-chromium/test-finished-1.png

@valentinpalkovic valentinpalkovic added ci:verify Trigger PR Verification Harness and removed ci:verify Trigger PR Verification Harness labels May 15, 2026
@valentinpalkovic valentinpalkovic force-pushed the next branch 2 times, most recently from 80ccd7d to 745162d Compare May 15, 2026 16:58
github-actions Bot pushed a commit that referenced this pull request May 15, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: verified (target internal-ui)

Evidence (vision-check, claude-haiku-4-5-20251001): undetermined

Vision reasoning

The diff contains pure TypeScript type-narrowing changes (TypedParameters/TypedGlobals type aliases, cast fix in portable-stories.ts) and infrastructure/documentation changes (GitHub Actions workflow simplifications, recipe authoring guide cleanup, script refactoring). These are not user-visible changes. The screenshots show a Storybook preview with a Button component, which correctly renders and contains no errors, confirming the types work at runtime. However, type narrowing itself produces no observable UI difference.

PR-added unit tests: ✅ passed — 6713 passed, 0 failed across 2118 suite(s)

Files: code/core/src/csf/csf-factories.test.ts

Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

Screenshots

2026-05-15T16-55-47.688Z/pr-33-preview-api-boots-st-7d04b-ypes-without-runtime-errors-chromium/preview-secondary.png

2026-05-15T16-55-47.688Z/pr-33-preview-api-boots-st-7d04b-ypes-without-runtime-errors-chromium/preview-secondary.png

2026-05-15T16-55-47.688Z/pr-33-preview-api-boots-st-7d04b-ypes-without-runtime-errors-chromium/test-finished-1.png

2026-05-15T16-55-47.688Z/pr-33-preview-api-boots-st-7d04b-ypes-without-runtime-errors-chromium/test-finished-1.png

@valentinpalkovic valentinpalkovic force-pushed the next branch 3 times, most recently from a11176d to 9de9d5b Compare May 15, 2026 17:25
@valentinpalkovic valentinpalkovic added ci:verify Trigger PR Verification Harness and removed ci:verify Trigger PR Verification Harness labels May 15, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

No verdict produced — the workflow failed before the harness ran (likely recipe-author dispatch, deny-regex, or lint). See run log for details.

@valentinpalkovic valentinpalkovic added ci:verify Trigger PR Verification Harness and removed ci:verify Trigger PR Verification Harness labels May 15, 2026
github-actions Bot pushed a commit that referenced this pull request May 15, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: verified (target internal-ui)

Evidence (vision-check, claude-haiku-4-5-20251001): undetermined

Vision reasoning

The diff is primarily composed of non-user-visible changes: CI/workflow configuration files, changelog entries, version number bumps in package.json files, test file deletions, and removal of package manager utility functions. While the Playwright recipe tests sidebar rendering and preview functionality, the actual user-visible changes (if any) in the diff are unclear—the comments mention Tree.tsx and ReviewChangesButton refactors, but the provided diff excerpt is truncated and doesn't show the relevant component changes.

PR-added unit tests: ✅ passed — 6713 passed, 0 failed across 2118 suite(s)

Files: code/addons/vitest/src/vitest-plugin/agent-telemetry-reporter.test.ts, code/core/src/common/js-package-manager/NPMProxy.test.ts, code/core/src/common/js-package-manager/PNPMProxy.test.ts, code/core/src/common/js-package-manager/Yarn1Proxy.test.ts, code/core/src/common/js-package-manager/Yarn2Proxy.test.ts, code/core/src/core-server/server-channel/ai-setup-channel.test.ts, code/core/src/core-server/server-channel/ghost-stories-channel.test.ts, code/core/src/core-server/utils/checklist.test.ts, code/core/src/core-server/utils/ghost-stories/parse-vitest-report.test.ts, code/core/src/core-server/withTelemetry.test.ts, code/core/src/csf/csf-factories.test.ts, code/core/src/shared/utils/ai-checklist-flags.test.ts, code/core/src/shared/utils/analyze-test-results.test.ts, code/lib/create-storybook/src/commands/DependencyInstallationCommand.test.ts, code/lib/create-storybook/src/commands/PreflightCheckCommand.test.ts, code/lib/create-storybook/src/commands/ProjectDetectionCommand.test.ts, code/lib/create-storybook/src/commands/UserPreferencesCommand.test.ts, code/lib/create-storybook/src/generators/REACT_NATIVE/index.test.ts, code/lib/create-storybook/src/initiate.test.ts, code/lib/create-storybook/src/services/FrameworkDetectionService.test.ts, code/lib/create-storybook/src/services/ProjectTypeService.test.ts, code/lib/create-storybook/src/services/TelemetryService.test.ts

How Playwright validated this
test('sidebar Tree renders consolidated status icons without runtime errors', async ({
  page,
}, testInfo) => {
  const pageErrors: string[] = [];
  const consoleErrors: string[] = [];

  page.on('pageerror', (err) => {
    pageErrors.push(err.stack ?? err.message ?? String(err));
  });
  page.on('console', (msg) => {
    if (msg.type() === 'error') {
      consoleErrors.push(msg.text());
    }
  });

  const baseURL =
    process.env.STORYBOOK_URL ?? testInfo.project.use.baseURL ?? 'http://localhost:6006';

  try {
    await page.goto(`${baseURL}/?path=/story/example-button--primary`);

    const recipe = new RecipePage(page, expect);
    await recipe.waitUntilLoaded();

    const sidebar = page.locator('.sidebar-container');
    await expect(sidebar).toBeVisible();

    const exampleGroup = page.locator('[data-item-id="example"]');
    await expect(exampleGroup).toBeVisible();
    await exampleGroup.click();

    const buttonComponent = page.locator('[data-item-id="example-button"]');
    await expect(buttonComponent).toBeVisible();

    await buttonComponent.click();

    const primaryStory = page.locator('[data-item-id="example-button--primary"]');
    await expect(primaryStory).toBeVisible();

    const secondaryStory = page.locator('[data-item-id="example-button--secondary"]');
    await expect(secondaryStory).toBeVisible();
    await secondaryStory.click();

    await expect(page).toHaveURL(/example-button--secondary/);

    const errorDisplay = page.locator('#sb-errordisplay');
    await expect(errorDisplay).toBeHidden();

    const previewRoot = recipe.previewRoot();
    await expect(previewRoot).toBeVisible();

    await sidebar.screenshot({
      path: testInfo.outputPath('sidebar.png'),
    });
  } finally {
    await testInfo.attach('pageErrors', {
      body: JSON.stringify(pageErrors),
      contentType: 'application/json',
    });
    await testInfo.attach('consoleErrors', {
      body: JSON.stringify(consoleErrors),
      contentType: 'application/

Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

Screenshots

2026-05-15T18-46-19.395Z/pr-33-sidebar-tree-renders-e6ba0--after-status-icon-refactor-chromium/preview.png

2026-05-15T18-46-19.395Z/pr-33-sidebar-tree-renders-e6ba0--after-status-icon-refactor-chromium/preview.png

2026-05-15T18-46-19.395Z/pr-33-sidebar-tree-renders-e6ba0--after-status-icon-refactor-chromium/sidebar.png

2026-05-15T18-46-19.395Z/pr-33-sidebar-tree-renders-e6ba0--after-status-icon-refactor-chromium/sidebar.png

2026-05-15T18-46-19.395Z/pr-33-sidebar-tree-renders-e6ba0--after-status-icon-refactor-chromium/test-finished-1.png

2026-05-15T18-46-19.395Z/pr-33-sidebar-tree-renders-e6ba0--after-status-icon-refactor-chromium/test-finished-1.png

@valentinpalkovic valentinpalkovic force-pushed the next branch 2 times, most recently from ad75ba9 to 099b6f7 Compare May 15, 2026 19:48
@valentinpalkovic valentinpalkovic added ci:verify Trigger PR Verification Harness and removed verified-by-harness Verified by PR Verify Harness ci:verify Trigger PR Verification Harness labels May 15, 2026
github-actions Bot pushed a commit that referenced this pull request May 15, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: regression (target internal-ui)

Reason: Playwright assertion failed in: ? — TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('#storybook-preview-iframe').contentFrame().locator('#storybook-root:visible, #storybook-docs:visible').locator(':scope > *').first() at _util.ts:31 29 | await this.page.waitForURL((url) => url.search.includes('path')); 30 | const root = this.previewRoot(); > 31 | await root.locator(':s

PR-added unit tests: ✅ passed — 6713 passed, 0 failed across 2118 suite(s)

Files: code/addons/vitest/src/vitest-plugin/agent-telemetry-reporter.test.ts, code/core/src/common/js-package-manager/NPMProxy.test.ts, code/core/src/common/js-package-manager/PNPMProxy.test.ts, code/core/src/common/js-package-manager/Yarn1Proxy.test.ts, code/core/src/common/js-package-manager/Yarn2Proxy.test.ts, code/core/src/core-server/server-channel/ai-setup-channel.test.ts, code/core/src/core-server/server-channel/ghost-stories-channel.test.ts, code/core/src/core-server/utils/checklist.test.ts, code/core/src/core-server/utils/ghost-stories/parse-vitest-report.test.ts, code/core/src/core-server/withTelemetry.test.ts, code/core/src/csf/csf-factories.test.ts, code/core/src/shared/utils/ai-checklist-flags.test.ts, code/core/src/shared/utils/analyze-test-results.test.ts, code/lib/create-storybook/src/commands/DependencyInstallationCommand.test.ts, code/lib/create-storybook/src/commands/PreflightCheckCommand.test.ts, code/lib/create-storybook/src/commands/ProjectDetectionCommand.test.ts, code/lib/create-storybook/src/commands/UserPreferencesCommand.test.ts, code/lib/create-storybook/src/generators/REACT_NATIVE/index.test.ts, code/lib/create-storybook/src/initiate.test.ts, code/lib/create-storybook/src/services/FrameworkDetectionService.test.ts, code/lib/create-storybook/src/services/ProjectTypeService.test.ts, code/lib/create-storybook/src/services/TelemetryService.test.ts

How Playwright validated this
test('nextjs-vite sandbox renders a story without runtime errors', async ({ page }, testInfo) => {
  const pageErrors: string[] = [];
  const consoleErrors: string[] = [];

  page.on('pageerror', (err) => {
    pageErrors.push(err.stack ?? err.message ?? String(err));
  });
  page.on('console', (msg) => {
    if (msg.type() === 'error') {
      consoleErrors.push(msg.text());
    }
  });

  const baseURL =
    process.env.STORYBOOK_URL ?? testInfo.project.use.baseURL ?? 'http://localhost:6006';

  try {
    await page.goto(`${baseURL}/?path=/`);

    const sidebar = page.locator('.sidebar-container');
    await expect(sidebar).toBeVisible({ timeout: 30000 });

    const firstStoryLink = page
      .locator('a[data-nodetype="story"], a[data-nodetype="document"]')
      .first();

    if ((await firstStoryLink.count()) === 0) {
      const firstGroup = page
        .locator('button[data-nodetype="group"], button[data-nodetype="component"]')
        .first();
      await firstGroup.click();
    }

    const storyLink = page
      .locator('a[data-nodetype="story"], a[data-nodetype="document"]')
      .first();
    await expect(storyLink).toBeVisible({ timeout: 15000 });
    await storyLink.click();

    const recipe = new RecipePage(page, expect);
    await recipe.waitUntilLoaded();

    const errorDisplay = page.locator('#sb-errordisplay');
    await expect(errorDisplay).toBeHidden();

    const previewRoot = recipe.previewRoot();
    await expect(previewRoot).toBeVisible();
    const childCount = await previewRoot.evaluate((el) => el.childElementCount);
    expect(childCount).toBeGreaterThan(0);

    await page.locator('.sidebar-container').screenshot({
      path: testInfo.outputPath('sidebar.png'),
    });

    await page.frameLocator('#storybook-preview-iframe').locator('body').screenshot({
      path: testInfo.outputPath('preview.png'),
    });
  } finally {
    await testInfo.attach('pageErrors', {
      body: JSON.stringify(pageErrors),
      contentType: 'appl

Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

Screenshots

2026-05-15T20-56-53.479Z/pr-33-sidebar-review-chang-7401d--MOD-via-Save-from-Controls-chromium/test-failed-1.png

2026-05-15T20-56-53.479Z/pr-33-sidebar-review-chang-7401d--MOD-via-Save-from-Controls-chromium/test-failed-1.png

github-actions Bot pushed a commit that referenced this pull request May 18, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: regression (target internal-ui)

Reason: Playwright assertion failed in: ? — Error: expect(received).toBe(expected) // Object.is equality Expected: true Received: undefined 109 | 110 | expect(ctxShape.hasStore).toBe(true); > 111 | expect(ctxShape.parametersIsObject).toBe(true); | ^ 112 | expect(ctxShape.globalsIsObject).toBe(true); 113 | } finally { 114 | await testInfo.attach('pageErrors', { a

PR-added unit tests: ✅ passed — 6761 passed, 0 failed across 2128 suite(s)

Files: code/core/src/csf/csf-factories.test.ts

How Playwright validated this
test('CSF factory story boots with parameters/globals context after type narrowing', async ({ page }, testInfo) => {
  const pageErrors: string[] = [];
  const consoleErrors: string[] = [];

  page.on('pageerror', (err) => {
    pageErrors.push(err.stack ?? err.message ?? String(err));
  });
  page.on('console', (msg) => {
    if (msg.type() === 'error') {
      consoleErrors.push(msg.text());
    }
  });

  const baseURL =
    process.env.STORYBOOK_URL ?? testInfo.project.use.baseURL ?? 'http://localhost:6006';

  try {
    await page.goto(`${baseURL}/?path=/story/core-decorators--basics`);
    const sb = new RecipePage(page, expect);
    await sb.waitUntilLoaded();

    await expect(page.locator('#sb-errordisplay')).toBeHidden();

    const previewIframe = sb.previewIframe();
    const previewRoot = sb.previewRoot();
    await expect(previewRoot).toBeVisible();

    const ctxShape = await previewIframe.locator('body').evaluate(() => {
      const w = window as unknown as {
        __STORYBOOK_PREVIEW__?: {
          storyStore?: unknown;
        };
      };
      const preview = w.__STORYBOOK_PREVIEW__;
      const hasStore = !!preview && typeof preview === 'object' && 'storyStore' in preview;
      const store = preview?.storyStore as
        | { lastRenderedStory?: { parameters?: unknown; globals?: unknown } }
        | undefined;
      const last = store?.lastRenderedStory;
      return {
        hasStore,
        parametersIsObject:
          last == null ? hasStore : typeof last.parameters === 'object' && last.parameters !== null,
        globalsIsObject:
          last == null ? hasStore : typeof last.globals === 'object' && last.globals !== null,
      };
    });

    expect(ctxShape.hasStore).toBe(true);
    expect(ctxShape.parametersIsObject).toBe(true);
    expect(ctxShape.globalsIsObject).toBe(true);
  } finally {
    await testInfo.attach('pageErrors', {
      body: JSON.stringify(pageErrors),
      contentType: 'application/json',
    });
    await te

Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

Screenshots

2026-05-18T06-24-37.487Z/pr-33-decorator-context-pa-3ca95-me-after-csf-type-narrowing-chromium/test-failed-1.png

2026-05-18T06-24-37.487Z/pr-33-decorator-context-pa-3ca95-me-after-csf-type-narrowing-chromium/test-failed-1.png

@valentinpalkovic valentinpalkovic added ci:verify Trigger PR Verification Harness and removed ci:verify Trigger PR Verification Harness labels May 18, 2026
github-actions Bot pushed a commit that referenced this pull request May 18, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: regression (target internal-ui)

Reason: Playwright assertion failed in: ? — Error: expect(received).toEqual(expected) // deep equality - Expected - 1 + Received + 6 - Array [] + Array [ + "Failed to load resource: net::ERR_INTERNET_DISCONNECTED", + "Failed to load resource: net::ERR_INTERNET_DISCONNECTED", + "Failed to load resource: net::ERR_INTERNET_DISCONNECTED", + "Failed to load resource: net::ERR_INTERNET_DISCONNECTED", + ] 85 | 86 | expect(filter

PR-added unit tests: ✅ passed — 6761 passed, 0 failed across 2128 suite(s)

Files: code/core/src/csf/csf-factories.test.ts

How Playwright validated this
test('csf type-narrowing diff does not break story boot or portable-stories runtime', async ({ page }, testInfo) => {
  const pageErrors: string[] = [];
  const consoleErrors: string[] = [];

  page.on('pageerror', (err) => {
    pageErrors.push(err.stack ?? err.message ?? String(err));
  });
  page.on('console', (msg) => {
    if (msg.type() === 'error') {
      consoleErrors.push(msg.text());
    }
  });

  const baseURL =
    process.env.STORYBOOK_URL ?? testInfo.project.use.baseURL ?? 'http://localhost:6006';

  try {
    await page.goto(`${baseURL}/?path=/story/core-basics--default`);

    const sb = new RecipePage(page, expect);
    await sb.waitUntilLoaded();

    const errorDisplay = page.locator('#sb-errordisplay');
    await expect(errorDisplay).toBeHidden();

    const previewIframe = sb.previewIframe();
    const previewRoot = previewIframe.locator('#storybook-root, #root');
    await expect(previewRoot).toBeVisible();
    const childCount = await previewRoot.evaluate((el) => el.childElementCount);
    expect(childCount).toBeGreaterThan(0);

    await page.goto(`${baseURL}/?path=/story/core-args--default`);
    await sb.waitUntilLoaded();
    await expect(errorDisplay).toBeHidden();
    await expect(previewRoot).toBeVisible();
  } finally {
    await testInfo.attach('pageErrors', {
      body: JSON.stringify(pageErrors),
      contentType: 'application/json',
    });
    await testInfo.attach('consoleErrors', {
      body: JSON.stringify(consoleErrors),
      contentType: 'application/json',
    });
  }

  expect(filterPageErrors(pageErrors)).toEqual([]);

  const relevantConsoleErrors = consoleErrors.filter(
    (msg) => !/ERR_INTERNET_DISCONNECTED|Failed to load resource/i.test(msg),
  );
  expect(relevantConsoleErrors).toEqual([]);
});

Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

Screenshots

2026-05-18T06-41-22.819Z/pr-33-story-with-decorator-cebd3-ly-after-csf-type-narrowing-chromium/test-failed-1.png

2026-05-18T06-41-22.819Z/pr-33-story-with-decorator-cebd3-ly-after-csf-type-narrowing-chromium/test-failed-1.png

github-actions Bot pushed a commit that referenced this pull request May 19, 2026
@github-actions
Copy link
Copy Markdown

Verify Harness

Verdict: regression (target internal-ui)

Reason: PR-added unit tests failed (see unitTests.details)

PR-added unit tests: ❌ failed — 6941 passed, 1 failed across 2178 suite(s)

Files: code/core/src/csf/csf-factories.test.ts

vitest output (last 4KB)
      main -> main
To /home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-baselines-dirty-1pFpkl/remotes/mealdrop.git
 * [new branch]      main -> main
To /home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-baselines-dirty-1pFpkl/remotes/edgy.git
 * [new branch]      main -> main
To /home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-baselines-nested-no-legacy-tEPV2D/remotes/mealdrop.git
 * [new branch]      main -> main
To /home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-baselines-nested-no-legacy-tEPV2D/remotes/excalidraw.git
 * [new branch]      main -> main
Cloning into '/home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-staging-To4Ldb'...
warning: You appear to have cloned an empty repository.
done.
To /home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-baselines-auto-clone-m2m5Yj/remotes/mealdrop.git
 * [new branch]      main -> main
Cloning into '/home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-staging-ffZoRp'...
warning: You appear to have cloned an empty repository.
done.
To /home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-baselines-auto-clone-m2m5Yj/remotes/wikitok.git
 * [new branch]      main -> main
To /home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-storybook-version-7nxxDz/remotes/mealdrop.git
 * [new branch]      main -> main
To /home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-storybook-version-7nxxDz/remotes/wikitok.git
 * [new branch]      main -> main
To /home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-storybook-version-noop-S4b9Pi/remotes/mealdrop.git
 * [new branch]      main -> main
To /home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-baselines-target-behind-Gwk1ed/remotes/mealdrop.git
 * [new branch]      main -> main
To /home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-baselines-target-behind-Gwk1ed/remotes/edgy.git
 * [new branch]      main -> main
Cloning into '/home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-baselines-target-behind-Gwk1ed/edgy-remote-worktree'...
done.
To /home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-baselines-target-behind-Gwk1ed/remotes/edgy.git
   52d0881..d4e2904  main -> main
To /home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-storybook-version-dirty-1r4pxL/remotes/mealdrop.git
 * [new branch]      main -> main
Cloning into '/home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-storybook-version-staging-VuVLnh'...
warning: You appear to have cloned an empty repository.
done.
To /home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-storybook-version-auto-clone-mn47YN/remotes/mealdrop.git
 * [new branch]      main -> main
To /home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-storybook-version-skip-push-MpkUQP/remotes/mealdrop.git
 * [new branch]      main -> main
To /home/runner/work/_temp/pr-head/.verify-output/vitest-tmp/eval-sync-storybook-version-resume-push-PugR2g/remotes/mealdrop.git
 * [new branch]      main -> main
(node:21) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:21) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:21) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:21) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
JSON report written to /home/runner/work/_temp/pr-head/.verify-output/unit-tests-report.json

How Playwright validated this
test('csf decorator context typing change does not break story boot', async ({ page }, testInfo) => {
  const pageErrors: string[] = [];
  const consoleErrors: string[] = [];

  page.on('pageerror', (err) => {
    pageErrors.push(err.stack ?? err.message ?? String(err));
  });
  page.on('console', (msg) => {
    if (msg.type() === 'error') {
      consoleErrors.push(msg.text());
    }
  });

  const baseURL =
    process.env.STORYBOOK_URL ?? testInfo.project.use.baseURL ?? 'http://localhost:6006';

  try {
    await page.goto(`${baseURL}/?path=/story/example-button--primary`);

    const sb = new RecipePage(page, expect);
    await sb.waitUntilLoaded();

    const errorDisplay = page.locator('#sb-errordisplay');
    await expect(errorDisplay).toBeHidden();

    const previewIframe = sb.previewIframe();
    const previewRoot = previewIframe.locator('#storybook-root, #root');
    await expect(previewRoot).toBeAttached();

    const button = previewIframe.getByRole('button', { name: /button/i });
    await expect(button).toBeVisible();

    await page.goto(`${baseURL}/?path=/story/example-button--secondary`);
    await sb.waitUntilLoaded();
    await expect(errorDisplay).toBeHidden();
    const secondaryButton = previewIframe.getByRole('button', { name: /button/i });
    await expect(secondaryButton).toBeVisible();
  } finally {
    await testInfo.attach('pageErrors', {
      body: JSON.stringify(pageErrors),
      contentType: 'application/json',
    });
    await testInfo.attach('consoleErrors', {
      body: JSON.stringify(consoleErrors),
      contentType: 'application/json',
    });
  }

  expect(filterPageErrors(pageErrors)).toEqual([]);
  expect(filterConsoleErrors(consoleErrors)).toEqual([]);
});

Replay: npx playwright show-trace on the trace.zip listed under "Artifacts" on the run summary page.

Screenshots

2026-05-19T14-00-21.140Z/pr-33-csf-decorator-contex-b7f39-e-does-not-break-story-boot-chromium/test-finished-1.png

2026-05-19T14-00-21.140Z/pr-33-csf-decorator-contex-b7f39-e-does-not-break-story-boot-chromium/test-finished-1.png

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

Labels

ci:verify Trigger PR Verification Harness

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants