Skip to content

feat!: remove v1 and the /v2 subpaths from react-core and runtime - #8084

Merged
AlemTuzlak merged 9 commits into
2.0.0from
alem/pe-1073-remove-v1-apis-and-the-old-uis
Oct 30, 2026
Merged

AlemTuzlak merged 9 commits into
2.0.0from
alem/pe-1073-remove-v1-apis-and-the-old-uis

Conversation

@AlemTuzlak

@AlemTuzlak AlemTuzlak commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Apps on 2.0 import everything from @copilotkit/react-core and @copilotkit/runtime directly. This PR removes the v1 SDK and the /v2 subpaths from both packages. To migrate an app, run npx codemod @copilotkit/v2-migration in the root of the app.

What does this PR do?

  • One API per package. The former v2 API is now at the package roots. The /v2 subpaths are removed.
  • v1 is removed. This includes @copilotkit/react-ui, @copilotkit/react-textarea, @copilotkit/runtime-client-gql, the service adapters, the GraphQL endpoint, and @copilotkit/runtime/langgraph.
  • A codemod for users. @copilotkit/v2-migration moves the imports and renames <CopilotKit> to <CopilotKitProvider>. It marks each v1 call that it cannot change with a TODO(copilotkit-2.0) comment. It also installs an agent skill that resolves these comments.
  • The repo uses the codemod. All packages and the workspace examples were migrated with it.
  • The public examples keep their paths. research-canvas and travel now send the @ag-ui/langgraph event names. The other examples/v1 folders were v1 only, and are removed.

Also in this PR:

  • The runtime drops the dependencies that only v1 used: graphql, type-graphql, class-validator, reflect-metadata, and 9 langchain peers.
  • The repo oxlint plugin moves from packages/react-ui/oxlint-rules to tools/oxlint-rules.
  • The v1 deprecation tooling keeps only the @copilotkit/sdk-js entry points.

BREAKING CHANGE: The v1 APIs and the /v2 subpaths of @copilotkit/react-core and @copilotkit/runtime are removed. To migrate:

  1. Commit your work.
  2. Run npx codemod @copilotkit/v2-migration in the root of the app.
  3. Search for TODO(copilotkit-2.0) and resolve each comment. The installed agent skill can do this step.
  4. Update all @copilotkit/* packages to 2.x.
  5. Remove @copilotkit/react-ui, @copilotkit/react-textarea, and @copilotkit/runtime-client-gql.

Related PRs and Issues

Checklist

  • I have read the Contribution Guide
  • If the PR changes or adds functionality, I have updated the relevant documentation
  • 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
  • "Allow edits by maintainers" is checked (lets us help iterate on your PR directly — faster turnaround for everyone)

The docs are not updated. PE-1088 tracks the 2.0 docs. The branch is in this repo, so the maintainer-edits box does not apply.

Testing

Commands run

  • nx run-many -t build for all JS packages: 29 passed.
  • nx run-many -t check-types: 44 projects passed.
  • nx run-many -t test publint attw: all passed, except 6 suites that also fail on a clean 2.0.0. These are starter-claude-managed-agents, starter-claude-managed-agents-flutter, react-native-demo, showcase-harness, showcase-strands-todo-tests, and showcase-shared-python.
  • nx run @copilotkit/v2-migration:test: 14 fixtures passed. The travel agent pytest run: 11 passed.
  • Skipped: the .NET, Go, and Ruby suites. This machine has no toolchains for them, so the main commit used --no-verify. CI runs these suites.

Manual test

  1. Run pnpm install, then pnpm nx run @copilotkit/v2-migration:test.
  2. Copy an app that uses v1 or the /v2 paths to a scratch folder. Commit it there.
  3. Run npx codemod workflow run -w <repo>/codemods/v2-migration/workflow.yaml --target <app> --no-interactive.
  4. Make sure that no /v2 import stays.
  5. Make sure that each v1 call the codemod did not change has a TODO(copilotkit-2.0) comment.

How this PR makes testing easy

  • The codemod has fixture pairs in codemods/v2-migration/tests. The @copilotkit/v2-migration:test target runs them.
  • The codemod migrated the repo itself. The diff in packages/ and examples/ is a large, real sample of its output.
  • Not added: an end-to-end test of the public examples with a live model and a LangGraph server.

Risk / rollback

  • LangGraph events. @ag-ui/langgraph does not handle the copilotkit_emit_* events from the CopilotKit SDKs. If an app uses these events, it loses state streaming until it sends the upstream names.
  • Telemetry. The agent_execution_stream_* events came only from v1, so they stop. PE-1114 tracks this.
  • research-canvas TypeScript agent. It now streams all tool calls to the UI. The old helper streamed only DeleteResources.
  • Flaky chart tests. Three react-core chart tests time out under heavy parallel load. They pass when they run alone.
  • Rollback. Revert this PR on 2.0.0. main is not affected.

Before the release:

  • Publish the codemod. First, a GitHub org admin must verify the @copilotkit scope on codemod.com.
  • The .cursor/rules files still point at the removed packages.

Public API change

Before

import { CopilotKit, CopilotChat } from "@copilotkit/react-core/v2";
import "@copilotkit/react-core/v2/styles.css";

<CopilotKit runtimeUrl="/api/copilotkit" agent="my_agent">
  <CopilotChat />
</CopilotKit>;
import { CopilotRuntime } from "@copilotkit/runtime/v2";
import { createCopilotExpressHandler } from "@copilotkit/runtime/v2/express";
import { LangGraphAgent } from "@copilotkit/runtime/langgraph";

After

import { CopilotKitProvider, CopilotChat } from "@copilotkit/react-core";
import "@copilotkit/react-core/styles.css";

<CopilotKitProvider runtimeUrl="/api/copilotkit" agentId="my_agent">
  <CopilotChat />
</CopilotKitProvider>;
import { CopilotRuntime } from "@copilotkit/runtime";
import { createCopilotExpressHandler } from "@copilotkit/runtime/express";
import { LangGraphAgent } from "@ag-ui/langgraph";

Before and after

Before After
Packages in this change 5: react-core, runtime, react-ui, react-textarea, runtime-client-gql 2: react-core, runtime
react-core entry points . (v1), ./v2, ./v2/generative-ui, ./v2/context, ./v2/headless, ./v2/styles.css ., ./generative-ui, ./context, ./headless, ./styles.css
runtime entry points . (v1), ./v2, ./v2/express, ./v2/hono, ./v2/node, ./langgraph, ./internal/learned-skills ., ./express, ./hono, ./node, ./internal/learned-skills
react-core source (ts/tsx, with tests) 455 files, 138,715 lines 363 files, 122,389 lines
runtime source (ts/tsx, with tests) 423 files, 115,964 lines 311 files, 93,701 lines
react-core dependencies 29 26
runtime dependencies 44 32
runtime peer dependencies 11 2 (express, openai)

Diff by area

Area Files Lines
packages/react-core 471 +215 / −16,595
packages/runtime 404 +132 / −25,233
packages/react-ui (deleted) 95 −10,756
packages/react-textarea (deleted) 72 −4,858
packages/runtime-client-gql (deleted) 23 −5,548
examples/v1 326 +408 / −86,510
codemods/v2-migration (new) 39 +2,026
pnpm-lock.yaml 1 +383 / −5,956
Total 1,634 +3,799 / −158,685

Removed dependencies

  • react-core: @copilotkit/runtime-client-gql, lit, and untruncate-json.
  • runtime, the GraphQL stack: graphql, graphql-yoga, @graphql-yoga/plugin-defer-stream, graphql-scalars, type-graphql, reflect-metadata, class-validator, and class-transformer.
  • runtime, other: @ag-ui/langgraph, @segment/analytics-node, partial-json, and uuid.
  • runtime peers: @anthropic-ai/sdk, groq-sdk, langchain, @langchain/aws, @langchain/community, @langchain/core, @langchain/google-gauth, @langchain/langgraph-sdk, and @langchain/openai.

What the codemod does

Users run npx codemod @copilotkit/v2-migration in the root of the app. The codemod makes the safe changes. It marks all other changes with a comment for a person or an agent.

Changes that the codemod makes

  1. Import paths. It changes /v2 and its subpaths to the package roots. It changes @copilotkit/react-ui/styles.css to @copilotkit/react-core/styles.css. It also changes these paths in import(), require(), and vi.mock() strings.
  2. The provider. It renames <CopilotKit> to <CopilotKitProvider>, and CopilotKitProps to CopilotKitProviderProps. On the provider, it changes agent= to agentId=.
  3. v1 imports that keep their name in 2.0. It moves these imports to the new package. For example, CopilotChat, CopilotPopup, and CopilotSidebar move from react-ui to react-core. A note tells the user that their props changed.
  4. LangGraph imports. It moves LangGraphAgent and LangGraphHttpAgent to @ag-ui/langgraph. A note tells the user that @ag-ui/langgraph does not handle the copilotkit_emit_* events.

Comments that the codemod adds

For each other v1 API, the codemod adds a TODO(copilotkit-2.0) comment above the import. The comment names the 2.0 replacement and its docs page:

// TODO(copilotkit-2.0): `useCopilotAction` was removed in 2.0. Use `useFrontendTool` from "@copilotkit/react-core" instead. Its API is different: https://docs.copilotkit.ai/reference/v2/hooks/useFrontendTool
// TODO(copilotkit-2.0): `OpenAIAdapter` was removed in 2.0 and has no direct replacement. See https://docs.copilotkit.ai/runtime-server-adapter

Each v1-only provider prop gets a comment next to the prop:

/* TODO(copilotkit-2.0): `threadId` is no longer a provider prop. Pass it to `<CopilotChat threadId>`, or wrap the chat in `<CopilotChatConfigurationProvider threadId>`. */ threadId="thread-1"

The data for these comments comes from a snapshot of the v1 API in scripts/v1-api.ts. The snapshot has 206 exports: react-core 79, react-ui 38, react-textarea 14, runtime 69, and runtime/langgraph 6.

At the end, the codemod installs an agent skill. The skill resolves the comments, updates package.json, and runs the build.

Limits

  • A second run changes nothing.
  • The codemod changes only full import paths. It ignores strings such as "constructor", and the prototype-keys fixture tests this.
  • It does not change CSS @import lines or template literals.
  • The user must run it before the package upgrade. On code that is already migrated, it reads root imports as v1 imports and adds comments that are not necessary.

🤖 Generated with Claude Code

AlemTuzlak and others added 3 commits October 29, 2026 13:44
Users migrate to 2.0 with `npx codemod @copilotkit/v2-migration`, published
to the Codemod registry. It moves the /v2 import paths to the package roots,
renames CopilotKitProvider to CopilotKit and agent= to agentId=, moves v1
imports whose 2.0 API is the same, and marks every other v1 API with a
TODO(copilotkit-2.0) comment that names its replacement. A packaged agent
skill resolves the TODOs.

scripts/v1-api.ts snapshots scripts/deprecations/v1-public-api.mjs, which
stops working once v1 is deleted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The 2.0 provider stays CopilotKitProvider. The codemod now moves the v1
  <CopilotKit> (also re-exported from /v2) to it, instead of renaming
  CopilotKitProvider to CopilotKit.
- Table lookups used `in`, so strings such as "constructor" or "toString"
  matched Object.prototype and were rewritten to the Object function's
  source. Lookups now read own keys only, with a regression fixture.
- Document --allow-dirty for non-interactive runs, and that paths inside
  template literals are left alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2.0 drops the v1 SDK. react-core and runtime now export the former v2 API
from their package roots, and the /v2 subpaths are gone:

- @copilotkit/react-core/v2[/headless|/context|/generative-ui|/styles.css]
  -> @copilotkit/react-core[/headless|/context|/generative-ui|/styles.css]
- @copilotkit/runtime/v2[/express|/hono|/node]
  -> @copilotkit/runtime[/express|/hono|/node]

Removed with v1:
- @copilotkit/react-ui, @copilotkit/react-textarea, @copilotkit/runtime-client-gql
- @copilotkit/runtime/langgraph; LangGraph agents come from @ag-ui/langgraph
- the v1 CopilotKit provider: use CopilotKitProvider (agent -> agentId)
- the service adapters and the GraphQL endpoint, and the dependencies only
  they used (graphql, type-graphql, class-validator, langchain peers, ...)

The v2 code that still lived in v1 (logger, telemetry notice, MCP endpoint
description, test helpers) moved into the flattened sources. In-repo
packages and the workspace examples were migrated with the
@copilotkit/v2-migration codemod; the five public examples in examples/v1
stay at their paths, and research-canvas and travel now send the
@ag-ui/langgraph event names instead of the CopilotKit ones. The other
examples/v1 folders were v1-only and are deleted.

The repo's oxlint plugin lived in react-ui and moves to tools/oxlint-rules.

Refs PE-1073

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@linear-code

linear-code Bot commented Oct 29, 2026

Copy link
Copy Markdown

PE-1073

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review: 1
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • 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.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Production Digest-Pinning Audit

All 43 services digest-pinned.

Run 2026-10-30 02:30:43 PDT — 0 finding(s).

@pkg-pr-new

pkg-pr-new Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
@copilotkit/a2ui-renderer

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/a2ui-renderer@8084

@copilotkit/agentcore-runner

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/agentcore-runner@8084

@copilotkit/angular

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/angular@8084

@copilotkit/channels

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/channels@8084

@copilotkit/channels-core

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/channels-core@8084

@copilotkit/channels-discord

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/channels-discord@8084

@copilotkit/channels-intelligence

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/channels-intelligence@8084

@copilotkit/channels-slack

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/channels-slack@8084

@copilotkit/channels-teams

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/channels-teams@8084

@copilotkit/channels-ui

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/channels-ui@8084

@copilotkit/channels-whatsapp

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/channels-whatsapp@8084

@copilotkit/core

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/core@8084

@copilotkit/intelligence-langgraph

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/intelligence-langgraph@8084

@copilotkit/intelligence-mastra

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/intelligence-mastra@8084

@copilotkit/learning

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/learning@8084

@copilotkit/markdown-renderer

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/markdown-renderer@8084

@copilotkit/mcp-apps-renderer

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/mcp-apps-renderer@8084

@copilotkit/react-core

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/react-core@8084

@copilotkit/react-native

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/react-native@8084

@copilotkit/runtime

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/runtime@8084

@copilotkit/sdk-js

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/sdk-js@8084

@copilotkit/shared

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/shared@8084

@copilotkit/sqlite-runner

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/sqlite-runner@8084

@copilotkit/voice

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/voice@8084

@copilotkit/vue

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/vue@8084

@copilotkit/web-components

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/web-components@8084

@copilotkit/web-inspector

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkit/web-inspector@8084

commit: 10c4035

@github-actions

Copy link
Copy Markdown
Contributor

Size Change: -210 kB (-9.48%) ✅

Total Size: 2.01 MB

📦 View Changed
Filename Size Change
packages/react-core/dist/context.cjs 1.58 kB +1.58 kB (new file) 🆕
packages/react-core/dist/context.mjs 1.5 kB +1.5 kB (new file) 🆕
packages/react-core/dist/copilotkit-BhxCUyTc.cjs 0 B -154 kB (removed) 🏆
packages/react-core/dist/copilotkit-DmqMXKmp.mjs 0 B -157 kB (removed) 🏆
packages/react-core/dist/generative-ui.cjs 71.1 kB +71.1 kB (new file) 🆕
packages/react-core/dist/generative-ui.mjs 70.5 kB +70.5 kB (new file) 🆕
packages/react-core/dist/headless.cjs 17.7 kB +17.7 kB (new file) 🆕
packages/react-core/dist/headless.mjs 17.2 kB +17.2 kB (new file) 🆕
packages/react-core/dist/index.cjs 139 kB +121 kB (+680.28%) 🆘
packages/react-core/dist/index.mjs 139 kB +121 kB (+682.06%) 🆘
packages/react-core/dist/index.umd.js 174 kB +57.6 kB (+49.51%) 🆘
packages/react-core/dist/MarkdownSurfaces-C2XZISKn.cjs 39.4 kB +39.4 kB (new file) 🆕
packages/react-core/dist/MarkdownSurfaces-Cegn7Uov.mjs 0 B -38.8 kB (removed) 🏆
packages/react-core/dist/MarkdownSurfaces-ChSlVYOk.mjs 38.8 kB +38.8 kB (new file) 🆕
packages/react-core/dist/MarkdownSurfaces-YovhyDuj.cjs 0 B -39.4 kB (removed) 🏆
packages/react-core/dist/v2/context.cjs 0 B -1.58 kB (removed) 🏆
packages/react-core/dist/v2/context.mjs 0 B -1.5 kB (removed) 🏆
packages/react-core/dist/v2/generative-ui.cjs 0 B -71.1 kB (removed) 🏆
packages/react-core/dist/v2/generative-ui.mjs 0 B -70.5 kB (removed) 🏆
packages/react-core/dist/v2/headless.cjs 0 B -17.7 kB (removed) 🏆
packages/react-core/dist/v2/headless.mjs 0 B -17.2 kB (removed) 🏆
packages/react-core/dist/v2/index.cjs 0 B -4.41 kB (removed) 🏆
packages/react-core/dist/v2/index.mjs 0 B -4.4 kB (removed) 🏆
packages/react-core/dist/v2/index.umd.js 0 B -191 kB (removed) 🏆
packages/react-native/dist/components/index.cjs 8.15 kB -6 B (-0.07%)
packages/react-native/dist/components/index.mjs 8.01 kB -3 B (-0.04%)
packages/react-native/dist/CopilotKitProvider-Byw3cqe2.cjs 1.58 kB +1.58 kB (new file) 🆕
packages/react-native/dist/CopilotKitProvider-CE4bc6CP.mjs 1.48 kB +1.48 kB (new file) 🆕
packages/react-native/dist/CopilotKitProvider-DaZQu8Ce.mjs 0 B -1.49 kB (removed) 🏆
packages/react-native/dist/CopilotKitProvider-DpJX6g4_.cjs 0 B -1.59 kB (removed) 🏆
packages/react-native/dist/headless.cjs 632 B -9 B (-1.4%)
packages/react-native/dist/headless.mjs 370 B -3 B (-0.8%)
packages/react-native/dist/index.cjs 6.59 kB -7 B (-0.11%)
packages/react-native/dist/index.mjs 6.22 kB -4 B (-0.06%)
packages/voice/dist/index.umd.js 1.49 kB -5 B (-0.33%)
packages/voice/dist/transcription/transcription-service-openai.cjs 486 B -9 B (-1.82%)
packages/voice/dist/transcription/transcription-service-openai.mjs 430 B -4 B (-0.92%)
ℹ️ View Unchanged
Filename Size
packages/a2ui-renderer/dist/_virtual/_rolldown/runtime.cjs 516 B
packages/a2ui-renderer/dist/a2ui-types.cjs 472 B
packages/a2ui-renderer/dist/a2ui-types.mjs 469 B
packages/a2ui-renderer/dist/index.cjs 959 B
packages/a2ui-renderer/dist/index.mjs 637 B
packages/a2ui-renderer/dist/index.umd.js 13.5 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/A2uiSurface.cjs 1.52 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/A2uiSurface.mjs 1.46 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/adapter.cjs 1.57 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/adapter.mjs 1.5 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/AudioPlayer.cjs 920 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/AudioPlayer.mjs 508 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Button.cjs 1.03 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Button.mjs 622 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Card.cjs 845 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Card.mjs 435 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/CheckBox.cjs 1.11 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/CheckBox.mjs 1.04 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/ChildList.cjs 799 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/ChildList.mjs 737 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/ChoicePicker.cjs 1.65 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/ChoicePicker.mjs 1.58 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Column.cjs 856 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Column.mjs 802 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/DateTimeInput.cjs 1.12 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/DateTimeInput.mjs 1.05 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Divider.cjs 856 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Divider.mjs 446 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Icon.cjs 877 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Icon.mjs 469 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Image.cjs 995 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Image.mjs 587 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/List.cjs 920 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/List.mjs 508 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Modal.cjs 1.21 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Modal.mjs 1.15 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Row.cjs 855 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Row.mjs 801 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Slider.cjs 1.07 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Slider.mjs 1 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Tabs.cjs 1.11 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Tabs.mjs 1.06 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Text.cjs 919 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Text.mjs 504 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/TextField.cjs 1.22 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/TextField.mjs 1.15 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Video.cjs 788 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Video.mjs 378 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/index.cjs 928 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/index.mjs 855 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/utils.cjs 594 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/utils.mjs 571 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Button.cjs 989 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Button.mjs 584 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/ChildList.cjs 800 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/ChildList.mjs 735 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Column.cjs 1.08 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Column.mjs 1.02 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Row.cjs 1.07 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Row.mjs 1.01 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Text.cjs 894 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/Text.mjs 839 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/TextField.cjs 1.21 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/components/TextField.mjs 802 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/index.cjs 849 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/minimal/index.mjs 804 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/index.cjs 310 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/index.mjs 325 B
packages/a2ui-renderer/dist/react-renderer/catalog-utils.cjs 1.66 kB
packages/a2ui-renderer/dist/react-renderer/catalog-utils.mjs 1.59 kB
packages/a2ui-renderer/dist/react-renderer/core/A2UIProvider.cjs 1.5 kB
packages/a2ui-renderer/dist/react-renderer/core/A2UIProvider.mjs 1.42 kB
packages/a2ui-renderer/dist/react-renderer/core/A2UIRenderer.cjs 728 B
packages/a2ui-renderer/dist/react-renderer/core/A2UIRenderer.mjs 671 B
packages/a2ui-renderer/dist/react-renderer/create-catalog.cjs 1.35 kB
packages/a2ui-renderer/dist/react-renderer/create-catalog.mjs 1.28 kB
packages/a2ui-renderer/dist/react-renderer/filter-catalog.cjs 622 B
packages/a2ui-renderer/dist/react-renderer/filter-catalog.mjs 569 B
packages/a2ui-renderer/dist/react-renderer/hooks/useA2UI.cjs 316 B
packages/a2ui-renderer/dist/react-renderer/hooks/useA2UI.mjs 309 B
packages/a2ui-renderer/dist/react-renderer/index.cjs 409 B
packages/a2ui-renderer/dist/react-renderer/index.mjs 568 B
packages/a2ui-renderer/dist/react-renderer/lib/utils.cjs 236 B
packages/a2ui-renderer/dist/react-renderer/lib/utils.mjs 188 B
packages/a2ui-renderer/dist/react-renderer/styles/index.cjs 239 B
packages/a2ui-renderer/dist/react-renderer/styles/index.mjs 231 B
packages/a2ui-renderer/dist/react-renderer/theme/ThemeContext.cjs 436 B
packages/a2ui-renderer/dist/react-renderer/theme/ThemeContext.mjs 381 B
packages/core/dist/index.cjs 107 kB
packages/core/dist/index.mjs 106 kB
packages/core/dist/index.umd.js 113 kB
packages/mcp-apps-renderer/dist/activity.cjs 259 B
packages/mcp-apps-renderer/dist/activity.mjs 170 B
packages/mcp-apps-renderer/dist/activity.umd.js 2.24 kB
packages/mcp-apps-renderer/dist/constants.cjs 714 B
packages/mcp-apps-renderer/dist/constants.mjs 712 B
packages/mcp-apps-renderer/dist/content-schema.cjs 768 B
packages/mcp-apps-renderer/dist/content-schema.mjs 765 B
packages/mcp-apps-renderer/dist/follow-up.cjs 796 B
packages/mcp-apps-renderer/dist/follow-up.mjs 794 B
packages/mcp-apps-renderer/dist/index.mjs 369 B
packages/mcp-apps-renderer/dist/request-queue.mjs 2.39 kB
packages/mcp-apps-renderer/dist/sandbox.mjs 2 kB
packages/mcp-apps-renderer/dist/session.mjs 6.91 kB
packages/react-native/dist/Markdown-C_9Re36O.cjs 803 B
packages/react-native/dist/Markdown-C6AsLHmd.mjs 677 B
packages/react-native/dist/MarkdownRendererContext-BRNe808d.cjs 915 B
packages/react-native/dist/MarkdownRendererContext-CAnuohIS.mjs 431 B
packages/react-native/dist/polyfills.cjs 193 B
packages/react-native/dist/polyfills.mjs 195 B
packages/react-native/dist/polyfills/crypto.cjs 373 B
packages/react-native/dist/polyfills/crypto.mjs 381 B
packages/react-native/dist/polyfills/dom.cjs 540 B
packages/react-native/dist/polyfills/dom.mjs 550 B
packages/react-native/dist/polyfills/encoding.cjs 345 B
packages/react-native/dist/polyfills/encoding.mjs 307 B
packages/react-native/dist/polyfills/location.cjs 236 B
packages/react-native/dist/polyfills/location.mjs 244 B
packages/react-native/dist/polyfills/streams.cjs 383 B
packages/react-native/dist/polyfills/streams.mjs 339 B
packages/react-native/dist/streaming-fetch-Bm91EsRc.cjs 2.36 kB
packages/react-native/dist/streaming-fetch-Dm1oN4f2.mjs 2.31 kB
packages/shared/dist/_virtual/_rolldown/runtime.cjs 516 B
packages/shared/dist/a2ui-envelope.cjs 2.45 kB
packages/shared/dist/a2ui-envelope.mjs 2.43 kB
packages/shared/dist/a2ui-prompts.cjs 7.65 kB
packages/shared/dist/a2ui-prompts.mjs 7.59 kB
packages/shared/dist/attachments/content.cjs 255 B
packages/shared/dist/attachments/content.mjs 253 B
packages/shared/dist/attachments/utils.cjs 1.83 kB
packages/shared/dist/attachments/utils.mjs 1.79 kB
packages/shared/dist/constants/index.cjs 501 B
packages/shared/dist/constants/index.mjs 480 B
packages/shared/dist/debug.cjs 454 B
packages/shared/dist/debug.mjs 452 B
packages/shared/dist/event-transforms/index.cjs 335 B
packages/shared/dist/event-transforms/index.mjs 165 B
packages/shared/dist/event-transforms/open-generative-ui-middleware.cjs 2.42 kB
packages/shared/dist/event-transforms/open-generative-ui-middleware.mjs 2.35 kB
packages/shared/dist/event-transforms/recorded-events.cjs 988 B
packages/shared/dist/event-transforms/recorded-events.mjs 925 B
packages/shared/dist/finalize-events.cjs 1.94 kB
packages/shared/dist/finalize-events.mjs 1.88 kB
packages/shared/dist/generative-ui/basic-functions.cjs 2.46 kB
packages/shared/dist/generative-ui/basic-functions.mjs 2.41 kB
packages/shared/dist/generative-ui/child-refs.cjs 2.34 kB
packages/shared/dist/generative-ui/child-refs.mjs 2.27 kB
packages/shared/dist/generative-ui/is-record.cjs 226 B
packages/shared/dist/generative-ui/is-record.mjs 223 B
packages/shared/dist/generative-ui/prompt.cjs 3.65 kB
packages/shared/dist/generative-ui/prompt.mjs 3.63 kB
packages/shared/dist/generative-ui/render-ui-args.cjs 1.48 kB
packages/shared/dist/generative-ui/render-ui-args.mjs 1.46 kB
packages/shared/dist/generative-ui/types.cjs 1.57 kB
packages/shared/dist/generative-ui/types.mjs 1.52 kB
packages/shared/dist/generative-ui/validate-operation.cjs 5.61 kB
packages/shared/dist/generative-ui/validate-operation.mjs 5.55 kB
packages/shared/dist/index.cjs 3.85 kB
packages/shared/dist/index.mjs 3.25 kB
packages/shared/dist/index.umd.js 53.8 kB
packages/shared/dist/intelligence-routing-fields.cjs 778 B
packages/shared/dist/intelligence-routing-fields.mjs 775 B
packages/shared/dist/logger.cjs 112 B
packages/shared/dist/logger.mjs 112 B
packages/shared/dist/open-generative-ui-prompts.cjs 1.59 kB
packages/shared/dist/open-generative-ui-prompts.mjs 1.59 kB
packages/shared/dist/package.cjs 181 B
packages/shared/dist/package.mjs 116 B
packages/shared/dist/standard-schema.cjs 740 B
packages/shared/dist/standard-schema.mjs 737 B
packages/shared/dist/telemetry/index.cjs 358 B
packages/shared/dist/telemetry/index.mjs 250 B
packages/shared/dist/telemetry/lambda-client.cjs 1.59 kB
packages/shared/dist/telemetry/lambda-client.mjs 1.58 kB
packages/shared/dist/telemetry/model-host.cjs 1.63 kB
packages/shared/dist/telemetry/model-host.mjs 1.63 kB
packages/shared/dist/telemetry/sampling.cjs 956 B
packages/shared/dist/telemetry/sampling.mjs 935 B
packages/shared/dist/telemetry/telemetry-client.cjs 1.89 kB
packages/shared/dist/telemetry/telemetry-client.mjs 1.83 kB
packages/shared/dist/telemetry/telemetry-disabled.cjs 454 B
packages/shared/dist/telemetry/telemetry-disabled.mjs 451 B
packages/shared/dist/telemetry/utils.cjs 271 B
packages/shared/dist/telemetry/utils.mjs 268 B
packages/shared/dist/transcription-errors.cjs 951 B
packages/shared/dist/transcription-errors.mjs 944 B
packages/shared/dist/utils/clipboard.cjs 407 B
packages/shared/dist/utils/clipboard.mjs 405 B
packages/shared/dist/utils/conditions.cjs 540 B
packages/shared/dist/utils/conditions.mjs 536 B
packages/shared/dist/utils/console-styling.cjs 1.23 kB
packages/shared/dist/utils/console-styling.mjs 1.21 kB
packages/shared/dist/utils/dashboard-url.cjs 415 B
packages/shared/dist/utils/dashboard-url.mjs 413 B
packages/shared/dist/utils/errors.cjs 4.51 kB
packages/shared/dist/utils/errors.mjs 4.41 kB
packages/shared/dist/utils/index.cjs 1.5 kB
packages/shared/dist/utils/index.mjs 1.82 kB
packages/shared/dist/utils/inspector-learning.cjs 2.74 kB
packages/shared/dist/utils/inspector-learning.mjs 2.73 kB
packages/shared/dist/utils/inspector-metadata.cjs 1.44 kB
packages/shared/dist/utils/inspector-metadata.mjs 1.43 kB
packages/shared/dist/utils/inspector-visibility.cjs 285 B
packages/shared/dist/utils/inspector-visibility.mjs 282 B
packages/shared/dist/utils/json-schema.cjs 1.97 kB
packages/shared/dist/utils/json-schema.mjs 1.91 kB
packages/shared/dist/utils/random-id.cjs 618 B
packages/shared/dist/utils/random-id.mjs 559 B
packages/shared/dist/utils/requests.cjs 706 B
packages/shared/dist/utils/requests.mjs 704 B
packages/shared/dist/utils/row-render-keys.cjs 3.38 kB
packages/shared/dist/utils/row-render-keys.mjs 3.36 kB
packages/shared/dist/utils/types.cjs 161 B
packages/shared/dist/utils/types.mjs 160 B
packages/voice/dist/_virtual/_rolldown/runtime.cjs 516 B
packages/voice/dist/index.cjs 175 B
packages/voice/dist/index.mjs 95 B
packages/web-inspector/dist/assets/inspector-logo-kite.cjs 2.36 kB
packages/web-inspector/dist/assets/inspector-logo-kite.mjs 2.3 kB
packages/web-inspector/dist/assets/inspector-logo.cjs 4.32 kB
packages/web-inspector/dist/assets/inspector-logo.mjs 4.23 kB
packages/web-inspector/dist/components/generative-ui-view.cjs 7.95 kB
packages/web-inspector/dist/components/generative-ui-view.mjs 7.93 kB
packages/web-inspector/dist/components/learning-view.cjs 11.2 kB
packages/web-inspector/dist/components/learning-view.mjs 11.2 kB
packages/web-inspector/dist/index.cjs 132 kB
packages/web-inspector/dist/index.mjs 132 kB
packages/web-inspector/dist/index.umd.js 209 kB
packages/web-inspector/dist/lib/context-helpers.cjs 866 B
packages/web-inspector/dist/lib/context-helpers.mjs 835 B
packages/web-inspector/dist/lib/home-briefing.cjs 2.8 kB
packages/web-inspector/dist/lib/home-briefing.mjs 2.79 kB
packages/web-inspector/dist/lib/hud-config.cjs 1.34 kB
packages/web-inspector/dist/lib/hud-config.mjs 1.33 kB
packages/web-inspector/dist/lib/hud-defaults.cjs 287 B
packages/web-inspector/dist/lib/hud-defaults.mjs 285 B
packages/web-inspector/dist/lib/hud-loader.cjs 557 B
packages/web-inspector/dist/lib/hud-loader.mjs 546 B
packages/web-inspector/dist/lib/inspector-learning.cjs 754 B
packages/web-inspector/dist/lib/inspector-learning.mjs 732 B
packages/web-inspector/dist/lib/inspector-metadata.cjs 760 B
packages/web-inspector/dist/lib/inspector-metadata.mjs 750 B
packages/web-inspector/dist/lib/inspector-nav.cjs 685 B
packages/web-inspector/dist/lib/inspector-nav.mjs 661 B
packages/web-inspector/dist/lib/json-block.cjs 1.95 kB
packages/web-inspector/dist/lib/json-block.mjs 1.91 kB
packages/web-inspector/dist/lib/learning-setup.cjs 1.12 kB
packages/web-inspector/dist/lib/learning-setup.mjs 1.09 kB
packages/web-inspector/dist/lib/notification-loader.cjs 792 B
packages/web-inspector/dist/lib/notification-loader.mjs 786 B
packages/web-inspector/dist/lib/notifications.cjs 2.39 kB
packages/web-inspector/dist/lib/notifications.mjs 2.37 kB
packages/web-inspector/dist/lib/onboarding-prompt.cjs 2.38 kB
packages/web-inspector/dist/lib/onboarding-prompt.mjs 2.37 kB
packages/web-inspector/dist/lib/persistence.cjs 3.61 kB
packages/web-inspector/dist/lib/persistence.mjs 3.52 kB
packages/web-inspector/dist/lib/pop-out.cjs 1.07 kB
packages/web-inspector/dist/lib/pop-out.mjs 1.05 kB
packages/web-inspector/dist/lib/telemetry.cjs 5.59 kB
packages/web-inspector/dist/lib/telemetry.mjs 5.38 kB
packages/web-inspector/dist/lib/thread-selection.cjs 566 B
packages/web-inspector/dist/lib/thread-selection.mjs 563 B
packages/web-inspector/dist/package.cjs 181 B
packages/web-inspector/dist/package.mjs 116 B
packages/web-inspector/dist/styles/generated.cjs 20.1 kB
packages/web-inspector/dist/styles/generated.mjs 20 kB
packages/web-inspector/dist/styles/notification-article.cjs 1.44 kB
packages/web-inspector/dist/styles/notification-article.mjs 1.44 kB

compressed-size-action

@AlemTuzlak
AlemTuzlak merged commit 0519278 into 2.0.0 Oct 30, 2026
82 of 100 checks passed
@AlemTuzlak
AlemTuzlak deleted the alem/pe-1073-remove-v1-apis-and-the-old-uis branch October 30, 2026 09:48
AlemTuzlak added a commit that referenced this pull request Oct 30, 2026
Adapt the native styles work to #8084, which moved react-core's src/v2 up
to src and removed the /v2 subpaths:

- react-core: no ./styles.css export, no build:css, and no Tailwind or
  class-merge dependencies. src/index.ts exports CopilotKitStyles.
- Examples drop the new @copilotkit/react-core/styles.css imports.
- web-components keep reading the theme from core's theme.css.
- The v2-migration codemod deletes stylesheet imports instead of
  rewriting them to @copilotkit/react-core/styles.css, which no longer
  exists. remove-stylesheet-import also removes that path and the v1
  @copilotkit/react-ui/styles.css.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
AlemTuzlak added a commit that referenced this pull request Nov 3, 2026
…start

The page came into 2.0.0 from main and still imported
@copilotkit/react-core/v2 and @copilotkit/runtime/v2, which #8084 removed.
Use the root entry points and CopilotKitProvider, and drop the stylesheet
import, so check-docs-snippets passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
AlemTuzlak added a commit that referenced this pull request Nov 4, 2026
…or breaks (#8202)

Most react-core slot tests passed with slot overrides switched off. This
PR rewrites them so that they fail when a slot breaks. It also deletes
tests that guard nothing. No production code changes.

Part of PE-1086. v1 and the GraphQL runtime are already gone from
`2.0.0` (#8084, #8103), so nothing in react-core was skipped for pending
removal.

## What does this PR do?

The rot came from four patterns:

1. `expect(container.querySelector(...)).toBeDefined()`. `querySelector`
and `queryBy*` return `null`, and `null` is defined, so the check always
passes.
2. `if (el) { expect(...) }`. When the element is missing, the test
asserts nothing.
3. Tests with no assertion, or that assert on the test's own mock.
4. The same slot matrix repeated in the popup, sidebar, chat view and
message view files.

### How I measured it

I applied each mutation locally, ran the tests, and reverted it. Nothing
from the mutations is committed.

- **M-slots-off:** `renderSlotElement` in `lib/slots.tsx` always renders
the default component, so every slot override is ignored.
- **M-resolve:** `resolveSlotComponent` in `CopilotChatMessageView.tsx`
always returns the default. The message view resolves the assistant and
user message slots with this function, not with `renderSlot`.

Before this PR, **341 of 427** tests in the slot files and
`lib/__tests__` passed under M-slots-off.

### Per file

"Survive" = the test still passes under M-slots-off + M-resolve. After
this PR, every survivor tests something that is not a slot override:
positioning, children render props, labels, root `className`, or width.

| File | Before (tests / survive) | After (tests / survive) | Notes |
|---|---|---|---|
| `CopilotChatInput.slots.e2e` | 48 / 42 | 36 / 10 | Buttons now render
(transcribe mode, `toolsMenu`). Duplicates of
`CopilotChatInput.test.tsx` removed. |
| `CopilotChatView.slots.e2e` | 44 / 32 | 34 / 2 | New helper scrolls
the view so the scroll-to-bottom button renders. Before, its tests never
saw the button. |
| `CopilotChatMessageView.slots.e2e` | 42 / 42 | 15 / 1 | All 42
survived. The sub-button matrix moved to the assistant and user message
files. Thumbs are covered by `CopilotChat.raw-event-feedback.test.tsx`.
|
| `CopilotChatAssistantMessage.slots.e2e` | 26 / 18 | 18 / 2 |
`markdownRenderer` never forwards `data-testid`, so that test now checks
an object `className`. The `toolCallsView` string-slot test is deleted:
`CopilotChatToolCallsView` ignores `className`, so nothing is
observable. |
| `CopilotChatUserMessage.slots.e2e` | 28 / 17 | 26 / 6 | The only home
for user message slots. It now covers all 5 slots in each form with
`it.each`. |
| `CopilotChatSuggestionView.slots.e2e` | 24 / 14 | 23 / 10 | The
loading test only counted buttons. It now checks that only the loading
pill is busy and disabled. |
| `CopilotModalHeader.slots.e2e` | 24 / 16 | 19 / 8 | The custom
close-button test asserted the test's own handler. It now checks that
the bound `onClick` closes the modal. |
| `CopilotPopupView.slots.e2e` | 33 / 28 | 16 / 7 | The width and height
tests checked only that the style named the CSS variable, which the
default also sets. They now check the value. |
| `CopilotSidebarView.slots.e2e` | 25 / 20 | 12 / 3 | Same width fix.
The inherited chat view matrix is now one forwarding test. |
| `CopilotChat.slots.e2e` | 23 / 18 | 8 / 1 | Deleted the
`container.firstChild` smoke tests (they pass when `CopilotChat` renders
nothing), a test that asserted its own mock was not called, and a test
with no assertion. |
| `CopilotChatView.onClick.e2e` | 29 / 19 | 17 / 3 | The submit test
looked for a `<form>` that does not exist, so it never asserted. The
add-menu click never fired because the button is disabled without menu
items. |
| `CopilotChatAssistantMessage.test` | `toBeDefined` on DOM queries |
`not.toBeNull()` | Class-slot tests: 0 of 4 failed under M-slots-off
before, 3 of 4 after. The 4th tests the root `className` prop. |
| `CopilotChatInput.test`, `CopilotChatToolRendering.e2e` |
`toBeDefined` on DOM queries | `not.toBeNull()` / `getByTestId` |
`waitFor(() => expect(queryByTestId(..)).toBeDefined())` resolved at
once. It now waits for the element. |
| `use-frontend-tool.e2e` | 2 hollow tests | fixed | The wildcard result
check never ran: `testId("tc1")` was called twice, so the result never
matched the call. The forwarded-tools test accepted an empty array.
Mutation `addTool` → no-op: the old test passes, the new one fails. |
| `lib/__tests__/renderSlot.test` | 3 conditional tests + 1 tautology |
fixed | The memo test counted two separate renders. It now rerenders
with equal props and expects 1 render. Mutation "memo comparator returns
false": the old test passes, the new one fails. |

Typed props replace most `as any` casts in the rewritten tests.

## Related PRs and Issues

- PE-1086 (Linear)
- Related: PE-1076 (mutation-testing baseline). This PR does not add
Stryker config.

## Checklist

- [ ] I have read the [Contribution
Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [ ] If the PR changes or adds functionality, I have updated the
relevant documentation (not applicable: tests only)
- [ ] If the PR contains a breaking change, the title has `!` (not
applicable)
- [ ] "Allow edits by maintainers" is checked

## Testing

**Commands run**

- `nx run @copilotkit/react-core:test`: 197 files and 2369 tests pass,
35 skipped (unchanged `skipIf` gates).
- `nx run @copilotkit/react-core:check-types
--exclude-task-dependencies`: passes.
- `oxfmt` and the oxlint gate on every changed file: pass.
- Each mutation above, applied and reverted locally.

**Manual test**

1. In `packages/react-core/src/lib/slots.tsx`, add `return
React.createElement(DefaultComponent, props);` as the first line of
`renderSlotElement`.
2. Run `pnpm vitest run
src/components/chat/__tests__/CopilotChatInput.slots.e2e.test.tsx` in
`packages/react-core`.
3. On `2.0.0`, 42 of 48 tests pass. On this branch, 26 of 36 fail.
4. Revert the line.

**How this PR makes testing easy**

The changes are tests only. The mutation steps above reproduce the
numbers in the table.

## Risk / rollback

Low. Only test files change. If a rewritten test turns out to be flaky,
revert this PR or that one commit. Each commit covers one group of
files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
AlemTuzlak added a commit that referenced this pull request Nov 4, 2026
…o that check nothing (#8204)

Three runtime tests passed only because any `Response` passed. None of
them reached the code it names. This PR makes them reach it and assert
the status. It also deletes two tests that check nothing. No production
code changes.

Part of PE-1086. v1 and the GraphQL runtime are already gone from
`2.0.0` (#8084, #8103), so nothing in runtime was skipped for pending
removal.

## What does this PR do?

### Rewritten

| Test | What was wrong | Evidence |
|---|---|---|
| `fetch-handler.test.ts` › "returns 500 JSON error for unhandled
errors" | The body had no `messages`, so the request got a **400** from
validation. The agent never ran. The test only checked
`toBeInstanceOf(Response)`. | The probe showed a 400 `Invalid request
body`. Mutation **M-A** (the "Failed to run agent" response in
`handle-run.ts` returns 200 instead of 500): the old test passes, the
new one fails. |
| `fetch-handler-validation.test.ts` › "CORS headers present on 500
error responses" | Same body problem: it got a 400, not a 500. |
Mutation **M-A**: the old test passes, the new one fails. |
| `code-review-fixes.test.ts` › "single-route agent/run works after
onBeforeHandler replaces request" | The test's own hook built `new
Request(..., { body: stream })` without `duplex`, and that throws in
Node. The handler returned a **500** `internal_error` and `agent/run`
never ran. | `onError` showed `TypeError: RequestInit: duplex option is
required`. Mutation **M-B** (single-route dispatch sends `{}` instead of
`methodCall.body` for `agent/run`): the old test passes, the new one
fails. |

Each rewritten test now sends a valid run body and asserts the status it
names: 500 with `{"error":"Failed to run agent","message":"boom"}`, 500
with CORS headers, or 200 with `text/event-stream`.

### Deleted

| Test | Why |
|---|---|
| `mcp-clients.test.ts` › "type compatibility: @ai-sdk/mcp MCPClient
satisfies MCPClientProvider" | It cast `tools()` with `as unknown as`
and ended with `expect(true).toBe(true)`, so it checked nothing at
runtime or compile time. Without the cast, `tsc` rejects the claim (see
below). |
| `mcp-apps-middleware-integration.test.ts` › "can be created with
mcpServers config pointing at MCPMock URL" | It asserted that `new
MCPAppsMiddleware(...)` is an instance of `MCPAppsMiddleware`. That is
always true. The other tests in the file use the middleware. |

### Finding for a follow-up (not fixed here)

An `@ai-sdk/mcp` `MCPClient` is **not** assignable to
`MCPClientProvider`. Its `tools()` returns MCP tools whose `inputSchema`
is `FlexibleSchema<unknown>`, and that does not fit the `ai` `ToolSet`.
A user who passes a real `MCPClient` to `mcpClients` gets a type error.
The deleted test hid this with a cast. This PR changes tests only, so
the type stays as it is.

## Related PRs and Issues

- PE-1086 (Linear)
- react-core part: #8202

## Checklist

- [ ] I have read the [Contribution
Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [ ] If the PR changes or adds functionality, I have updated the
relevant documentation (not applicable: tests only)
- [ ] If the PR contains a breaking change, the title has `!` (not
applicable)
- [ ] "Allow edits by maintainers" is checked

## Testing

**Commands run**

- `nx run @copilotkit/runtime:test`: 184 files and 3013 tests pass, 4
skipped.
- `nx run @copilotkit/runtime:check-types --exclude-task-dependencies`:
passes.
- `oxfmt` and the oxlint gate on every changed file: pass.
- Mutations M-A and M-B, applied and reverted locally. Nothing from them
is committed.

**Manual test**

1. In `packages/runtime/src/runtime/handlers/handle-run.ts`, change
`status: 500` in the "Failed to run agent" response to `status: 200`.
2. Run `pnpm vitest run src/runtime/__tests__/fetch-handler.test.ts` in
`packages/runtime`.
3. On `2.0.0`, all tests pass. On this branch, "returns 500 JSON error
for unhandled errors" fails.
4. Revert the change.

**How this PR makes testing easy**

The changes are tests only. The mutation steps above reproduce the
evidence.

## Risk / rollback

Low. Only test files change. To undo, revert the PR.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant