[PR #11269] fix(tui): add opentui-spinner import to resolve component registration #13723

Open
opened 2026-02-16 18:18:33 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/11269

State: open
Merged: No


Problem

https://github.com/anomalyco/opencode/issues/11271

Fixes #<11271>

Encountered the following error when running the TUI:

Error: [Reconciler] Unknown component type: spinner
at createElement (../../node_modules/.bun/@opentui+solid@0.1.75/node_modules/@opentui/solid/index.js:522:17)

This error occurs at src/cli/cmd/tui/component/prompt/index.tsx:1011 when using the <spinner /> component.

Root Cause

The opentui-spinner package requires a side-effect import to register the spinner component with @opentui/solid's component catalog. Although
prompt/index.tsx contains import "opentui-spinner/solid", the component may not be registered before it's used due to module loading order issues.

Solution

Add import "opentui-spinner/solid" at the top of the TUI application's main entry file src/cli/cmd/tui/app.tsx to ensure the spinner component is
registered before any components attempt to use it.

Changes

  • Added import "opentui-spinner/solid" on line 2 of src/cli/cmd/tui/app.tsx
  • Placement is right after the @opentui/solid import to ensure proper registration order

Testing

  • Built and ran locally, spinner component displays correctly
  • No more "Unknown component type: spinner" error
  • Other TUI functionality works as expected

Related Files

  • packages/opencode/src/cli/cmd/tui/app.tsx
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11269 **State:** open **Merged:** No --- ## Problem https://github.com/anomalyco/opencode/issues/11271 Fixes #<11271> Encountered the following error when running the TUI: Error: [Reconciler] Unknown component type: spinner at createElement (../../node_modules/.bun/@opentui+solid@0.1.75/node_modules/@opentui/solid/index.js:522:17) This error occurs at `src/cli/cmd/tui/component/prompt/index.tsx:1011` when using the `<spinner />` component. ## Root Cause The `opentui-spinner` package requires a side-effect import to register the spinner component with `@opentui/solid`'s component catalog. Although `prompt/index.tsx` contains `import "opentui-spinner/solid"`, the component may not be registered before it's used due to module loading order issues. ## Solution Add `import "opentui-spinner/solid"` at the top of the TUI application's main entry file `src/cli/cmd/tui/app.tsx` to ensure the spinner component is registered before any components attempt to use it. ## Changes - Added `import "opentui-spinner/solid"` on line 2 of `src/cli/cmd/tui/app.tsx` - Placement is right after the `@opentui/solid` import to ensure proper registration order ## Testing - ✅ Built and ran locally, spinner component displays correctly - ✅ No more "Unknown component type: spinner" error - ✅ Other TUI functionality works as expected ## Related Files - `packages/opencode/src/cli/cmd/tui/app.tsx`
yindo added the pull-request label 2026-02-16 18:18:33 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13723