Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix isModalDefaultOpen always true in useCopilotChatConfiguration#3340

Open
mxmzb wants to merge 3 commits intomainfrom
fix/is-modal-default-open
Open

Fix isModalDefaultOpen always true in useCopilotChatConfiguration#3340
mxmzb wants to merge 3 commits intomainfrom
fix/is-modal-default-open

Conversation

@mxmzb
Copy link
Contributor

@mxmzb mxmzb commented Mar 2, 2026

What does this PR do?

  • Fix nested CopilotChatConfigurationProvider ignoring inner isModalDefaultOpen when parent already has modal state
  • The useState initializer used parentConfig?.isModalOpen ?? resolvedDefaultOpen, so the parent's value always won via ?? — changed to use resolvedDefaultOpen directly since shouldCreateModalState already handles parent passthrough

Related PRs and Issues

mxmzb and others added 2 commits March 3, 2026 03:43
When CopilotChatConfigurationProvider is nested, the inner provider's
isModalDefaultOpen was ignored because the useState initializer preferred
the parent's isModalOpen value via ??. Since shouldCreateModalState
already gates when internalModalOpen is used, the initializer should
always use the provider's own resolvedDefaultOpen.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@changeset-bot
Copy link

changeset-bot bot commented Mar 2, 2026

🦋 Changeset detected

Latest commit: ec0382f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 23 packages
Name Type
@copilotkitnext/react Patch
@copilotkit/react-core Patch
@copilotkitnext/next-pages-router Patch
@copilotkit/a2ui-renderer Patch
@copilotkit/react-textarea Patch
@copilotkit/react-ui Patch
@copilotkit/runtime-client-gql Patch
@copilotkit/runtime Patch
@copilotkit/sdk-js Patch
@copilotkit/shared Patch
@copilotkit/voice Patch
@copilotkitnext/agent Patch
@copilotkitnext/angular Patch
@copilotkitnext/core Patch
@copilotkitnext/demo-agents Patch
@copilotkitnext/eslint-config Patch
@copilotkitnext/runtime Patch
@copilotkitnext/shared Patch
@copilotkitnext/sqlite-runner Patch
@copilotkitnext/typescript-config Patch
@copilotkitnext/web-inspector Patch
@copilotkitnext/node-express Patch
@copilotkit-storybook/angular Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Contributor

vercel bot commented Mar 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Mar 3, 2026 0:07am
travel Ready Ready Preview, Comment Mar 3, 2026 0:07am

Request Review

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

📣 Social Copy Generator

Generate social media copies (Twitter/X, LinkedIn, Blog Post) for this PR using Claude.

  • Generate social media copies

@nx-cloud
Copy link

nx-cloud bot commented Mar 2, 2026

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit ec0382f

Command Status Duration Result
nx run-many -t build --projects=packages/** ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-03 00:35:56 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 2, 2026

Open in StackBlitz

@copilotkit/a2ui-renderer

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

@copilotkit/react-core

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

@copilotkit/react-textarea

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

@copilotkit/react-ui

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

@copilotkit/runtime

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

@copilotkit/runtime-client-gql

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

@copilotkit/sdk-js

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

@copilotkit/shared

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

@copilotkitnext/agent

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkitnext/agent@3340

@copilotkitnext/angular

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkitnext/angular@3340

@copilotkitnext/core

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkitnext/core@3340

@copilotkitnext/react

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkitnext/react@3340

@copilotkitnext/runtime

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkitnext/runtime@3340

@copilotkitnext/shared

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkitnext/shared@3340

@copilotkitnext/sqlite-runner

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkitnext/sqlite-runner@3340

@copilotkit/voice

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

@copilotkitnext/web-inspector

pnpm add https://pkg.pr.new/CopilotKit/CopilotKit/@copilotkitnext/web-inspector@3340

commit: b3e44f7

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