Skip to content

chore(frontend): keep jest and tsc out of storybook-static - #8443

Closed
talissoncosta wants to merge 1 commit into
mainfrom
chore/ignore-storybook-static
Closed

chore(frontend): keep jest and tsc out of storybook-static#8443
talissoncosta wants to merge 1 commit into
mainfrom
chore/ignore-storybook-static

Conversation

@talissoncosta

Copy link
Copy Markdown
Contributor

Changes

npm run build-storybook writes a copy of the source into storybook-static/. It is gitignored, but neither jest nor tsc reads gitignore, so both walk into it and pick up a stale second copy of every test and every file.

Once the real source moves on, that copy stops compiling, and npm run typecheck and npm run test:unit start failing locally on code you never touched. CI checks out clean, so it never saw it.

How did you test this code?

Ran a Storybook build, confirmed npm run test:unit and npm run typecheck both reported failures from storybook-static/, then applied this and confirmed both are clean with the directory still present.

A Storybook build copies the source into storybook-static, and neither
jest nor tsc reads .gitignore, so both walk into it and work on a stale
second copy of everything. Once the source moves on, that copy stops
compiling and npm run typecheck and npm run test:unit fail locally for
reasons that have nothing to do with your branch.

CI checks out clean, so it never saw this.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@talissoncosta
talissoncosta requested a review from a team as a code owner September 2, 2026 13:09
@talissoncosta
talissoncosta requested review from kyle-ssg and removed request for a team September 2, 2026 13:09
@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
flagsmith-frontend-preview Ready Ready Preview Sep 2, 2026 1:10pm UTC
flagsmith-frontend-staging Ready Ready Preview Sep 2, 2026 1:10pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
docs Ignored Ignored Preview Sep 2, 2026 1:10pm UTC

Request Review

@talissoncosta
talissoncosta marked this pull request as draft September 2, 2026 13:09
@github-actions github-actions Bot added the front-end Issue related to the React Front End Dashboard label Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-8443 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-8443 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-8443 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-8443 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-8443 Finished ✅ Results

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: d01e5689-a613-4978-8fa0-634e5762fe86

📥 Commits

Reviewing files that changed from the base of the PR and between 4afabf4 and 7e6c085.

📒 Files selected for processing (2)
  • frontend/jest.config.js
  • frontend/tsconfig.json

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Jest now ignores tests in node_modules and storybook-static. TypeScript now excludes storybook-static alongside node_modules.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 7e6c0

This change prevents generated Storybook copies from causing duplicate test and typecheck failures without altering application runtime behavior. No actionable merge-blocking risk remains after normal checks and review.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor
✅ private-cloud · depot-ubuntu-latest-16 — run #20066 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  55.7 seconds
commit  7e6c085
info  🔄 Run: #20066 (attempt 1)

🗂️ Previous results
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #20066 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  37.7 seconds
commit  7e6c085
info  🔄 Run: #20066 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #20066 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  45.2 seconds
commit  7e6c085
info  🔄 Run: #20066 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #20066 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  38.1 seconds
commit  7e6c085
info  🔄 Run: #20066 (attempt 1)

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Visual Regression

19 screenshots compared. See report for details.
View full report

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

Labels

chore front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant