Skip to content

TUI plugins installed from github:/git/npm specs never re-render #56110

Closed as duplicate

Description

@dskanakoglou

Description

Hello, I am a researcher from DTU Denmark. I am using opencode for a workshop and I ran into a bug whilst creating some plugins.

A TUI plugin installed from a github:, git+… or npm spec draws once and never updates. The same plugin loaded from a folder (a path in plugins, or .opencode/plugins/<name>/) updates normally.

Package plugins are installed to <cache>/opencode/npm/git-<name>-<hash>/<n>/node_modules/<pkg>/. The bundled bun-plugin-solid only transforms sources that match /^(?!.*[/\\]node_modules[/\\]).*\.[cm]?[jt]sx(?:[?#].*)?$/, so the plugin's tui.tsx never gets the Solid transform. Loading the same folder by path from any directory named node_modules freezes it too, so the trigger is the path, not the cache.

I have a small fix with a test (in packages/tui/src/plugin/runtime-plugin-support.bun.ts) and would like to open a PR for it, if that's welcome.

Plugins

Minimal repro below; also seen with opencode-sidebar-plus and opencode-notebook

OpenCode version

2.0.29 and 2.0.31

Steps to reproduce

  1. Make a folder tick/ with a package.json that exports "./server": "./server.ts" and "./tui": "./tui.tsx", an empty server plugin in server.ts, and this tui.tsx:
/** @jsxImportSource @opentui/solid */
import { createSignal, onCleanup } from "solid-js"
import type { Plugin } from "@opencode/plugin/tui"

const plugin: Plugin.Definition = {
  id: "tick",
  setup(ctx) {
    ctx.ui.slot({
      append: "home.footer.status",
      render: () => {
        const [n, setN] = createSignal(0)
        const timer = setInterval(() => setN(n() + 1), 500)
        onCleanup(() => clearInterval(timer))
        return <text>TICK {n()}</text>
      },
    })
  },
}
export default plugin
  1. git init -b main && git add -A && git commit -m tick in tick/.
  2. In another project, set "plugins": ["git+file:///abs/path/tick#main"] and start opencode. The start screen shows TICK 0 and never changes.
  3. Change it to "plugins": ["/abs/path/tick"] and restart. The counter goes up.

Screenshot and/or share link

No response

Operating System

macOS 27.0.1

Terminal

iTerm2

Activity

  1. opencode-agent commented on Oct 16, 2026

    @opencode-agent
    Contributor

    Thanks for the clear repro and for tracking down the node_modules exclusion in the Solid transform!

    I think this is a duplicate of #39986. That issue covers TUI plugins loaded from outside OpenCode that render once and never update because the Solid transform isn't applied, and it calls out that OpenTUI's transform skips JSX under node_modules. It also has v2 data points for plugins installed from npm and github: into ~/.cache/opencode/npm/.../node_modules/.

    Possible duplicates and related issues, ordered from most to least likely:

    If you want to contribute your fix, please first post your repro and the approach on #39986. That issue lists the conditions a fix has to meet and approaches that were already rejected (PR #39983), so it's worth checking against those.

    The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.

  2. dskanakoglou commented on Oct 16, 2026

    @dskanakoglou
    Author

    Closing as a duplicate of #39986; I've posted the repro and fix approach there.

  3. opencode-agent commented on Oct 16, 2026

    @opencode-agent
    Contributor

    Thanks for moving your repro and fix approach over to #39986. That keeps the discussion and any fix in one place. This issue will be closed as a duplicate of #39986.

  4. opencode-agent commented on Oct 17, 2026

    @opencode-agent
    Contributor

    Closing this as a duplicate of #39986, as agreed above. Thanks again for the clear repro and for tracking down the node_modules exclusion in the Solid transform. Your notes are now on #39986, so please follow that issue for updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions