Skip to content

Implement theming system for Ink components #11776

Closed as not planned
Closed as not planned

Description

@randomm

Parent Epic

Part of #11762 (Ink-based TUI Rewrite)

Objective

Create theming system for consistent colors and styling across all Ink components.

Current Theme (from theme.ts)

const theme = {
  tool: {
    running: { icon: fg.yellow, text: fg.gray },
    done: { icon: fg.green, text: fg.gray },
    error: { icon: fg.red, text: fg.gray },
    denied: { icon: fg.red, text: fg.gray }
  },
  task: {
    running: { icon: fg.yellow, text: fg.cyan },
    done: { icon: fg.green, text: fg.cyan }
  },
  prompt: {
    agent: fg.cyan,
    separator: fg.cyan
  }
}

Ink Theme Approach

// src/cli/ink/theme/index.ts
export const theme = {
  colors: {
    primary: 'cyan',
    success: 'green',
    warning: 'yellow',
    error: 'red',
    muted: 'gray'
  },
  tool: {
    running: { icon: 'yellow', text: 'gray' },
    done: { icon: 'green', text: 'gray' },
    error: { icon: 'red', text: 'gray' },
    denied: { icon: 'red', text: 'gray' }
  },
  task: {
    running: { icon: 'yellow', text: 'cyan' },
    done: { icon: 'green', text: 'cyan' }
  },
  prompt: {
    agent: 'cyan',
    separator: 'cyan',
    symbol: '❯'
  },
  status: {
    dimColor: true
  }
}

// Usage in components
import { theme } from '../theme'

const ToolDisplay = ({ status }) => (
  <Text color={theme.tool[status].text}>...</Text>
)

Tasks

  • Create src/cli/ink/theme/index.ts with theme object
  • Create src/cli/ink/theme/context.tsx for theme provider (optional)
  • Port existing color values from theme.ts
  • Document all theme tokens
  • Update all components to use theme
  • Consider dark/light mode support (future)

Acceptance Criteria

  • All components use theme values
  • No hardcoded colors in components
  • Theme matches current lite appearance
  • Easy to modify colors in one place

Estimated Effort

0.5 days

Risk

Low - organizational task

Dependencies

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Feb 2, 2026
  2. randomm commented on Feb 2, 2026

    @randomm
    Author

    Research Note

    Theming can be combined with #11764 (App component) in a single PR since:

    • Theme is a prerequisite for all components
    • Small scope (0.5d)
    • Same architectural layer

    Will implement theme first, then App component references it.

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

Metadata

Metadata

Assignees

Labels

opentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions