Skip to content

Comments

feat: migrate atmn CLI from React Ink to OpenTUI#74

Draft
joejohnson123[bot] wants to merge 2 commits intonextfrom
jj/opentui-migration
Draft

feat: migrate atmn CLI from React Ink to OpenTUI#74
joejohnson123[bot] wants to merge 2 commits intonextfrom
jj/opentui-migration

Conversation

@joejohnson123
Copy link

@joejohnson123 joejohnson123 bot commented Feb 20, 2026

Summary

Migrates the atmn CLI interactive TUI from React Ink to OpenTUI using the @opentui/react reconciler.

Approach

  • Created ink-compat.tsx compatibility layer that re-exports OpenTUI components with Ink-like APIs
  • All 83 files importing from ink/ink-* updated to use the compat layer
  • Shared components (Card, LoadingText, Spinner, etc.) use OpenTUI JSX intrinsics directly
  • Headless/non-TTY code paths completely unchanged

Changes

  • 75 files changed, 1151 insertions, 375 deletions
  • Removed: ink, ink-spinner, ink-select-input, ink-text-input, @inkjs/ui, @mishieck/ink-titled-box, ink-scroll-list, ink-big-text, ink-chart, ink-confirm-input, ink-table, ink-scroll-view, ervy
  • Added: @opentui/core@^0.1.80, @opentui/react@^0.1.80
  • Custom implementations: Spinner (setInterval-based), SelectInput, TextInput, virtual scrolling table

Testing

  • ✅ Build passes (bun run build)
  • ✅ Source execution works perfectly (push, pull commands with PTY)
  • ✅ Headless paths work as before
  • ⚠️ Bundled dist has a rendering issue (blank screen) — needs investigation

Note

Requires bun runtime (not Node.js) due to OpenTUI native bindings.


Summary by cubic

Migrates the atmn CLI interactive TUI from Ink to OpenTUI via a compatibility layer, preserving existing UX and behavior. Headless paths are unchanged.

  • Refactors

    • Added ink-compat.tsx that maps Box, Text, Spinner, SelectInput, TextInput, useInput/useApp/useStdout, and an async render() to OpenTUI.
    • Updated all Ink imports (83 files) to use the compat layer; shared components now use OpenTUI /.
    • Replaced ink-scroll-list with windowed virtual scrolling in tables for stable rendering.
    • Minor prop/attribute mappings (borders, colors, padding) to match OpenTUI intrinsics.
  • Dependencies

    • Removed Ink and related packages; added @opentui/core and @opentui/react.
    • Updated tsconfig (jsxImportSource=@opentui/react) and bun.config externals for OpenTUI/react.
    • Requires Bun runtime; Node is not supported with OpenTUI.
    • Known issue: bundled dist renders blank; run from source until the Bun bundler/OpenTUI reconciler interaction is fixed.

Written for commit 26819e3. Summary will update on new commits.

atmn added 2 commits February 20, 2026 21:18
- Replace all ink, ink-spinner, ink-select-input, ink-text-input, @inkjs/ui,
  @mishieck/ink-titled-box, ink-scroll-list imports (83 files)
- Add @opentui/core and @opentui/react as dependencies
- Remove ink and all ink-* packages from dependencies
- Create ink-compat.tsx compatibility layer providing:
  - Box, Text components mapping Ink props to OpenTUI <box>/<text> intrinsics
  - Spinner component (custom, no built-in in OpenTUI)
  - SelectInput, TextInput components
  - useInput, useApp, useStdout hooks
  - render() function wrapping createCliRenderer + createRoot
- Update tsconfig.json: jsxImportSource=@opentui/react
- Update bun.config.ts: externalize @opentui/core, @opentui/react, react
- Replace ink-scroll-list ScrollList with custom virtual scrolling in CustomersTable
- Fix Card component: borderStyle 'rounded' -> 'round', paddingX -> paddingLeft/Right
- All source renders correctly (verified push, pull commands with PTY)
- Headless/non-TTY code paths unchanged
- Build passes (bun run build)

Note: Bundled dist has a rendering issue where content doesn't appear
(React tree renders but produces blank screen). Source execution works
perfectly. This is a bun bundler interaction with OpenTUI's React
reconciler that needs investigation.
@vercel
Copy link

vercel bot commented Feb 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
autumn-ui Error Error Feb 20, 2026 9:23pm

Request Review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants