Skip to content

The transform fix

Latest

Choose a tag to compare

@ali5ter ali5ter released this 24 Nov 02:33
· 5 commits to main since this release

Silent breakage from the package install path

0.3.1 regressed for every package install (npm or git): the panel was stuck on
"no captured requests yet" permanently, and the prompt-footer context gauge
never rendered on fresh sessions. Capture and the server side were healthy
throughout; only the TUI was broken (reported 2026-11-23 from the Studio and
the iMac).

OpenCode applies the solid reactivity transform at load time, but its source
filter skips everything under node_modules — and an installed package lives in
one, inside the npm cache. Our uncompiled src/tui.tsx fell through to bun's
default JSX compilation, which passes props as values; solid's Show/For treat a
non-function when as a static value, sampled once at creation and never
tracked. The panel's gate is created before the records RPC resolves, so it
latches on "empty" and never updates. (The footer gauge rendered only when its
creation happened to sample true. Pre-0.3.1 verification ran from paths the
transform does cover, which is why this shipped.)

  • Ships a pre-compiled dist/ — built with the exact transform function the host
    calls (universal output: getter props, no JSX left in the file) — with the
    package exports pointed at it.
  • Adds a TransformCanary load-time tripwire: if the transform is ever missing,
    the plugin logs a console error and shows a visible warning in the panel and
    footer, so this failure class can never be silent again.

Upgrading from 0.3.1:

opencode plugin update opencode-what-context

plugin update re-resolves latest from the registry, so this is normally
all that is needed — restart OpenCode afterwards to load the new build. One
caveat: for a few minutes after a publish, npm is still processing it (the
202 being processed window), and an update run inside that window resolves
the old version and reports "No plugin updates available" — wait a couple of
minutes and re-run. If you would rather not wait, clear the install cache and
restart:

rm -rf ~/.cache/opencode/npm/opencode-what-context@latest