Skip to content

Feature: Expose theme toggle function in window object for easy theme sync integration with client applications (Copilot Assistant) - #2941

Open
MateusNavarro77 wants to merge 3 commits into
Chainlit:mainfrom
MateusNavarro77:feature/expose-theme-toggle-copilot
Open

Feature: Expose theme toggle function in window object for easy theme sync integration with client applications (Copilot Assistant)#2941
MateusNavarro77 wants to merge 3 commits into
Chainlit:mainfrom
MateusNavarro77:feature/expose-theme-toggle-copilot

Conversation

@MateusNavarro77

@MateusNavarro77 MateusNavarro77 commented May 31, 2026

Copy link
Copy Markdown

Summary

  • Adds a programmatic theme toggle for the Copilot assistant and tests to validate programmatic theme changes and persistence.

Motivation

  • Allow external code (or tests) to change the Copilot UI theme at runtime (Useful for Theme Sync with the client application that copilot assistant is embedded).
Screenshot from 2026-05-31 11-31-20 Screenshot from 2026-05-31 11-31-28 Screenshot from 2026-05-31 11-31-40

Summary by cubic

Expose window.setChainlitCopilotTheme(theme) for host-app theme sync. The choice persists in vite-ui-theme and is restored on mount; the API only works while the widget is mounted; tests cover both behaviors.

Written for commit 3bfdc78. Summary will update on new commits.

Review in cubic

MateusNavarro77 and others added 2 commits May 31, 2026 11:12
Co-Authored-By: Gemini CLI <noreply@google.com>
…sistence in copilot assistant

Co-Authored-By: Gemini CLI <noreply@google.com>
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. e2e-tests Has E2E tests enhancement New feature or request frontend Pertains to the frontend. labels May 31, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Re-trigger cubic

@MateusNavarro77 MateusNavarro77 changed the title Feature: Expose theme toggle function in window object for easy theme sync integration with client applications Feature: Expose theme toggle function in window object for easy theme sync integration with client applications (Copilot Assistant) May 31, 2026
@dokterbob dokterbob added the review-me Ready for review! label Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e-tests Has E2E tests enhancement New feature or request frontend Pertains to the frontend. review-me Ready for review! size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants