Skip to content

docs: propose OpenTUI TUI migration#112

Merged
avoidwork merged 4 commits into
mainfrom
docs/refactor-tui-opentui
Jun 5, 2026
Merged

docs: propose OpenTUI TUI migration#112
avoidwork merged 4 commits into
mainfrom
docs/refactor-tui-opentui

Conversation

@avoidwork
Copy link
Copy Markdown
Owner

Description

Proposes migrating the TUI subsystem from Ink to OpenTUI (Zig-native terminal renderer with React reconciler).

Type of Change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional changes)
  • Performance improvement
  • CI / build / tooling

Testing

All behavioral requirements from the existing tui-interface spec are preserved. No implementation changes yet -- this PR contains only the proposal artifacts (proposal, design, specs, tasks). Implementation will be done via /opsx-apply after the PR is approved.

Spec Status
tui-interface Unchanged -- all behavioral requirements preserved
tui-scroll-view Delta spec: removes ink-scroll-view dependency, ADDED native ScrollBox with sticky scroll
input-cursor Delta spec: removes blink animation, removes blinkTimeout config, keeps cursorChar
markdown-rendering Delta spec: removes marked/marked-terminal, ADDED native <markdown> component
tui-opentui (NEW) Defines renderer initialization, hook replacements, and cleanup requirements

Coverage

  • 100% line coverage maintained

Checklist

  • npm run lint passes
  • Tests pass with 100% line coverage
  • No forbidden patterns used
  • Conventional Commit style applied

Key decisions in the design doc

  • Use OpenTUI React reconciler (@opentui/react), not raw renderables API -- preserves all React state management
  • Replace ink + ink-scroll-view + marked + marked-terminal -G> @opentui/core + @opentui/react
  • All JSX moves from PascalCase (<Box>) to lowercase (<box>) with hex colors
  • Pure utility modules (panels.js, hooks.js, messages.js, commandParser.js) unchanged
  • Entry point: createCliRenderer() + createRoot() replaces <Application> wrapper
  • Runtime: OpenTUI requires Bun at runtime; tooling (lint, test, coverage) stays on Node.js

Full proposal, design, specs, and task breakdown are in openspec/changes/refactor-tui-opentui/

@avoidwork avoidwork self-assigned this Jun 5, 2026
@avoidwork avoidwork enabled auto-merge (squash) June 5, 2026 12:43
@avoidwork avoidwork merged commit 7a0f4ba into main Jun 5, 2026
2 checks passed
@avoidwork avoidwork deleted the docs/refactor-tui-opentui branch June 5, 2026 12:44
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.

1 participant