Skip to content

[Fix] oclite TUI renders blank - ink-text-input may not work in bundle #139

Closed

Description

@randomm

Problem

oclite TUI renders ANSI escape codes but NO VISIBLE TEXT.

Root Cause: React Version Mismatch

  • Workspace React: 18.3.1
  • Ink requires: >=19.0.0
  • Ink bundles: 19.1.0

Both React versions get bundled together. When hooks execute, React's internal dispatcher is null because the App uses React 18 context while Ink uses React 19.

Error: Invalid hook call... You might have more than one copy of React

Fix Options

Option 1: Upgrade workspace React to 19.1.0 (cleanest)

Option 2: Configure build-lite.ts to alias React imports to Ink's React 19

Files

  • packages/opencode/package.json - React version
  • packages/opencode/script/build-lite.ts - bundler config

Acceptance Criteria

  • Single React version in bundle
  • TUI renders visible text
  • Input works

Activity

  1. randomm commented on Feb 5, 2026

    @randomm
    OwnerAuthor

    ✅ Fixed in PR #140 (merged as f837a85)

    Root cause: React version mismatch (workspace 18.x vs Ink 19.x)

    Fixes applied:

    • React 19 upgrade to match Ink
    • Custom InputLine with useInput hook (removed ink-text-input)
    • Input sanitization, race condition fixes
    • Real App with SDK integration (not mock LiteApp)
    • Instance.provide() properly initialized
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions