Skip to content

Conversation

@msmps
Copy link
Collaborator

@msmps msmps commented Jan 7, 2026

This PR removes unmaintained @opentui/vue and @opentui/go packages from monorepo.

A large part of OpenTUI project is implemented in TypeScript, which means language bindings need to reimplement a lot of API. This is why Go bindings fell behind and became unmaintained.

Given that both Go and Vue are now unmaintained fragments in monorepo, this change removes them to keep only what is officially supported: React, Solid and Core on top of Bun/TypeScript bindings.

Language bindings can then live in their own separate repositories, so they're also not a bottleneck for merges etc.

Changes:

  • Deleted packages/vue/ directory
  • Deleted packages/go/ directory
  • Removed vue/go references from package.json scripts
  • Removed vue/go support from release and publish scripts
  • Updated GitHub workflows to remove vue dist packaging
  • Deleted root install.sh (was only used for Go/native bindings)
  • Updated README to list only supported packages (core, react, solid)

kommander and others added 30 commits September 23, 2025 14:30
…st” error (#200)

Resolves #199

## The Bug

When inserting a React element in the middle of a list inside a
`<scrollbox>`, the application crashes with:

```
Error: Anchor does not exist
  at insertBefore (packages/core/src/Renderable.ts:1118:17)
  at insertBefore (packages/react/src/reconciler/host-config.ts:65:12)
```

## Root Cause

ScrollBox has an internal wrapper structure where user content is added
to a nested child (`this.content`), not directly to the ScrollBox
instance. The component hierarchy looks like:

```
ScrollBox
├── wrapper (scroll-box-wrapper)
│   └── viewport
│       └── content ← User children go here
└── scrollbar (scroll-box-vertical-scrollbar)
```

ScrollBox correctly overrides `add()` and `remove()` to delegate to
`this.content`:

- `add(obj, index)` → `this.content.add(obj, index)` ✓
- `remove(id)` → `this.content.remove(id)` ✓

**However, ScrollBox was missing an override for `insertBefore()`.**

When React inserts an element in the middle of a list (e.g., when a
conditional element appears after initial render), it calls:

```typescript
parent.insertBefore(newChild, anchorChild)
```

Without the override, this uses the base `Renderable.insertBefore()`
which:

1. Looks for `anchorChild` in the parent's direct children via
`renderableMapById`
2. Fails because `anchorChild` is actually in `this.content` (the
wrapper), not in ScrollBox's direct children

## The Fix

Added `insertBefore()` override in ScrollBox to delegate to
`this.content`, matching the pattern used for `add()` and `remove()`:

## Impact Analysis

### Affected Components

- ✅ **ScrollBox** - Fixed by adding `insertBefore()` override
- ✅ **TextRenderable** - Already had proper `insertBefore()` delegation

### Affected Renderers

- ❌ **React** - Was affected (uses `insertBefore()` directly)
- ✅ **Solid** - Not affected (uses `add(node, anchorIndex)` pattern)
- ✅ **Vue** - Not affected (uses `add(node, anchorIndex)` pattern)
…ngs after them (#201)

Resolves #197

## Issue

Conditional React elements with sibling elements after them were not
rendering. For example:

```tsx
{foo ? <box>content</box> : null}
<box>sibling after conditional</box>  // This caused the bug
```

## Root Cause

`insertBefore()` had `else if (renderable.parent)` that only handled
children transferring from different parents. New children (where
`renderable.parent` is null) had **no initialization code at all** -
they weren't added to either tracking array or registered in the
parent's map.

Children need to be in both:
- `_childrenInLayoutOrder` (for layout)
- `_childrenInZIndexOrder` (for rendering)

New children were missing both, making them invisible and inaccessible.

## Fix

Changed `else if (renderable.parent)` to `else` to handle both
transferred children AND new children. Added missing
`_childrenInZIndexOrder.push(renderable)` to ensure children are
properly tracked for rendering.

## Test

Added test verifying `insertBefore()` makes new children accessible via
`getRenderable()`.

Co-authored-by: Claude <[email protected]>
Added an ErrorBoundary component that displays the error stack trace
instead of a black screen

<img width="1146" height="488" alt="Screenshot 2025-10-06 at 13 33 17"
src="https://github.com/user-attachments/assets/648acae3-fca3-4677-bd93-9519465b3f75"
/>
This PR adds scroll acceleration, enabled by default for macOS

Without acceleration, notice that all scrolls are the about the same
speed


https://github.com/user-attachments/assets/7913e603-ba37-416c-bb22-02ae629c2648

With acceleration, notice some scolls are faster, in those cases I moved
the mouse wheel faster


https://github.com/user-attachments/assets/bb7f2b86-17fa-473d-bded-1d0cdee803c2
Some terminals send 2 or more ticks for each mouse wheel tick, for
example Ghostty, with a small delay between each tick, about 4ms on
average.

We ignore these ticks otherwise they would cause faster acceleration to
kick in

ghostty-org/ghostty#7577

---------

Co-authored-by: Sebastian <[email protected]>
kommander and others added 21 commits December 28, 2025 22:23
`flushSync` was renamed to `flushSyncFromReconciler` in react-reconciler
0.32.0.

This fix uses nullish coalescing to check for the new name first,
falling back to the old name for backwards compatibility.

Ref: facebook/react#35424

---------

Co-authored-by: Matt Simpson <[email protected]>
u16 fields silently overflow in release builds when processing lines
exceeding 65535 bytes. Add regression.

Fix #463
---------

Co-authored-by: Sebastian <[email protected]>
@msmps msmps force-pushed the chore/remove-vue-go-packages branch from 51c57f2 to 8035887 Compare January 8, 2026 09:02
@msmps msmps closed this Jan 8, 2026
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.