Skip to content

[WIP]: ci(frontend): report how a pull request changes the TypeScript error count - #8787

Open
talissoncosta wants to merge 3 commits into
mainfrom
ci/typescript-error-report-8786
Open

talissoncosta wants to merge 3 commits into
mainfrom
ci/typescript-error-report-8786

Conversation

@talissoncosta

@talissoncosta talissoncosta commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor
  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Closes #8786

Adds a report of how a PR changes the TypeScript error count, without blocking it.

  • On main, a job counts errors per file and keeps the count, with its commit, as an artifact.
  • On PRs, it counts once and compares with main's latest count. If the frontend changed between that count's commit and the PR's base, it says the count is out of date instead of guessing.
  • Sticky comment: 🟢 fewer, 🔴 more, with the files that changed (up to 30). It comments when the total moves or any file gains errors, and otherwise only refreshes an existing comment.
  • A newer push cancels the older run, so an old report never replaces a new one.
  • Not a required check. Fork PRs can't comment, so the report is also in the job summary.

Main has 879 errors in 315 files today.

How did you test this code?

Unit tests for the comparison (compare.test.ts): up, down, errors moved between files, unchanged, out of date, no count, and the 30-file cap. Locally, count on main gives 879 errors, matching CI.

Not yet run in CI. This PR gets no comment, since main has no count until it merges. The first PR after that is the real test.

…count

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 15, 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 Oct 15, 2026 3:14pm UTC
flagsmith-frontend-staging Ready Ready Preview Oct 15, 2026 3:14pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
docs Ignored Ignored Preview Oct 15, 2026 3:14pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 529ac126-49cd-4e30-9db0-d248de4516b6
📥 Commits

Reviewing files that changed from the base of the PR and between bb5b64c and 9ab94e2.

📒 Files selected for processing: 5
  • .github/workflows/frontend-typecheck.yml
  • frontend/scripts/typecheck-report/compare.test.ts
  • frontend/scripts/typecheck-report/compare.ts
  • frontend/scripts/typecheck-report/index.mjs
  • frontend/scripts/typecheck-report/package.json

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

📝 Walkthrough

The change adds a CLI to count TypeScript errors by file and compare counts between commits. A GitHub Actions workflow runs the count on pushes to main and on relevant pull requests. Push runs upload count artifacts. Pull request runs check the base count state, generate a comparison report, add it to the job summary, and post or update a comment. Tests cover count comparisons, stale or missing base counts, and the file listing limit.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 9ab94

The previously identified counting issue is fixed, and unrelated repository changes do not invalidate a frontend baseline. The change is mergeable after normal checks.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

✨ Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added ci-cd Build, test and deployment related and removed ci-cd Build, test and deployment related labels Oct 15, 2026
@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.88%. Comparing base (2a241c0) to head (9ab94e2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #8787    +/-   ##
========================================
  Coverage   98.87%   98.88%            
========================================
  Files        1681     1682     +1     
  Lines       69927    70303   +376     
========================================
+ Hits        69141    69517   +376     
  Misses        786      786            

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 8d93813e-b9a1-4c5f-a615-bb73a0bd9ff4
📥 Commits

Reviewing files that changed from the base of the PR and between 2a241c0 and bb5b64c.

📒 Files selected for processing: 2
  • .github/workflows/frontend-typecheck.yml
  • frontend/scripts/typecheck-report.mjs

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

Comment thread .github/workflows/frontend-typecheck.yml
Comment thread .github/workflows/frontend-typecheck.yml Outdated
Comment thread frontend/scripts/typecheck-report.mjs Outdated
…ed between files

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added ci-cd Build, test and deployment related and removed ci-cd Build, test and deployment related labels Oct 15, 2026
@talissoncosta
talissoncosta marked this pull request as ready for review October 15, 2026 15:26
@talissoncosta
talissoncosta requested review from a team as code owners October 15, 2026 15:26
@talissoncosta
talissoncosta requested review from kyle-ssg and removed request for a team October 15, 2026 15:26
@talissoncosta talissoncosta changed the title ci(frontend): report how a pull request changes the TypeScript error count [WIP]: ci(frontend): report how a pull request changes the TypeScript error count Oct 15, 2026
@github-actions github-actions Bot added ci-cd Build, test and deployment related and removed ci-cd Build, test and deployment related labels Oct 15, 2026
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Docker builds report

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

@github-actions

github-actions Bot commented Oct 15, 2026 •

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

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  1 minute, 5 seconds
commit  9ab94e2
info  🔄 Run: #22450 (attempt 1)

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

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  35.3 seconds
commit  9ab94e2
info  🔄 Run: #22450 (attempt 1)

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  34 seconds
commit  9ab94e2
info  🔄 Run: #22450 (attempt 1)

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

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

passed  20 passed
skipped  2 skipped

Details

stats  22 tests across 14 suites
duration  1 minute, 9 seconds
commit  9ab94e2
info  🔄 Run: #22450 (attempt 1)

Skipped tests

firefox › tests/flag-dependencies-test.pw.ts › Flag Dependencies › A flag can be gated behind another, and says so on both sides @oss
firefox › tests/onboarding-tests.pw.ts › Onboarding › New user connects via the single-page onboarding flow @oss

@github-actions

Copy link
Copy Markdown
Contributor

Visual Regression

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

This branch was successfully deployed

2 active deployments
Preview – flagsmith-frontend-staging — 9ab94e21 Deployed Oct 15, 2026 by vercel[bot]
Preview – flagsmith-frontend-preview — 9ab94e21 Deployed Oct 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-cd Build, test and deployment related front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Track TypeScript errors in CI

1 participant