Skip to content

chore: OpenTUI 0.6.5 - #55339

Merged
simonklee merged 11 commits into
devfrom
oc-ot-0-6-5
Oct 19, 2026
Merged

simonklee merged 11 commits into
devfrom
oc-ot-0-6-5

Conversation

@simonklee

@simonklee simonklee commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Added by the opencode bot (AI-generated).

Public API: raises the plugin's OpenTUI peer range to >=0.6.4, adds a required owner to generateSyntax, and replaces the tui register-spinner export (not backwards compatible for 0.5 plugins)

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This needs another pass: the branch targets OpenTUI 0.6.5 but pins 0.6.4. The title, the plugin docs (>=0.6.5, "renderable method of the same name, on OpenTUI 0.6.5 or later") and the new native-resources fixture (box.getPadding(...)) all expect 0.6.5. But package.json, bun.lock and the @opencode/plugin peer range are on 0.6.4. As a result, bun run typecheck in packages/tui fails (TS2551: getPadding does not exist on BoxRenderable), and the new plugin-native-resources.test.tsx times out waiting for "Plugin padding 2". The registry here only goes up to 0.6.4, so the bump to 0.6.5 likely still needs to land once it's published. The rest of packages/tui tests pass, except two dialog-shell-output tests that also fail on dev. packages/cli type-checks. A simulated session in the TUI renders the same as on dev.

Public API impact:

  • @opencode/plugin peer dependencies: @opentui/core / @opentui/solid >=0.5.17 → >=0.6.4 (the docs say >=0.6.5). Plugins built against OpenTUI 0.5 that use getLayoutNode(), or create SyntaxStyle/TextBuffer/OptimizedBuffer without an owner, must be updated; the new docs section covers this.
  • @opencode/theme generateSyntax(theme) → generateSyntax(theme, owner). The new owner parameter is required, so existing callers break.
  • @opencode/tui export ./component/register-spinner (registerOpencodeSpinner) is removed, and ./component/spinner-renderable is added. The <spinner> element is now opencode's own renderable instead of opentui-spinner.

Before

After

Comment thread package.json Resolved
Comment thread packages/plugin/package.json Resolved
@simonklee

Copy link
Copy Markdown
Member Author

OpenCode your comments should be outdated now.

@opencode-agent

Copy link
Copy Markdown
Contributor

You're right, both comments are outdated. de950a2bf ("pin 0.6.5") moves the catalog in package.json, bun.lock and the @opencode/plugin peer range to 0.6.5, so they now match the docs and the fixture.

I checked pr/head (de950a2bf) in a temporary worktree:

  • Type checks: packages/tui, packages/cli and packages/theme all pass. The getPadding TS2551 error is gone.
  • New test: plugin-native-resources.test.tsx passes.
  • Full packages/tui suite: 1500 pass, 2 fail. Both failures are the dialog-shell-output "shell output opens, follows…" timeouts, which also fail on dev.

With that, I have no blocking concerns left. The API note in the description should now say >=0.6.5 instead of >=0.6.4. The rest of it still applies: generateSyntax now requires an owner, and the register-spinner export is replaced by spinner-renderable.

I didn't rerun the TUI drive session on the new commit. That commit only changes package versions. I removed the temporary worktree afterwards, and repo/ is unchanged.

This reverts def5d94 (#55300), which reverted the OpenTUI 0.6 upgrade.
A fixture plugin draws Markdown with a SyntaxStyle owned by context.renderer.nativeScene and reads a declared padding through the Renderable getters that OpenTUI 0.6.5 adds. The test fails through the plugin crash boundary if either breaks. Share the plugin fixture copy helper with the keymap tests.
Plugins that render <markdown> or <code> build a SyntaxStyle, which needs context.renderer.nativeScene as its owner since OpenTUI 0.6. List the 0.5 calls that changed, and raise the example OpenTUI peer range to the version that OpenCode ships.
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