Skip to content

feat: add color scheme customization#2263

Open
kantord wants to merge 2 commits into
mainfrom
customize-colors-in-desktop-app
Open

feat: add color scheme customization#2263
kantord wants to merge 2 commits into
mainfrom
customize-colors-in-desktop-app

Conversation

@kantord
Copy link
Copy Markdown
Member

@kantord kantord commented May 15, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 15, 2026 18:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds operator-configurable color scheme branding so the Electron main process can load a JSON theme, serialize allowed color tokens to CSS, and expose it to the renderer before React mounts.

Changes:

  • Adds branding config schema, token sanitization/serialization utilities, loader, and tests.
  • Passes generated branding CSS from main to preload via additionalArguments, then injects it in the renderer.
  • Adds a sample test theme, documentation, and a dev launch script for custom-theme verification.

Reviewed changes

Copilot reviewed 49 out of 49 changed files in this pull request and generated no comments.

Show a summary per file
File Description
common/branding/color-tokens.ts Defines allowed color tokens and serializes safe overrides to CSS.
common/branding/__tests__/color-tokens.test.ts Tests token filtering, sanitization, and CSS output.
common/branding/schema.ts Defines the branding JSON schema.
main/src/branding/load.ts Loads branding config and converts color tokens to CSS.
main/src/branding/__tests__/load.test.ts Tests config loading, invalid inputs, and CSS generation.
main/src/branding/paths.ts Resolves the branding config path.
main/src/main-window.ts Loads branding CSS and passes it to the renderer process.
preload/src/api/branding.ts Reads and decodes branding CSS from process arguments.
preload/src/api/__tests__/branding.test.ts Tests preload branding argument handling.
preload/src/preload.ts Exposes the branding API through electronAPI.
renderer/src/renderer.tsx Injects branding CSS before mounting React.
renderer/src/index.css Adds additional themeable color variables.
renderer/src/common/mocks/electronAPI.ts Adds branding to the renderer test Electron API mock.
vitest.setup.ts Adds branding to the global Electron API test stub.
branding-examples/README.md Documents branding examples and usage.
branding-examples/test-theme.json Adds a sample custom color theme.
scripts/start-custom-theme.ts Adds a helper for launching with the sample theme.
package.json Adds the start:customTheme script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants