[PR #6613] feat(ui): use TUI themes as source of truth for Web UI theming #12001

Closed
opened 2026-02-16 18:16:56 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6613

State: closed
Merged: No


Summary

  • Add tui-adapter.ts to convert TUI theme JSON → Web UI's DesktopTheme format
  • Replace manual theme imports with Vite glob import (auto-discovers 31 TUI themes)
  • Delete 10 redundant Web UI theme JSON files (-1,773 lines)
  • Change default theme ID from oc-1 to opencode

Motivation

TUI themes and Web UI themes were manually synced, causing drift and duplication. Now TUI themes are the single source of truth—new themes automatically appear in Web UI.

Implementation

  • tuiToDesktop() maps TUI's ~42 colors → 9 seed colors + syntax/markdown overrides
  • Existing resolveThemeVariant() generates the full ~200 CSS tokens
  • Glob import discovers all *.json files in TUI theme directory

Test Plan

  • bun run build passes in packages/app
  • No TypeScript errors
  • Visual verification in Web UI (themes load correctly)
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6613 **State:** closed **Merged:** No --- ## Summary - Add `tui-adapter.ts` to convert TUI theme JSON → Web UI's `DesktopTheme` format - Replace manual theme imports with Vite glob import (auto-discovers 31 TUI themes) - Delete 10 redundant Web UI theme JSON files (-1,773 lines) - Change default theme ID from `oc-1` to `opencode` ## Motivation TUI themes and Web UI themes were manually synced, causing drift and duplication. Now TUI themes are the single source of truth—new themes automatically appear in Web UI. ## Implementation - `tuiToDesktop()` maps TUI's ~42 colors → 9 seed colors + syntax/markdown overrides - Existing `resolveThemeVariant()` generates the full ~200 CSS tokens - Glob import discovers all `*.json` files in TUI theme directory ## Test Plan - [x] `bun run build` passes in `packages/app` - [x] No TypeScript errors - [ ] Visual verification in Web UI (themes load correctly)
yindo added the pull-request label 2026-02-16 18:16:56 -05:00
yindo closed this issue 2026-02-16 18:16:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12001