Skip to content

Sync terminal xterm palette with app theme CSS variables#95

Merged
SDSLeon merged 2 commits into
masterfrom
lightcode/lively-zebra-c26ecf41
Jun 2, 2026
Merged

Sync terminal xterm palette with app theme CSS variables#95
SDSLeon merged 2 commits into
masterfrom
lightcode/lively-zebra-c26ecf41

Conversation

@SDSLeon

@SDSLeon SDSLeon commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Type: Bugfix

  • Terminal foreground, background, and cursor colors now come from the same CSS custom properties as the rest of the UI, so theme presets (Dracula, Nord, etc.) apply to xterm as well.
  • Fixed terminals staying on hard-coded light/dark colors after a theme or appearance change by re-applying the palette when themePreset or resolved appearance updates.
  • Keeps prior light/dark fallbacks when a variable is missing or cannot be parsed, so the terminal still renders if theme vars are unavailable.

- Read background, foreground, and cursor from shared CSS custom properties
- Re-apply theme on appearance or preset change after AppProvider updates vars
@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
lightcode-landing Ready Ready Preview, Comment Jun 2, 2026 10:23pm

The new theme-sync effect assigns `terminal.options.theme` via
requestAnimationFrame. The xterm mock never set `this.options`, so the
deferred callback threw `Cannot set properties of undefined`, surfacing
as 7 unhandled errors that failed the test run even though all specs
passed. Mirror the real Terminal by exposing the constructor options as
`this.options`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@SDSLeon SDSLeon merged commit 1e71f12 into master Jun 2, 2026
6 checks passed
@SDSLeon SDSLeon deleted the lightcode/lively-zebra-c26ecf41 branch June 2, 2026 22:50
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