All projects

PR Status for OpenCode

A plugin for the OpenCode V2 TUI that adds your open pull requests in the current repository to the sidebar. Each one carries a mark whose shape changes with its CI state, so it reads without relying on color, and stacked PRs appear indented under the first one.

Year
2026
Stack
TypeScript, SolidJS, OpenTUI, GitHub CLI
Cover of PR Status for OpenCode

How it works

The plugin registers itself in the sidebar through the TUI plugin API. When the panel opens it reads your open pull requests and reads them again every 30 seconds while it stays visible, never starting a read before the previous one has finished.

Everything goes through the gh CLI you already have signed in. The plugin stores no tokens and never calls the GitHub API on its own: it runs gh pr list with JSON output and works on that response. If a read fails, the last good list stays on screen and the panel says what happened, whether gh, the session or the network is missing.

Each PR's state sums up all its checks in one mark. A failure outweighs a running check, and the PR only turns green when every check passes.

Publishing it to npm meant compiling Solid's JSX ahead of time and linking it to the copy of Solid that OpenCode already loads. With its own copy, the panel showed up but never repainted.

Next projectStream Overlay Chat