[PR #11800] feat(opencode): Ink-based TUI rewrite for oclite #13935

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

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

State: closed
Merged: No


Summary

Complete rewrite of oclite TUI using Ink (React for terminals), replacing the log-update based implementation that had concurrent update issues.

Changes

Setup & Infrastructure

  • Add Ink 6.6.0, React 19.2.4, ink-spinner, ink-text-input
  • Custom preload.ts to coexist with SolidJS (excludes cli/ink/ from Babel transform)
  • Separate tsconfig.ink.json for React JSX

Components

  • App - Root component with useReducer state management
  • MessageList - Static message history using Ink's <Static>
  • StreamingProse - Live text display with streaming cursor
  • InputLine - Text input using ink-text-input
  • SelectMenu - Keyboard-navigable option selector
  • StatusBar - Agent/model/status display
  • ToolDisplay - Tool execution status with spinner
  • TaskDisplay - Subagent task with child tool status
  • theme - Centralized color tokens

State Management

  • Type-safe reducer with discriminated union actions
  • Immutable state updates
  • 96.79% test coverage on reducer logic

Test Coverage

  • 90 tests, all passing
  • TDD approach throughout
  • Known: React 19 + ink-testing-library shows cosmetic warnings (documented)

Verification

  • bun run typecheck - 0 errors
  • bun test test/cli/ink/ - 90 pass, 0 fail

Fixes #11763, #11764, #11765, #11766, #11767, #11768, #11769, #11770, #11774, #11776

Part of Epic #11762

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11800 **State:** closed **Merged:** No --- ## Summary Complete rewrite of oclite TUI using Ink (React for terminals), replacing the log-update based implementation that had concurrent update issues. ### Changes **Setup & Infrastructure** - Add Ink 6.6.0, React 19.2.4, ink-spinner, ink-text-input - Custom preload.ts to coexist with SolidJS (excludes cli/ink/ from Babel transform) - Separate tsconfig.ink.json for React JSX **Components** - `App` - Root component with useReducer state management - `MessageList` - Static message history using Ink's `<Static>` - `StreamingProse` - Live text display with streaming cursor - `InputLine` - Text input using ink-text-input - `SelectMenu` - Keyboard-navigable option selector - `StatusBar` - Agent/model/status display - `ToolDisplay` - Tool execution status with spinner - `TaskDisplay` - Subagent task with child tool status - `theme` - Centralized color tokens **State Management** - Type-safe reducer with discriminated union actions - Immutable state updates - 96.79% test coverage on reducer logic ### Test Coverage - 90 tests, all passing - TDD approach throughout - Known: React 19 + ink-testing-library shows cosmetic warnings (documented) ### Verification - ✅ `bun run typecheck` - 0 errors - ✅ `bun test test/cli/ink/` - 90 pass, 0 fail Fixes #11763, #11764, #11765, #11766, #11767, #11768, #11769, #11770, #11774, #11776 Part of Epic #11762
yindo added the pull-request label 2026-02-16 18:18:45 -05:00
yindo closed this issue 2026-02-16 18:18:45 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13935