anomalyco / anomalyco/opencode
refactor(tui): finish theme compatibility cleanup
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Problem
The main TUI now resolves and consumes V2 theme tokens, but compatibility surfaces still retain the flat V1 proxy and a few missing semantic pairs force ad hoc color composition.
Remaining work
- Add readable warning and error foreground/background treatments instead of mapping every feedback background to the ordinary background.
- Replace the remaining
selectedForegroundcompatibility path with complete semantic pairs or a transparent-theme-aware contrast helper. - Remove the flat V1 theme proxy after migrating the mini TUI and built-in V1-shaped assets. Syntax generation already consumes resolved V2 tokens.
Current seams
packages/theme/src/tui/defaults.ts: feedback backgrounds currently resolve to the ordinary background.packages/theme/src/tui/syntax.ts:extmark.pastemanually combines an action foreground with a warning background.packages/tui/src/theme/v1.ts: flat compatibility proxy, legacy syntax generation, andselectedForeground.packages/tui/src/theme/index.ts: exports the V1 compatibility surface.packages/tui/src/mini/theme.ts: still reads flat V1 fields.packages/tui/src/theme/assets/: built-in V1-shaped themes migrated at load time.
Scope
Thinking opacity and V1 secondary replacement are no longer V2 migration tasks. Current V2 thinking uses theme.text.subdued, and active V2 components do not read flat secondary values.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with packages/theme/src/tui/defaults.ts and syntax.ts, then trace the compatibility exports in packages/tui/src/theme/index.ts and v1.ts. Check how packages/tui/src/mini/theme.ts and packages/tui/src/theme/assets/ consume V1-shaped fields. Done means warning/error pairs and selectedForeground compatibility are resolved, the mini TUI and assets are migrated, and the flat V1 proxy is removable without remaining consumers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100