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 2 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 2 commits into
Chainlit:mainfrom
MateusNavarro77:feature/expose-theme-toggle-copilot

Conversation

@MateusNavarro77
Copy link
Copy Markdown

@MateusNavarro77 MateusNavarro77 commented May 31, 2026

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) to programmatically switch the Copilot theme so host apps can stay in sync. The choice persists in vite-ui-theme and is restored on mount; tests cover both behaviors.

Written for commit c77c0d5. 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
Copy link
Copy Markdown
Contributor

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

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
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. size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant