Skip to content

feat: port Ink to Octane - #702

Merged
trueadm merged 6 commits into
octanejs:mainfrom
jonkwheeler:feat/ink-port
Aug 16, 2026
Merged

trueadm merged 6 commits into
octanejs:mainfrom
jonkwheeler:feat/ink-port

Conversation

@jonkwheeler

@jonkwheeler jonkwheeler commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • port Ink 7.1.1 to Octane's native universal renderer
  • preserve Ink's Yoga terminal DOM, ANSI output, components, hooks, input handling, static output, accessibility, and interactive controller
  • add renderer configuration, .ink.tsrx intrinsics, provenance, documentation, generated package inventories, and a patch changeset

Why

  • make Ink's terminal UI model available without React or react-reconciler
  • exercise Octane's universal renderer against a stateful non-DOM host with layout, local callbacks, refs, visibility, and terminal lifecycle behavior

Changes

  • implement an Ink host driver over Octane universal batches, including nested virtual text and local transform callbacks
  • adapt the complete published Ink component/hook surface to Octane hooks, contexts, refs-as-props, and programmatic component-plus-props roots
  • vendor the pinned Ink 7.1.1 source and 111-file upstream test tree with exact commit, archive, integrity, and license metadata
  • add native string/interactive contracts, framework-neutral upstream adaptations, a vendored-source differential lane, and public API typetests
  • register @octanejs/ink in workspace, Vitest, website, CLI, binding status, package inventory, and parity metadata

Validation

  • pnpm format:check (not run repo-wide; scoped Prettier check passed)
  • pnpm typecheck (not run repo-wide; both Ink source and public typetest projects passed with tsrx-tsc)
  • pnpm test (not run repo-wide)
  • targeted tests: vitest run --project ink --project ink-differential — 4 files, 10 tests passed
  • CI=true pnpm sync
  • node scripts/react-parity/check.mjs --validate-only — stable 5,345 / canary 5,413 cases current
  • vendored src, test, package metadata, and license compare byte-for-byte with Ink v7.1.1

Risk / follow-ups

  • the parity pin is intentionally recorded-unverified: the full upstream AVA/React suite is vendored and classified, but is not claimed as a pristine executed oracle
  • this machine runs Node 22.14.0 while the repository requires Node 22.22.2; scoped validation passed with engine warnings
  • the concurrent option remains accepted for source compatibility, while scheduling is owned by Octane

Provenance

  • An agent produced this diff (agent-authored)

Note

Medium Risk
Large new interactive terminal stack (stdin/TTY, layout, redraw) with documented API divergences; parity is intentionally not claimed as full upstream oracle coverage.

Overview
Adds @octanejs/ink, a new framework binding that ports Ink 7.1.1 onto Octane’s universal renderer instead of React/react-reconciler. The package ships terminal Yoga layout, ANSI output, interactive lifecycle (raw mode, bracketed paste, alternate screen, Kitty keyboard, suspendTerminal), and the published Ink components and hooks, wired through an Ink host driver (ink-box / ink-text intrinsics, local transform callbacks, refs-as-props).

Apps use *.ink.tsrx with @octanejs/ink/config and render(App, props) / renderToString(App, props) (component + props, not a pre-created element). Vendored upstream 7.1.1 source and tests are pinned with UPSTREAM.md and a recorded-unverified parity manifest plus a small framework-neutral differential lane.

Repo metadata is updated for the 82nd binding: changeset, generated inventories/status docs, CLI mapping (ink → @octanejs/ink), Vitest ink / ink-differential projects, and lockfile hash bumps in existing parity JSON files.

Reviewed by Cursor Bugbot for commit 5922d8e. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent feat PR: new feature or capability labels Aug 10, 2026
Comment thread packages/ink/src/hooks/use-focus.ts Resolved
- strip compiler slot symbols from omitted Ink hook options
- cover all four affected hooks through a compiled fixture
@trueadm
trueadm marked this pull request as ready for review August 15, 2026 20:48

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit 2c035ee. Configure here.

Comment thread packages/ink/src/host-driver.ts Resolved
@trueadm
trueadm merged commit 0613586 into octanejs:main Aug 16, 2026
27 checks passed
@jonkwheeler
jonkwheeler deleted the feat/ink-port branch October 20, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent feat PR: new feature or capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants