Repository navigation
chore(lint): fail CI on new React Doctor and impeccable findings in changed code - #8201
Merged
Merged
Conversation
…act-native Fixes 8 React Doctor findings with no behavior change: - react-native: create the Animated.Value for the typing dots and the sidebar slide once with a lazy useState initializer, instead of on every render through useRef (rerender-lazy-ref-init). - markdown: push into the reduce accumulator instead of copying it on each segment (no-spread-accumulator-in-reduce). - channels-core: use a Set for the tool-call id, platform, and role lookups inside loops (js-set-map-lookups). Co-Authored-By: Claude Opus 5.5 <[email protected]>
The two tools get their own package and npm lockfile, outside the pnpm workspace. Adding react-doctor at the root moves @opentelemetry/api from 1.9.0 to 1.9.1 as a resolved peer across the whole root lockfile (langchain, angular, and others), which is churn unrelated to this check. doctor.config.json turns off adoptExistingLintConfig, so React Doctor does not repeat the .oxlintrc.json rules that the oxlint gate owns, and turns off the supply-chain scan, which needs the network. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…line scripts/lint/react-ui-checks.ts finds every tracked package.json under packages/, examples/, and showcase/ that lists react, runs one tool on those projects, and counts findings per (rule, file) with the same baseline logic as the oxlint gate (scripts/lint/baseline.ts). A count that goes up fails; a count that goes down asks for a prune. The baselines record the findings on 2.0.0 today: 3973 React Doctor findings in 111 rules and 829 impeccable findings in 17 rules. Advisory impeccable findings are not counted. Findings in untracked files are ignored, so local build output does not change the result. Commands: pnpm lint:react-doctor, pnpm lint:impeccable, and their :prune and :baseline variants. dev-docs/react-ui-checks.md explains how to fix a failure. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Adds static / react ui with two jobs, "React Doctor" and "impeccable detect", for pull requests into main and release lines such as 2.0.0. There is no paths filter on the trigger, so the jobs can be required checks. A scope job diffs the merge commit instead and skips both scans when nothing under examples/, showcase/, a React package, or the gate's own files changed. A skipped job counts as passed. push runs the full scan as a backstop. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review: 1
Please check the settings in the CodeRabbit UI or the
|
Contributor
|
Size Change: -5 B (0%) Total Size: 2.39 MB 📦 View Changed
ℹ️ View Unchanged
|
@copilotkit/a2ui-renderer
@copilotkit/agentcore-runner
@copilotkit/angular
@copilotkit/channels
@copilotkit/channels-core
@copilotkit/channels-discord
@copilotkit/channels-intelligence
@copilotkit/channels-slack
@copilotkit/channels-teams
@copilotkit/channels-ui
@copilotkit/channels-whatsapp
@copilotkit/core
@copilotkit/intelligence-langgraph
@copilotkit/intelligence-mastra
@copilotkit/learning
@copilotkit/markdown
@copilotkit/mcp-apps-renderer
@copilotkit/react-core
@copilotkit/react-native
@copilotkit/runtime
@copilotkit/sdk-js
@copilotkit/shared
@copilotkit/sqlite-runner
@copilotkit/voice
@copilotkit/vue
@copilotkit/web-components
@copilotkit/web-inspector
commit: |
…e baseline gate React Doctor has its own changed-only mode (--scope changed --base), so the custom gate script, its tests, and the per-file baseline files were not needed. impeccable has no such mode, so it scans the changed UI files. Both tools are now exact root dev dependencies instead of a separate npm package with its own lockfile. A ~30-line shell script passes the changed React projects to React Doctor, because showcase/ is not in the pnpm workspace. The workflow is one job with no scope job: the script exits 0 when nothing React-related changed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
AlemTuzlak
added a commit
that referenced
this pull request
Nov 4, 2026
) `CopilotChatInterrupt.test.tsx` fails on `2.0.0`: ``` Error: [vitest] No "Animated" export is defined on the "react-native" mock. ❯ TypingIndicator src/components/messages/TypingIndicator.tsx:24 ``` `TypingIndicator` creates `Animated.Value` refs at render time, and the shared mock in `packages/react-native/src/__mocks__/react-native.ts` has no `Animated` export. Any PR into `2.0.0` that affects `@copilotkit/react-native` fails `test / unit` (Node 20/22/24, React 19) because of it, including #8200 and #8201. This adds a no-op `Animated` (`Value`, `View`, `Text`, `timing`, `sequence`, `parallel`, `loop`, `delay`) to the shared mock. Tests that define their own `Animated` in `vi.mock` are unchanged. **Verified:** the test fails without the change with the error above. With it, `nx run @copilotkit/react-native:test` passes all 339 tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A new CI job fails when a change adds React Doctor or impeccable findings in
packages/,examples/, orshowcase/. Only changed code is checked, so the job needs no baseline file. After this merges, makeReact Doctor and impeccablea required check on2.0.0.What does this PR do?
scripts/lint/react-ui-checks.shruns the tools on what changed since a base ref (defaultorigin/2.0.0, CI passesHEAD^1):--scope changedmode, so it reports only new issues. The script passes the changed React projects with--project, becauseshowcase/is not in the pnpm workspace..github/workflows/static_react-ui.ymlhas one job with two steps. It has nopathsfilter, so it can be a required check. When nothing React-related changed, both steps exit 0.doctor.config.jsonstops React Doctor from running the.oxlintrc.jsonrules (the oxlint job owns them). It also turns off the supply-chain scan, which needs the network.react-native,channels-core, andmarkdown, with no behavior change.The first version of this PR had a 601-line gate script, two baseline files (4,802 findings), and a separate npm package with its own lockfile. All of that is gone.
Lockfile: the
pnpm-lock.yamldiff is about 2,800 lines. No package is removed, and no workspace package changes a direct dependency version. React Doctor adds 97 packages, and pnpm then reuses their newer versions as optional peers in other packages. For example,@opentelemetry/api1.9.0 → 1.9.1, thelightningcsspeer ofvite1.32 → 1.33, and the@babel/corepeer ofnext8.0.1 → 7.28.5. Pinning one of them moves the change to the next one, so this PR accepts it.Related PRs and Issues
react-nativetest failure (No "Animated" export is defined on the "react-native" mock). That failure is already on2.0.0and makestest / unitfail on this PR.Checklist
dev-docs/react-ui-checks.md)!(for examplefeat(react-core)!: ...) and the description has aBREAKING CHANGE:line with migration steps. See VERSIONING.mdTesting
Commands run:
pnpm install --frozen-lockfile --ignore-scripts: passed.pnpm lint:react-doctorandpnpm lint:impeccableon this branch: both exit 0.pnpm lint:dead-code(knip): passed.oxfmt --checkon the changed files: passed.actionlint, because it is not installed. This PR is the first run of the workflow.Manual test:
items.map((x, i) => <li key={i}>{x}</li>)to a component inpackages/react-core, inexamples/v2/react/demo, and inshowcase/integrations/ag2.pnpm lint:react-doctor. It reportsreact-doctor/no-array-index-as-keyin all three projects and exits 1.examples/canvas/gemini/app/post-generator/page.tsx, which has old findings.pnpm lint:impeccable. It reports twogradient-textfindings and exits 2. WithGITHUB_ACTIONS=true, it writes them as GitHub annotations.How this PR makes testing easy: both checks are root scripts that you can run locally. They include uncommitted changes, so step 1 needs no commit.
Risk / rollback
--blocking warning). To fail only on errors, change that flag in the script.🤖 Generated with Claude Code