feat(theme): register native V2 opencode theme - #49846
Merged
Merged
Conversation
jlongster
force-pushed
the
native-v2-theme
branch
6 times, most recently
from
September 18, 2026 20:30
50e97e5 to
894f5eb
Compare
Register a native V2 OpenCode theme for the full TUI and Mini fallback paths, remove the old hard-coded DEFAULT_THEME, and keep DEFAULT_CATEGORICAL in its own module. The native asset is decoded lazily through getOpenCodeTheme(). Remove text.status from the public theme schema. Session running indicators now use accent[800], while permission, question, and activity-unread indicators use interactive[800]. Error-unread indicators continue to use feedback.error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Register
packages/tui/src/theme/assets/v2/opencode.jsonas the built-inopencodetheme and remove the hard-codedDEFAULT_THEMEfrom@opencode/theme.The old V1
assets/opencode.jsonremains available as a migration fixture but is no longer used by production fallback paths.Native asset
The V2 asset is generated from the current V1 OpenCode theme and then minimized:
base: complete shared semantic token structure and@dialoglight: complete light hue palettedark: complete dark hue palette plus only semantic values that differ from baseLight and dark resolve token-for-token identically to the migrated V1 source.
Remove DEFAULT_THEME
packages/theme/src/tui/defaults.ts.DEFAULT_THEMEexport.DEFAULT_CATEGORICALinto the independentcategorical.tsmodule; V1 migration still uses it when no semantic hues can be inferred.getOpenCodeTheme(), which lazily decodes and caches the native asset; use it in the registry, Mini, and tests.@opencode/themetests, preserving package dependency direction.getOpenCodeTheme()is first called.Verification
packages/theme: typecheck; 6 tests pass.packages/tui: typecheck; 101 focused theme/Mini tests pass.opencode-light,opencode-dark,catppuccin-light, anddracula-dark.Remove text.status
The native migration exposed that
text.statuswas a session-tab-specific namespace. Remove it from partial/complete schemas, resolved types, V1 migration, and the native asset. Consumers now use explicit hues at the requested step:hue.accent[800]hue.interactive[800]text.feedback.error.base(unchanged)