Skip to content

fix(react-core): show scroll-to-bottom only when messages are below - #8159

Merged
tylerslaton merged 1 commit into
mainfrom
tylerslaton/pin-to-send-scroll-button
Nov 3, 2026
Merged

tylerslaton merged 1 commit into
mainfrom
tylerslaton/pin-to-send-scroll-button

Conversation

@tylerslaton

@tylerslaton tylerslaton commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

What

With autoScroll="pin-to-send", CopilotChat showed the scroll-to-bottom button as soon as a message was sent, even with nothing below. Clicking it scrolled into empty space and cleared the screen.

Why

  • The button measured the scroll height. Pin-to-send puts a spacer under the messages so the sent message can reach the top of the viewport. That makes the scroll height larger than the content, so the empty spacer counted as more to read.
  • Under React StrictMode the first send lost its pin. StrictMode is on in Next.js dev. The first send mounts the message list, and StrictMode's mount-time cleanup cancelled the pin's scroll and the spacer's ResizeObserver. The re-run then skipped the send as already handled, so the spacer stayed at full height and never shrank as the reply grew.

Fix

  • ScrollView (pin-to-send and none modes) shows the button only while the messages end at least 10px below the viewport. It checks again when the messages resize, so a reply that streams past the bottom shows the button without a scroll.
  • usePinToSend lets the next run pin a send whose scroll never ran.

Tests

  • New: the button stays hidden when only the spacer is below.
  • New: a send whose message list mounts under <StrictMode> still pins, and keeps its ResizeObserver.
  • Both new tests fail without the fix and pass with it.
  • The existing "shows the button" test now sets where the messages end, since that is what the button reads.
  • @copilotkit/react-core: 221 test files pass (2669 tests), and tsc --noEmit is clean.

Seen on the docs' full-page Ask CopilotKit chat (showcase/shell-docs-v2, /ask). That app carries the same change as a patch-package patch until this ships.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • The scroll-to-bottom button now reflects whether messages extend beyond the visible area, rather than being triggered by extra space below the messages.
    • Improved reliability of send-to-bottom behavior during React StrictMode rendering and content resizing.

With autoScroll="pin-to-send", the scroll-to-bottom button showed as soon
as a message was sent. The pin's spacer under the messages makes the scroll
height larger than the content, and the button measured the scroll height,
so the empty spacer counted as more to read. Clicking it scrolled into the
spacer and cleared the screen.

The button now shows only while the messages end below the viewport, and it
checks again when they resize, so a reply that streams past the bottom shows
it without a scroll.

Under React StrictMode (on in Next.js dev), the first send also lost its pin:
StrictMode's mount-time cleanup cancelled the scroll and the spacer's
ResizeObserver, and the re-run skipped the send as already handled. The
spacer then stayed at full height. The hook now lets the re-run pin a send
whose scroll never ran.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@tylerslaton
tylerslaton requested review from jpr5 and mme as code owners November 2, 2026 23:23
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between c5d73ce and ecf61da.

Files selected for processing: 4
  • packages/react-core/src/v2/components/chat/CopilotChatView.tsx
  • packages/react-core/src/v2/components/chat/__tests__/CopilotChatView.pinToSend.test.tsx
  • packages/react-core/src/v2/hooks/__tests__/use-pin-to-send.test.tsx
  • packages/react-core/src/v2/hooks/use-pin-to-send.ts

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

Walkthrough

The chat view now bases scroll-to-bottom visibility on message content overflow. The send-pinning hook restores its previous nonce when cleanup occurs before the scheduled animation-frame callback runs.

Changes: Chat scrolling

Layer / File(s) Summary
Scroll-to-bottom visibility
packages/react-core/src/v2/components/chat/CopilotChatView.tsx, packages/react-core/src/v2/components/chat/__tests__/CopilotChatView.pinToSend.test.tsx
The visibility check measures content extending below the viewport and observes content resizing. Tests cover message overflow and confirm that spacer-only overflow does not show the button.
Send pinning cleanup
packages/react-core/src/v2/hooks/use-pin-to-send.ts, packages/react-core/src/v2/hooks/__tests__/use-pin-to-send.test.tsx
The hook restores the previous nonce if cleanup occurs before the animation-frame callback. A StrictMode test checks that the callback scrolls once and that the latest observer remains connected.

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

Change: Bug fix

Possibly related issues

  • Issue 7494 reports a send-triggered scroll jump in a long v2 chat. This change affects send-time pinning, but does not change virtualizer estimate recalculation.

Suggested reviewers: mme

Merge Risk: Minimal · up to ecf61

The change excludes spacer-only overflow and preserves send pinning across early cleanup. The remaining padding-related button behavior predates this change; no merge-blocking issue was established.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the scroll-to-bottom button in the chat view now appears only when messages extend below the viewport. It also fits the react-core scope. The changeset includes the Sc…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the scroll-to-bottom button in the chat view now appears only when messages extend below the viewport. It also fits the react-core scope. The changeset includes the ScrollView visibility logic, the usePinToSend StrictMode fix, and tests for both, so the title covers the primary change and is specific.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 4 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • 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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@pkg-pr-new

pkg-pr-new Bot commented Nov 2, 2026

Copy link
Copy Markdown
@copilotkit/a2ui-renderer

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

@copilotkit/agentcore-runner

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

@copilotkit/angular

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

@copilotkit/channels

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

@copilotkit/channels-core

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

@copilotkit/channels-discord

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

@copilotkit/channels-intelligence

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

@copilotkit/channels-slack

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

@copilotkit/channels-teams

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

@copilotkit/channels-ui

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

@copilotkit/channels-whatsapp

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

@copilotkit/core

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

@copilotkit/intelligence-langgraph

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

@copilotkit/intelligence-mastra

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

@copilotkit/learning

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

@copilotkit/mcp-apps-renderer

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

@copilotkit/react-core

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

@copilotkit/react-native

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

@copilotkit/react-textarea

pnpm add https://pkg.pr.new/@copilotkit/react-textarea@8159

@copilotkit/react-ui

pnpm add https://pkg.pr.new/@copilotkit/react-ui@8159

@copilotkit/runtime

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

@copilotkit/runtime-client-gql

pnpm add https://pkg.pr.new/@copilotkit/runtime-client-gql@8159

@copilotkit/sdk-js

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

@copilotkit/shared

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

@copilotkit/sqlite-runner

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

@copilotkit/voice

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

@copilotkit/vue

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

@copilotkit/web-components

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

@copilotkit/web-inspector

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

commit: ecf61da

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Size Change: -610 B (-0.03%)

Total Size: 2.4 MB

📦 View Changed
Filename Size Change
packages/react-core/dist/copilotkit-D2LAyGsM.mjs 156 kB +156 kB (new file) 🆕
packages/react-core/dist/copilotkit-DEkPaNLP.cjs 152 kB +152 kB (new file) 🆕
packages/react-core/dist/copilotkit-DZI2Rmgv.mjs 0 B -155 kB (removed) 🏆
packages/react-core/dist/copilotkit-YOB_gJJ3.cjs 0 B -152 kB (removed) 🏆
packages/react-core/dist/v2/index.cjs 4.34 kB -1 B (-0.02%)
packages/react-core/dist/v2/index.umd.js 188 kB +69 B (+0.04%)
packages/react-native/dist/components/index.cjs 8.65 kB -149 B (-1.69%)
packages/react-native/dist/components/index.mjs 8.45 kB -155 B (-1.8%)
packages/react-native/dist/index.cjs 6.52 kB -269 B (-3.96%)
packages/react-native/dist/index.mjs 6.14 kB -262 B (-4.09%)
ℹ️ 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 108 kB
packages/core/dist/index.mjs 107 kB
packages/core/dist/index.umd.js 114 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-core/dist/index.cjs 17.9 kB
packages/react-core/dist/index.mjs 17.8 kB
packages/react-core/dist/index.umd.js 114 kB
packages/react-core/dist/MarkdownSurfaces-DV9P0Gi9.mjs 38 kB
packages/react-core/dist/MarkdownSurfaces-IUaWSJ0E.cjs 38.6 kB
packages/react-core/dist/v2/context.cjs 1.58 kB
packages/react-core/dist/v2/context.mjs 1.5 kB
packages/react-core/dist/v2/generative-ui.cjs 70.7 kB
packages/react-core/dist/v2/generative-ui.mjs 70.1 kB
packages/react-core/dist/v2/headless.cjs 17.7 kB
packages/react-core/dist/v2/headless.mjs 17.2 kB
packages/react-core/dist/v2/index.mjs 4.33 kB
packages/react-native/dist/chunk-C0xms8kb.cjs 546 B
packages/react-native/dist/CopilotKitProvider-CjoPnabW.cjs 1.55 kB
packages/react-native/dist/CopilotKitProvider-D8sn7G_C.mjs 1.43 kB
packages/react-native/dist/headless.cjs 632 B
packages/react-native/dist/headless.mjs 373 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 332 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 371 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/react-textarea/dist/index.cjs 17.7 kB
packages/react-textarea/dist/index.mjs 17 kB
packages/react-textarea/dist/index.umd.js 18.5 kB
packages/react-ui/dist/index.cjs 25.3 kB
packages/react-ui/dist/index.mjs 24.6 kB
packages/react-ui/dist/index.umd.js 26.6 kB
packages/runtime-client-gql/dist/_virtual/_rolldown/runtime.cjs 516 B
packages/runtime-client-gql/dist/client/conversion.cjs 1.52 kB
packages/runtime-client-gql/dist/client/conversion.mjs 1.45 kB
packages/runtime-client-gql/dist/client/CopilotRuntimeClient.cjs 1.58 kB
packages/runtime-client-gql/dist/client/CopilotRuntimeClient.mjs 1.54 kB
packages/runtime-client-gql/dist/client/types.cjs 701 B
packages/runtime-client-gql/dist/client/types.mjs 642 B
packages/runtime-client-gql/dist/graphql/@generated/gql.cjs 850 B
packages/runtime-client-gql/dist/graphql/@generated/gql.mjs 850 B
packages/runtime-client-gql/dist/graphql/@generated/graphql.cjs 2.4 kB
packages/runtime-client-gql/dist/graphql/@generated/graphql.mjs 2.36 kB
packages/runtime-client-gql/dist/graphql/definitions/mutations.cjs 740 B
packages/runtime-client-gql/dist/graphql/definitions/mutations.mjs 732 B
packages/runtime-client-gql/dist/graphql/definitions/queries.cjs 316 B
packages/runtime-client-gql/dist/graphql/definitions/queries.mjs 304 B
packages/runtime-client-gql/dist/index.cjs 679 B
packages/runtime-client-gql/dist/index.mjs 495 B
packages/runtime-client-gql/dist/index.umd.js 9.58 kB
packages/runtime-client-gql/dist/message-conversion/agui-to-gql.cjs 1.72 kB
packages/runtime-client-gql/dist/message-conversion/agui-to-gql.mjs 1.7 kB
packages/runtime-client-gql/dist/message-conversion/gql-to-agui.cjs 1.56 kB
packages/runtime-client-gql/dist/message-conversion/gql-to-agui.mjs 1.53 kB
packages/runtime-client-gql/dist/package.cjs 181 B
packages/runtime-client-gql/dist/package.mjs 116 B
packages/shared/dist/_virtual/_rolldown/runtime.cjs 516 B
packages/shared/dist/a2ui-envelope.cjs 2.44 kB
packages/shared/dist/a2ui-envelope.mjs 2.42 kB
packages/shared/dist/a2ui-prompts.cjs 4.57 kB
packages/shared/dist/a2ui-prompts.mjs 4.54 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.5 kB
packages/shared/dist/generative-ui/basic-functions.mjs 2.45 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/compact-schema.cjs 2.97 kB
packages/shared/dist/generative-ui/compact-schema.mjs 2.94 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-spec.cjs 8.13 kB
packages/shared/dist/generative-ui/prompt-spec.mjs 8.1 kB
packages/shared/dist/generative-ui/prompt.cjs 1.64 kB
packages/shared/dist/generative-ui/prompt.mjs 1.6 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/schema-render.cjs 3.91 kB
packages/shared/dist/generative-ui/schema-render.mjs 3.87 kB
packages/shared/dist/generative-ui/types.cjs 1.57 kB
packages/shared/dist/generative-ui/types.mjs 1.51 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 4.04 kB
packages/shared/dist/index.mjs 3.4 kB
packages/shared/dist/index.umd.js 62.1 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/voice/dist/index.umd.js 1.5 kB
packages/voice/dist/transcription/transcription-service-openai.cjs 495 B
packages/voice/dist/transcription/transcription-service-openai.mjs 434 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

@tylerslaton
tylerslaton merged commit 3a956ad into main Nov 3, 2026
52 checks passed
@tylerslaton
tylerslaton deleted the tylerslaton/pin-to-send-scroll-button branch November 3, 2026 01:15
tylerslaton added a commit that referenced this pull request Nov 3, 2026
A from-scratch rebuild of docs.copilotkit.ai on Fumadocs 16, as a
standalone app next to showcase/shell-docs. The cut-over is gradual: v2
owns its own pages in content/live, which start here as a copy of
shell-docs' pages, and nothing syncs them, so the two can differ.
shell-docs keeps serving production, untouched, until v2 replaces it.

- Spacious docs layout and a home page in the copilotkit.ai brand
  (theme.css on Fumadocs' shadcn preset, shadcn/ui components), with
  glass navbar menus, staged code tabs, and quiet callouts.
- A framework picker and a sidebar per topic, with SDK and partner logos
  on the Reference and Cookbook sidebars.
- Ask CopilotKit, in the sidebar and as a full page at /ask, with
  guides written for the reader and a quickstart setup card.
- The standard catalog component pages, each opening on a Fumadocs
  Story with a variant per catalog sample and a control per prop.
- An examples playground that embeds the showcase demos, follows the
  docs theme, and hides demos that can't run yet.
- Orama search, an MCP server, llms.txt and Markdown routes, telemetry,
  and the legacy redirect tables.
- Only icons and the images pages show: page images go through Git LFS.
- patches/ carries the react-core scroll-to-bottom fix from #8159 until
  a release with it is installed.

Not wired into CI or deployment yet. See PRODUCT.md, DESIGN.md and
README.md.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
AlemTuzlak added a commit that referenced this pull request Nov 3, 2026
Carry the 2.0.0 StrictMode pin-to-send fix (#8159) into core:
ɵpinMessageToTop's unpin now reports whether the scroll ran, so
React's usePinToSend can pin the same send again after StrictMode's
mount-time teardown.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
tylerslaton added a commit that referenced this pull request Nov 3, 2026
docs.copilotkit.ai moves to a from-scratch rebuild on Fumadocs 16. It
replaces the old app in showcase/shell-docs instead of sitting beside it,
so the docs keep one home and one history.

- The pages stay in src/content. Components resolve by name, so page
  imports are dropped except `.mdx` snippets, and a page with sub-pages
  moves to `X/index.mdx`. Otherwise this commit leaves the pages as they
  were.
- Spacious docs layout and a home page in the copilotkit.ai brand, with
  a framework picker, a sidebar per topic, and SDK and partner logos.
- Ask CopilotKit, in the sidebar and as a full page at /ask.
- Standard catalog component pages on Fumadocs Story, an examples
  playground that embeds the showcase demos, Orama search, an MCP
  server, llms.txt and Markdown routes, telemetry, and the legacy
  redirect tables.
- public/ keeps only icons and the images pages show; page images go
  through Git LFS.
- The Dockerfile builds the app from the repo root for the docs service
  (port 10000, the commit and branch build args, the Node 22.23.4 check)
  and fetches LFS images when the checkout has pointer files.
- patches/ carries the react-core scroll-to-bottom fix from #8159 until
  a release with it is installed.

BREAKING CHANGE: showcase/shell-docs is a new app. Its scripts, source
layout and dev port (3003) follow the Fumadocs rebuild; see its README.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
tylerslaton added a commit that referenced this pull request Nov 3, 2026
1.82.0's in-memory runner serves every reader's threads through
resource/request with no owner check; 1.83.0 added one. 1.84.1 also has
the react-core scroll-to-bottom fix (#8159) the removed patch carried.

Also declares jiti (check-live-mdx imports it), moves shadcn to
devDependencies, and puts @types/node on Node 22, which the app runs on.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
AlemTuzlak added a commit that referenced this pull request Nov 4, 2026
…into core (#8181)

Merge this PR first. It is PR 1 of 10 in the "2.0 core pipeline" stack, with base `2.0.0`.

The chat primitives of React, Vue, and Angular now get their logic from `@copilotkit/core`. As a result, a bug in this logic has one fix, in core. This PR also corrects five bugs where the three frameworks did different things.

## What does this PR do?

These rules moved into core. The framework packages keep only the rendering and the lifecycle.

| Core file | What it holds now |
| --- | --- |
| `chat/message-feedback.ts` | The rating store, the "Learning feedback on" rule, and the comment popover rules (150 ms close delay) |
| `chat/viewport.ts` | `autoScroll` modes, the mobile media query, the keyboard height, and pin-to-send |
| `chat/license.ts` | License banner text, links, colors, and the 52 px bottom offset |
| `chat/message-display.ts` | Reasoning time label, work summary text, user message text and files, branch navigation, toolbar rule, and the "copied" timer |
| `chat/inspector-button.ts` | The "hide shortcuts" store, the kite icon as data, and the hover menu (180 ms close delay) |

Core also exports `ɵshallowEqualRecord` and `ɵcn` to the framework packages. All new exports use the `ɵ` prefix, because they are internal.

Bugs that this PR corrects:

- **Copy buttons:** Fast clicks made the check mark flicker in the React user message and both Angular buttons. A second copy now starts the 2 seconds again.
- **Angular toolbar:** The assistant toolbar showed while the latest message streamed. Now it is hidden, as in React and Vue.
- **License text:** React license warnings ignored custom labels, and the Vue inline warning had fixed text. Both now use the chat labels.
- **Stable refs:** React and Vue treated `{ a: undefined }` and `{ b: undefined }` as equal. Now they compare with `Object.is` and own keys.
- **Pin-to-send in React:** It now runs without `requestAnimationFrame` or `ResizeObserver`, as Vue did.

Angular also gets an optional `branchSwitchEnabled` input (default `true`) on the user message and its branch navigation.

The merge from `2.0.0` brought in the React StrictMode pin-to-send fix of #8159. This fix now lives in core `ɵpinMessageToTop`. The unpin function returns `false` when it cancelled a scroll that did not run. On `false`, React pins again. A new core test covers this ("reports whether the scroll ran before it was unpinned").

BREAKING CHANGE: In `@copilotkit/angular`, `copied` on `CopilotChatUserMessageCopyButton` and `CopilotChatAssistantMessageCopyButton` is a read-only signal. Calls to `copied.set()` and `copied.update()` do not type-check. Call `handleCopy()` on the button, or render your own button in the `copyButton` slot. The [v2-migration codemod](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-chat-primitives/codemods/v2-migration/scripts/angular-copy-buttons.ts) puts a TODO above each of these calls. The steps are in [Angular copy buttons](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-chat-primitives/showcase/shell-docs/src/content/docs/migrate/chat-2.0.mdx#angular-copy-buttons).

Behavior changes without a codemod are in the same page:

- [License warning text](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-chat-primitives/showcase/shell-docs/src/content/docs/migrate/chat-2.0.mdx#license-warning-text) (React and Vue)
- [Chat behavior in Vue and Angular](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-chat-primitives/showcase/shell-docs/src/content/docs/migrate/chat-2.0.mdx#chat-behavior-in-vue-and-angular): the Angular toolbar, and the Vue copy buttons without the Clipboard API

## Related PRs and Issues

- #8159 (the pin-to-send fix that this PR moves into core)

## 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
- [x] 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**

On the head `cb06e3f5cb` (after the merge from `2.0.0`):

- `pnpm nx run-many -t test -p @copilotkit/core @copilotkit/react-core @copilotkit/vue @copilotkit/angular`: core 1955, react-core 2487 (35 skipped), vue 1432, angular 690 tests pass.
- The first run had two failures from a stale local install: a stale `external-reexports` check and a Vue test that timed out at 5 s. After `pnpm install` and a core build, both pass.

Before the merge, on this branch:

- `pnpm nx run-many -t build,check-types -p @copilotkit/core @copilotkit/react-core @copilotkit/vue @copilotkit/angular`: pass.
- `pnpm nx run @copilotkit/v2-migration:test --skip-nx-cache`: 39 TypeScript and 14 TSX cases pass.
- `pnpm check:public-api-manifest`: current.
- `pnpm nx run @copilotkit/vue:lint`: 197 errors. `2.0.0` has the same 197 errors. None come from this PR.

**Manual test**

1. In an Angular chat, send a message. The assistant toolbar shows only after the reply stops streaming.
2. Click a copy button two times in 2 seconds. The check mark stays for 2 seconds after the second click.
3. In React, render `<CopilotChat labels={{ licenseFeatureUnlicensedText: "No license for {feature}" }} />` without a license. The warning shows your text.
4. Run the codemod on an Angular file with `copyButton.copied.set(true)`. A `TODO(copilotkit-2.0)` comment is above the call.

**How this PR makes testing easy**

- Each new core module has its own tests in `packages/core/src/chat/__tests__/` and `packages/core/src/utils/__tests__/`.
- Each behavior change has an adapter test, for example `CopilotChatCopyButtons.test.tsx`, `copy-buttons.spec.ts`, and `copilot-chat-assistant-message.component.spec.ts`.
- The codemod has three new cases in `codemods/v2-migration/tests/ts/angular-copy-buttons*`.

## Risk / rollback

The risk is medium. Many chat components in three frameworks changed at the same time. The tests above cover each moved rule. If this PR causes an error, revert it. Before that, revert the stack PRs that merged after it.

## Public API change

**Before**

```ts
this.copyButton().copied.set(true);
```

**After**

```ts
this.copyButton().handleCopy();
```

## Stack

Merge in this order. Each PR's base is the PR above it.

| # | PR | Area | Base |
|---|---|---|---|
| 1 | **#8181 (this PR)** | Chat primitives | `2.0.0` |
| 2 | #8173 | Provider config and runtime info | PR 1 |
| 3 | #8176 | Tool-call rendering | PR 2 |
| 4 | #8175 | A2UI, Open Generative UI, MCP Apps | PR 3 |
| 5 | #8174 | Agents, threads, chat configuration | PR 4 |
| 6 | #8179 | Chat sends, attachments, message view | PR 5 |
| 7 | #8178 | Chat input, recorder, DOM controllers | PR 6 |
| 8 | #8177 | Markdown renderer | PR 7 |
| 9 | #8182 | Suggestions, Inspector, learning | PR 8 |
| 10 | #8180 | Interrupts and human-in-the-loop | PR 9 |

**Stack verification.** After each merge, the stack builder ran these on this layer's head before pushing it, all with `--skip-nx-cache`: build, check-types and tests for core, react-core, vue and angular, plus the packages this layer touches; the codemod tests; oxlint; and `check:public-api-manifest`. On the top layer it also ran publint, attw, and the shell-docs tests and build. All passed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
  * Angular 2.0 migration guidance now covers copy-button changes, including read-only copied state and options for custom copy behavior.
* **Improvements**
  * License banners and inline warnings now use configured labels across React and Vue, with default labels when no provider is present.
  * Chat toolbars, branch navigation, copy feedback, Inspector menus, and work summaries now follow shared behavior across frameworks.
* **Documentation**
  * Updated the migration guide with Angular copy-button, license-warning, and chat-behavior notes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
tylerslaton added a commit that referenced this pull request Nov 4, 2026
docs.copilotkit.ai moves to a from-scratch rebuild on Fumadocs 16. It
replaces the old app in showcase/shell-docs instead of sitting beside it,
so the docs keep one home and one history.

- The pages stay in src/content. Components resolve by name, so page
  imports are dropped except `.mdx` snippets, and a page with sub-pages
  moves to `X/index.mdx`. Otherwise this commit leaves the pages as they
  were.
- Spacious docs layout and a home page in the copilotkit.ai brand, with
  a framework picker, a sidebar per topic, and SDK and partner logos.
- Ask CopilotKit, in the sidebar and as a full page at /ask.
- Standard catalog component pages on Fumadocs Story, an examples
  playground that embeds the showcase demos, Orama search, an MCP
  server, llms.txt and Markdown routes, telemetry, and the legacy
  redirect tables.
- public/ keeps only icons and the images pages show; page images go
  through Git LFS.
- The Dockerfile builds the app from the repo root for the docs service
  (port 10000, the commit and branch build args, the Node 22.23.4 check)
  and fetches LFS images when the checkout has pointer files.
- patches/ carries the react-core scroll-to-bottom fix from #8159 until
  a release with it is installed.

BREAKING CHANGE: showcase/shell-docs is a new app. Its scripts, source
layout and dev port (3003) follow the Fumadocs rebuild; see its README.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
tylerslaton added a commit that referenced this pull request Nov 4, 2026
1.82.0's in-memory runner serves every reader's threads through
resource/request with no owner check; 1.83.0 added one. 1.84.1 also has
the react-core scroll-to-bottom fix (#8159) the removed patch carried.

Also declares jiti (check-live-mdx imports it), moves shadcn to
devDependencies, and puts @types/node on Node 22, which the app runs on.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
tylerslaton added a commit that referenced this pull request Nov 9, 2026
docs.copilotkit.ai moves to a from-scratch rebuild on Fumadocs 16. It
replaces the old app in showcase/shell-docs instead of sitting beside it,
so the docs keep one home and one history.

- The pages stay in src/content. Components resolve by name, so page
  imports are dropped except `.mdx` snippets, and a page with sub-pages
  moves to `X/index.mdx`. Otherwise this commit leaves the pages as they
  were.
- Spacious docs layout and a home page in the copilotkit.ai brand, with
  a framework picker, a sidebar per topic, and SDK and partner logos.
- Ask CopilotKit, in the sidebar and as a full page at /ask.
- Standard catalog component pages on Fumadocs Story, an examples
  playground that embeds the showcase demos, Orama search, an MCP
  server, llms.txt and Markdown routes, telemetry, and the legacy
  redirect tables.
- public/ keeps only icons and the images pages show; page images go
  through Git LFS.
- The Dockerfile builds the app from the repo root for the docs service
  (port 10000, the commit and branch build args, the Node 22.23.4 check)
  and fetches LFS images when the checkout has pointer files.
- patches/ carries the react-core scroll-to-bottom fix from #8159 until
  a release with it is installed.

BREAKING CHANGE: showcase/shell-docs is a new app. Its scripts, source
layout and dev port (3003) follow the Fumadocs rebuild; see its README.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
tylerslaton added a commit that referenced this pull request Nov 9, 2026
1.82.0's in-memory runner serves every reader's threads through
resource/request with no owner check; 1.83.0 added one. 1.84.1 also has
the react-core scroll-to-bottom fix (#8159) the removed patch carried.

Also declares jiti (check-live-mdx imports it), moves shadcn to
devDependencies, and puts @types/node on Node 22, which the app runs on.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
tylerslaton added a commit that referenced this pull request Nov 10, 2026
docs.copilotkit.ai moves to a from-scratch rebuild on Fumadocs 16. It
replaces the old app in showcase/shell-docs instead of sitting beside it,
so the docs keep one home and one history.

- The pages stay in src/content. Components resolve by name, so page
  imports are dropped except `.mdx` snippets, and a page with sub-pages
  moves to `X/index.mdx`. Otherwise this commit leaves the pages as they
  were.
- Spacious docs layout and a home page in the copilotkit.ai brand, with
  a framework picker, a sidebar per topic, and SDK and partner logos.
- Ask CopilotKit, in the sidebar and as a full page at /ask.
- Standard catalog component pages on Fumadocs Story, an examples
  playground that embeds the showcase demos, Orama search, an MCP
  server, llms.txt and Markdown routes, telemetry, and the legacy
  redirect tables.
- public/ keeps only icons and the images pages show; page images go
  through Git LFS.
- The Dockerfile builds the app from the repo root for the docs service
  (port 10000, the commit and branch build args, the Node 22.23.4 check)
  and fetches LFS images when the checkout has pointer files.
- patches/ carries the react-core scroll-to-bottom fix from #8159 until
  a release with it is installed.

BREAKING CHANGE: showcase/shell-docs is a new app. Its scripts, source
layout and dev port (3003) follow the Fumadocs rebuild; see its README.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
tylerslaton added a commit that referenced this pull request Nov 10, 2026
1.82.0's in-memory runner serves every reader's threads through
resource/request with no owner check; 1.83.0 added one. 1.84.1 also has
the react-core scroll-to-bottom fix (#8159) the removed patch carried.

Also declares jiti (check-live-mdx imports it), moves shadcn to
devDependencies, and puts @types/node on Node 22, which the app runs on.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
tylerslaton added a commit that referenced this pull request Nov 10, 2026
docs.copilotkit.ai moves to a from-scratch rebuild on Fumadocs 16. It
replaces the old app in showcase/shell-docs instead of sitting beside it,
so the docs keep one home and one history.

- The pages stay in src/content. Components resolve by name, so page
  imports are dropped except `.mdx` snippets, and a page with sub-pages
  moves to `X/index.mdx`. Otherwise this commit leaves the pages as they
  were.
- Spacious docs layout and a home page in the copilotkit.ai brand, with
  a framework picker, a sidebar per topic, and SDK and partner logos.
- Ask CopilotKit, in the sidebar and as a full page at /ask.
- Standard catalog component pages on Fumadocs Story, an examples
  playground that embeds the showcase demos, Orama search, an MCP
  server, llms.txt and Markdown routes, telemetry, and the legacy
  redirect tables.
- public/ keeps only icons and the images pages show; page images go
  through Git LFS.
- The Dockerfile builds the app from the repo root for the docs service
  (port 10000, the commit and branch build args, the Node 22.23.4 check)
  and fetches LFS images when the checkout has pointer files.
- patches/ carries the react-core scroll-to-bottom fix from #8159 until
  a release with it is installed.

BREAKING CHANGE: showcase/shell-docs is a new app. Its scripts, source
layout and dev port (3003) follow the Fumadocs rebuild; see its README.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
tylerslaton added a commit that referenced this pull request Nov 10, 2026
1.82.0's in-memory runner serves every reader's threads through
resource/request with no owner check; 1.83.0 added one. 1.84.1 also has
the react-core scroll-to-bottom fix (#8159) the removed patch carried.

Also declares jiti (check-live-mdx imports it), moves shadcn to
devDependencies, and puts @types/node on Node 22, which the app runs on.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
tylerslaton added a commit that referenced this pull request Nov 11, 2026
docs.copilotkit.ai moves to a from-scratch rebuild on Fumadocs 16. It
replaces the old app in showcase/shell-docs instead of sitting beside it,
so the docs keep one home and one history.

- The pages stay in src/content. Components resolve by name, so page
  imports are dropped except `.mdx` snippets, and a page with sub-pages
  moves to `X/index.mdx`. Otherwise this commit leaves the pages as they
  were.
- Spacious docs layout and a home page in the copilotkit.ai brand, with
  a framework picker, a sidebar per topic, and SDK and partner logos.
- Ask CopilotKit, in the sidebar and as a full page at /ask.
- Standard catalog component pages on Fumadocs Story, an examples
  playground that embeds the showcase demos, Orama search, an MCP
  server, llms.txt and Markdown routes, telemetry, and the legacy
  redirect tables.
- public/ keeps only icons and the images pages show; page images go
  through Git LFS.
- The Dockerfile builds the app from the repo root for the docs service
  (port 10000, the commit and branch build args, the Node 22.23.4 check)
  and fetches LFS images when the checkout has pointer files.
- patches/ carries the react-core scroll-to-bottom fix from #8159 until
  a release with it is installed.

BREAKING CHANGE: showcase/shell-docs is a new app. Its scripts, source
layout and dev port (3003) follow the Fumadocs rebuild; see its README.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
tylerslaton added a commit that referenced this pull request Nov 11, 2026
1.82.0's in-memory runner serves every reader's threads through
resource/request with no owner check; 1.83.0 added one. 1.84.1 also has
the react-core scroll-to-bottom fix (#8159) the removed patch carried.

Also declares jiti (check-live-mdx imports it), moves shadcn to
devDependencies, and puts @types/node on Node 22, which the app runs on.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
tylerslaton added a commit that referenced this pull request Nov 12, 2026
One PR for the docs rebuild. It replaces #8214 and the
`tylerslaton/docs-shell-docs-v2` stack (#8320, #8321, #8322, #8325),
which had drifted onto two branches with different work on each. Both
old branches stay on origin, unchanged, as archives.

## What does this PR do?

It replaces `showcase/shell-docs` with the Fumadocs rebuild of
docs.copilotkit.ai, in place. There is no second docs app. The pages
stay at `showcase/shell-docs/src/content`, so git records them as edits
to the files that were already there. The plan is to merge this into
`main` and then rebase `2.0.0` on top.

### How this branch was put together
- **Base:** today's `main` (`4d647b76e8`).
- **#8214's 64 commits**, unchanged. `main`'s 8 newer commits don't
touch the docs or the showcase, so they replayed cleanly.
- **The stack's 19 commits** from `docs-shell-docs-v2`, on top. Where
they met work that #8214 had and the stack didn't, the conflicts were
resolved by hand, and each commit message says what changed:
- **Model pins.** The stack's setup snippets were written before #8214
pinned `gpt-6-luna`. A new last commit pins the 32 setup files the same
way the rest of the docs and each integration's own agent code do.
- **Angular.** `main`'s native generative UI guide
(`/angular/guides/generative-ui-components`) moves to
`/angular/generative-ui/native`, like the other Angular guides. It gets
a redirect and a row in the Angular generative UI overview.
- **Dark mode.** The `globals.css` sync and the scroll fix are applied
on top of `main`'s dark mode. They also cover `openai-agents-python`,
which `main` added since.
- **Checked:** every commit of both old branches has a counterpart here,
and a file-by-file three-way check found no content from either branch
missing. The few differences are newer `main` work (for example
`setup-dotnet` v6.1.0), #8214's adaptations to `main`, and the model
pins.

### What's in it
- **The new app.** It has the Spacious layout and brand theme, and a
framework and frontend picker that opens the chosen frontend's page.
Each frontend gets its own sidebar (Slack, Teams, Angular, Vue, React
Native).
  - Ask CopilotKit runs in the sidebar and at `/ask`.
- It adds the standard catalog Story pages and an examples playground.
That playground loads its catalog, generated from the showcase data,
only on `/examples`.
- It also brings Orama search that keeps the reader's scope, an MCP
server, llms.txt and Markdown routes (with the demo and setup code
inlined), telemetry, and the legacy redirect tables.
- **Pages.** `main`'s pages change in only two mechanical ways: page
imports are dropped, and pages with sub-pages move to `X/index.mdx` (13
renames). On top of that, the docs review's fixes are a separate diff,
as are a round of accuracy and link fixes from code review.
- **`public/`.** It keeps every file it had on `main`. Only new icons
and logos are added.
- **Code that read the old app's files.** The showcase shell's search
index keeps the old sidebar-reachability rules in
`showcase/scripts/lib/docs-searchable`, with the old app's tests ported
next to them. The shell image and the workflows, tests, skills and docs
that named old paths are updated too.

### From the stack (#8320–#8325)
- **One page per feature.** Each framework's copies of the shared pages
fold into the shared pages, which gate sections on the showcase's
supported features. The setup steps the copies carried move into each
integration's `docs/setup/*.mdx`. Stale URLs redirect, and a folded page
a framework can't show sends readers to that framework's overview.
- **Frontends by one rule.** Each frontend gets the pages it has, and
each page is listed and indexed once. The showcase decides a frontend's
own feature pages too.
- **Angular and React Native at React's URLs.** Angular's eight combined
guides become pages at React's slugs, with one-hop redirects from
`/angular/guides/*`. React Native gets 19 feature pages. The showcase
search reads both from their React slugs. The app frontends' "Using
these docs" pages and Angular's feature catalog page are gone.
- **Showcase demos.** Full-page chats fill the page in every
integration. Every integration's `globals.css` is now
langgraph-python's, `create-integration` copies it, and a test fails on
drift. The three tall demo pages scroll inside the page.
- **CrewAI docs links** point at the folded pages, and their test finds
pages in the `(shared)` route group.

### Review fixes (two code reviews)
- **Security:** Ask's API route now accepts only `info`, `agent/run`,
`agent/connect` and `agent/stop`, so the thread list, read and wipe
calls are rejected.
- The CopilotKit packages are on 1.84.1, which has the runtime's
thread-owner check and the scroll-to-bottom fix (#8159), so no patch is
needed.
- Every run is capped: a limit across all readers on top of the per-IP
one, size caps on context, state, tools and the whole request, the docs'
own tools only, and 10 steps.
- **Routing:**
- Legacy `/docs*` URLs redirect as on `main`, and unknown URLs answer
404.
- Framework landings render instead of redirecting, `/intelligence` is a
301 again, and Google Antigravity is back.
  - Each framework's docs mode now comes from its manifest.
- **Deploy:**
- The docs deploy check now verifies the runtime config the new app
serves (`/api/telemetry/config`, with a real PostHog key required in
production). The old app's server-written Clerk config, which the new
app doesn't have, is no longer required.
- The Docker image smoke-tests itself before it is pushed and runs as
`node`.
- Hosts (sign-up, Cloud, showcase, demos) come from the environment per
request, so staging no longer links to production.
- **CI:** `test_unit-shell-docs` builds and serves the app, then runs
the redirect check and a request to every page. The telemetry emitter
now finds the new app's `trackEvent` calls.

### Carried over from `main`
The rebuild uses `main`'s shared theme bridge from
`showcase/integrations/_shared/ts/theme.ts`. Where `main` had changed
the old app or the same pages, its changes are carried into the rebuild
in their own commits:
- **Models:** `main` moved every OpenAI sample to `gpt-6-luna` and made
it the only OpenAI model the allowlist ships. This branch's samples
follow, with `main`'s `reasoning_effort="none"` call shapes.
- **Generative UI:** `main`'s Angular, Vue and React Native additions to
the component guides, the React Native guide and its reference are kept.
Its two docs-pinning tests (`react-native-generative-ui-docs`,
`vue-generative-ui-docs`) now run in the showcase-scripts suite, under
`__tests__/docs-content`.
- **Telemetry:** `main`'s personless, bot-filterable `docs_pageview` and
`seo_redirect` (cookie `ph_docs_id`) are ported into
`src/lib/telemetry/proxy.ts`.
- **llms.txt:** `main`'s OpenBot section is in the new index.
- **Antigravity:** the real Antigravity mark from `main` is used.

## What merging does
- **Deploys:** `showcase_build` redeploys shell-docs, so
docs.staging.copilotkit.ai serves the new app. It also redeploys shell,
dojo, dashboard, the harness and every integration whose files changed.
Production changes only on promote.
- **Telemetry:** the registry update after merge will drop 9 docs events
the new app doesn't send. Examples: `markdown_copied`,
`open_in_llm_clicked`, `docs.framework_selected`,
`docs.frontend_selected`.

## Not in this PR
- A spend-capped OpenAI key and a shared rate-limit store for Ask; the
code limits are per instance. Also confirm `OPENAI_API_KEY` is set on
the Railway docs service.
- Moving the live layout out of `src/proto`.
- Held back: the Strands `threads-import` note on
`a2uiGenerationToolNames` waits for #8137.
- Two showcase integrations still link to docs pages that no longer
exist in `docs-links.json`: spring-ai (2 links) and built-in-agent (1).
No test checks them.

## Verification
Run on this branch:
- **shell-docs** (the `test_unit-shell-docs` steps):
  - `showcase-data`, `tsc`, oxlint, the LFS fetch and `next build` pass.
  - All 616 pages compile.
- Against `next start`: `check-redirects` passes 1034/1034, and
`check-live-pages` 506/506.
- **Repo suites:**
- showcase-scripts 3464/3464, including the `globals.css` drift guard
across all 23 integrations and `main`'s two generative UI docs tests.
  - The CrewAI docs-link tests pass for both CrewAI integrations.
  - The packaged-skill drift checks pass 8/8.
- The deprecated-import ratchet passes 8/8. Its baseline is regenerated
for the moved pages and shrinks from 81 to 74 entries, with nothing new
taught.
  - The model-name and Intelligence env-name checks are clean.
- **Nothing lost:**
- `git range-diff` pairs all 64 of #8214's commits unchanged. 72 of the
stack branch's 75 have a counterpart. The other three are a
`setup-dotnet` comment fix (superseded by `main`'s v6.1.0 pin), its
`gpt-6-luna` allowlist commit (covered by #8214's own), and the scroll
fix, rewritten here on top of dark mode.
- A three-way check of every file either branch changed found nothing
missing. The differences that remain are newer `main` work, the folded
pages, and the model pins.

## Related PRs and Issues
- Replaces #8214 (and #8160 before it), and the stack #8320, #8321,
#8322 and #8325, which merged into `tylerslaton/docs-shell-docs-v2`.
- Supersedes #8162 (its Dockerfile and LFS fetch are here).

## Checklist

- [x] 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
- [x] 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)
- [x] "Allow edits by maintainers" is checked (lets us help iterate on
your PR directly — faster turnaround for everyone)

BREAKING CHANGE: `showcase/shell-docs` is a new app. Its scripts, source
layout and dev server follow the Fumadocs rebuild; run it with `npm
install && npm run dev` in `showcase/shell-docs` (see its README).

🤖 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