Repository navigation
test(react-native): stub Animated in the shared react-native mock - #8206
Merged
Merged
Conversation
TypingIndicator creates Animated.Value refs at render time. The shared vitest mock had no Animated export, so CopilotChatInterrupt.test.tsx failed on 2.0.0 and every PR that affects react-native went red. 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
|
@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: |
Contributor
|
Size Change: 0 B Total Size: 2.39 MB ℹ️ View Unchanged
|
1 of 4 tasks
AlemTuzlak
added a commit
that referenced
this pull request
Nov 4, 2026
…hanged code (#8201) A new CI job fails when a change adds React Doctor or impeccable findings in `packages/`, `examples/`, or `showcase/`. Only changed code is checked, so the job needs no baseline file. After this merges, make `React Doctor and impeccable` a required check on `2.0.0`. ## What does this PR do? - **React Doctor 0.9.22 and impeccable 4.8.0** are exact root dev dependencies. - **`scripts/lint/react-ui-checks.sh`** runs the tools on what changed since a base ref (default `origin/2.0.0`, CI passes `HEAD^1`): - React Doctor uses its own `--scope changed` mode, so it reports only new issues. The script passes the changed React projects with `--project`, because `showcase/` is not in the pnpm workspace. - impeccable has no changed-only mode, so the script scans the changed UI files. Old findings in a file that you change count too. Tests and stories are skipped. - **`.github/workflows/static_react-ui.yml`** has one job with two steps. It has no `paths` filter, so it can be a required check. When nothing React-related changed, both steps exit 0. - **`doctor.config.json`** stops React Doctor from running the `.oxlintrc.json` rules (the oxlint job owns them). It also turns off the supply-chain scan, which needs the network. - **8 small fixes** for React Doctor findings in `react-native`, `channels-core`, and `markdown`, 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.yaml` diff 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/api` 1.9.0 → 1.9.1, the `lightningcss` peer of `vite` 1.32 → 1.33, and the `@babel/core` peer of `next` 8.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 - Linear PE-1070 - #8206 corrects the `react-native` test failure (`No "Animated" export is defined on the "react-native" mock`). That failure is already on `2.0.0` and makes `test / unit` fail on this PR. ## Checklist - [ ] I have read the [Contribution Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md) - [x] If the PR changes or adds functionality, I have updated the relevant documentation (`dev-docs/react-ui-checks.md`) - [ ] If the PR contains a breaking change, the title has `!` (for example `feat(react-core)!: ...`) and the description has a `BREAKING CHANGE:` line with migration steps. See [VERSIONING.md](https://github.com/CopilotKit/CopilotKit/blob/main/VERSIONING.md) - [ ] "Allow edits by maintainers" is checked (lets us help iterate on your PR directly — faster turnaround for everyone) ## Testing **Commands run:** - `pnpm install --frozen-lockfile --ignore-scripts`: passed. - `pnpm lint:react-doctor` and `pnpm lint:impeccable` on this branch: both exit 0. - `pnpm lint:dead-code` (knip): passed. `oxfmt --check` on the changed files: passed. - I did not run `actionlint`, because it is not installed. This PR is the first run of the workflow. **Manual test:** 1. Add `items.map((x, i) => <li key={i}>{x}</li>)` to a component in `packages/react-core`, in `examples/v2/react/demo`, and in `showcase/integrations/ag2`. 2. Run `pnpm lint:react-doctor`. It reports `react-doctor/no-array-index-as-key` in all three projects and exits 1. 3. Add one comment line to `examples/canvas/gemini/app/post-generator/page.tsx`, which has old findings. 4. Run `pnpm lint:impeccable`. It reports two `gradient-text` findings and exits 2. With `GITHUB_ACTIONS=true`, it writes them as GitHub annotations. 5. Revert the edits. Both commands exit 0 again. **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 - The lockfile change moves some optional peers to newer or older versions (listed above). If a build breaks because of this, revert this PR. - React Doctor warnings fail the check, not only errors (`--blocking warning`). To fail only on errors, change that flag in the script. - To roll back, revert this PR. Nothing else depends on it. 🤖 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.
CopilotChatInterrupt.test.tsxfails on2.0.0:TypingIndicatorcreatesAnimated.Valuerefs at render time, and the shared mock inpackages/react-native/src/__mocks__/react-native.tshas noAnimatedexport. Any PR into2.0.0that affects@copilotkit/react-nativefailstest / 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 ownAnimatedinvi.mockare unchanged.Verified: the test fails without the change with the error above. With it,
nx run @copilotkit/react-native:testpasses all 339 tests.🤖 Generated with Claude Code