Skip to content

(janitor/dependencies) Remove unused @storybook/test-runner devDependency - #8896

Open
kilo-code-bot[bot] wants to merge 1 commit into
mainfrom
janitor/dependencies-remove-unused-storybook-test-runner
Open

kilo-code-bot[bot] wants to merge 1 commit into
mainfrom
janitor/dependencies-remove-unused-storybook-test-runner

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Removes a single high-confidence unused dependency from one workspace package:

Dependency Package Type Version removed
@storybook/test-runner @kilocode/storybook (apps/storybook) devDependency 0.24.4

Evidence each dependency is unused

@storybook/test-runner (the Storybook/Playwright test runner, invoked via its test-storybook binary):

  • No imports or requires. A repository-wide search for test-runner, test-storybook, and testStorybook (all file types, excluding node_modules/lockfile) returns zero source references.
  • No script reference. apps/storybook/package.json has no test-storybook (or any test) script; its scripts are storybook, build-storybook, preview, chromatic, generate-screenshot-stories, component-inventory, typecheck, clean.
  • No configuration reference. No .storybook/test-runner.*, no playwright.config.* in the storybook package, and it is not listed in .storybook/main.ts addons or framework options.
  • No CI reference. .github/workflows/chromatic.yml builds with pnpm build-storybook and runs chromatic --exit-zero-on-changes; there is no test-storybook invocation anywhere in .github.
  • Not a transitive/peer contract. In pnpm-lock.yaml it is a standalone direct devDependency of @kilocode/storybook; it is not a peer or optional peer of Chromatic (@chromatic-com/storybook) or any other dependency, and it is not a Storybook addon/preset/loader.
  • History. git log -S shows it was added wholesale in the monorepo restructure (#1315) and has never been referenced by any script, config, or CI workflow since.

Dynamic, configuration, and tooling references checked

  • Dynamic loading / naming convention: no require/import/glob by name, no storybook-discovered addon, no config-schema discovery.
  • Package scripts and config files: apps/storybook/package.json, .storybook/main.ts, .storybook/preview.ts, .storybook/storybook.css, tailwind.config.js, postcss.config.mjs, apps/web/knip.ts workspace entry, apps/mobile/knip.json.
  • CI/workflows: .github/workflows/chromatic.yml, ci.yml, notify-main-failure.yml.
  • Static analysis agreement: knip --dependencies (run from apps/web, which includes the storybook workspace) flags @storybook/test-runner as an unused devDependency, agreeing with the manual search.

Package publication and peer-dependency considerations

  • @kilocode/storybook is "private": true; it is not published, so there is no published peer/optional-dependency contract to preserve.
  • @storybook/test-runner declares no peers that other packages rely on through this declaration.
  • Removing it cannot cause reliance on an undeclared transitive: it is a leaf CLI test-runner with its own dependency tree, none of which is imported by storybook code.

Validation performed

  • pnpm install --no-frozen-lockfile regenerated the lockfile (638 deletions: the package plus its exclusive transitive graph — nyc, expect-playwright, jest-serializer-html, jest-process-manager, wait-on, playwright-core, etc.).
  • Lockfile diff inspected and reverted one unrelated peer-resolution churn hunk (@sentry/react-native → metro-config@0.87.1 re-keying) so the diff contains only the @storybook/test-runner removal (0 added lines).
  • pnpm install --frozen-lockfile --offline → Already up to date (lockfile is consistent with package.json).
  • pnpm --filter @kilocode/storybook typecheck (tsgo) → passes.
  • pnpm --filter @kilocode/storybook build-storybook → completes successfully.

Uncertainty

  • knip also flags @emotion/is-prop-valid, clsx, and tailwind-merge (dependencies) and @tailwindcss/typography (devDependency) in the same package. These were not removed because they are plausibly needed for webpack/hoisting resolution of components imported from apps/web, or (for @tailwindcss/typography) referenced transitively via @plugin '@tailwindcss/typography' in apps/web/src/app/globals.css which storybook imports. They were left in place to avoid accidental reliance on transitive deps.
  • knip flags @octokit/graphql-schema (web devDependency) as unused, but it is read off disk (node_modules/@octokit/graphql-schema/schema.json) in apps/web/src/routers/github-pr-review-graphql-schema.test.ts, so it was correctly not removed.
  • Postgres/Redis services were not started in this resource-constrained environment; no package here requires them for typecheck or build.

@kilo-code-bot kilo-code-bot Bot added the janitor Automated dead-code/duplication cleanup label Oct 26, 2026
@kilo-code-bot

kilo-code-bot Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Dependency-only removal of the unused @storybook/test-runner devDependency plus its exclusive lockfile graph; no source, script, config, or CI references remain, and the lockfile keeps surviving versions of every multi-version package.

Assumptions: [INFERENCE] Lockfile consistency relies on the author's reported pnpm install --frozen-lockfile run; no command execution was performed here. Spot checks found no dangling references to any removed package version.

Files Reviewed (2 files)
  • apps/storybook/package.json
  • pnpm-lock.yaml

Reviewed by deepseek-flash-latest · Input: 57K · Output: 6.6K · Cached: 487.9K

Review guidance: REVIEW.md from base branch main

This branch has not been deployed

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

Labels

janitor Automated dead-code/duplication cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants