anomalyco / anomalyco/opencode
tui unit tests are not wired into CI
@kommander is already working on this.
Since Aug 11, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
turbo.json defines test tasks per package and there's no entry for @opencode-ai/tui, so bun turbo test skips the 194 tests in packages/tui. bun turbo test --dry=json lists only five test tasks: opencode, core, app, ui, session-ui.
The v2 branch already has @opencode-ai/tui#test and runs these on both CI legs, so this looks like something that got missed rather than a deliberate exclusion.
Two things fail once you turn them on for Windows.
-
abbreviateHomeinpackages/tui/src/runtime.tsxbuilds its result withpath.sep, so it returns~\projectwhileruntime.test.tsxexpects~/project. Not just a test problem either:feature-plugins/sidebar/footer.tsxsplits that value on/to build the breadcrumb, so on Windows the split never fires and the parent path gets dropped. v2 already fixed this:packages/tui/src/util/path-format.tsreturns"~/" + relative.split(paths.sep).join("/")and picks win32 or posix based on the shape of the input path. -
captureSettledFrameintest/cli/tui/diff-viewer-file-tree.test.tsxpolls five times at 25ms for a non-blank frame, then returns the blank frame anyway, so the test ends up asserting against ten lines of spaces. Fails about one run in three for me. Raising the budget and throwing on exhaustion clears it.waitForFramefrom@opentui/corelooks like the tidier answer but doesn't work here, since it bails as soon as the scheduler reports nothing scheduled and this test renderer only produces frames on an explicitrenderOnce().
Happy to put together a PR for this if it lines up with what you'd want. It splits naturally into the runtime.tsx fix and the CI wiring, so let me know if you'd rather see those separately.
OpenCode version
1.18.16, dev at 3a90639
Steps to reproduce
cd packages/tui && bun teston Windowsruntime.test.tsxfails withExpected "~/project"/Received "~\project"- The
DiffViewerFileTreetests fail intermittently, asserting against a blank frame bun turbo test --dry=jsonfrom the repo root shows no@opencode-ai/tui#testtask, so none of this runs in CI today
Operating System
Windows 11. Also checked on Ubuntu under WSL, where the suite passes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.