Skip to content

bug: typecheck fails on dev — waitForThemeMode does not exist on CliRenderer #23504

Closed

Description

@shizhigu

Bug

bun typecheck fails on dev (HEAD at 7a568a4) with:

src/cli/cmd/tui/app.tsx(132,34): error TS2339:
  Property 'waitForThemeMode' does not exist on type 'CliRenderer'.

The line is:

const mode = (await renderer.waitForThemeMode(1000)) ?? "dark"

@opentui/[email protected] (the version pinned in the workspace catalog) only exposes a synchronous themeMode getter on CliRenderer — there is no waitForThemeMode method.

Steps to reproduce

git checkout dev
bun install
bun typecheck

→ opencode#typecheck exits with the error above. The pre-push hook also blocks any push from a clean branch off dev.

Suspected cause

The line was likely written against an unreleased opentui API. Either opentui was supposed to be bumped alongside this commit, or the call site needs to fall back to the sync getter that is available today.

Suggested fix

Use the sync getter — the ?? "dark" fallback already handles the null case:

const mode = renderer.themeMode ?? "dark"

This restores typecheck and is a minimal, behavior-preserving change (the original waitForThemeMode(1000) was only ever waiting briefly for terminal background detection; if it hasn't completed the fallback fires anyway).

Happy to PR this.

opencode version

local install of dev HEAD 7a568a457

Operating System

macOS 25.3.0

Terminal

n/a (typecheck failure, no terminal interaction needed to reproduce)

Activity

  1. added a commit that references this issue on Apr 20, 2026
    ae1a397
  2. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

opentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions