Skip to content

fix(tui): skip initial theme probe in tmux#32523

Open
wgu9 wants to merge 2 commits into
anomalyco:devfrom
wgu9:tmux-theme-skip
Open

fix(tui): skip initial theme probe in tmux#32523
wgu9 wants to merge 2 commits into
anomalyco:devfrom
wgu9:tmux-theme-skip

Conversation

@wgu9

@wgu9 wgu9 commented Jun 16, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #24475

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Avoids the blocking initial waitForThemeMode(1000) call when OpenCode starts inside tmux or screen-style multiplexers. Those environments can lose or delay OSC theme replies, which leaves startup waiting for the full timeout before the first draw.

The direct-terminal path still waits for the renderer theme mode once and falls back to dark if no response arrives. The multiplexer path uses dark immediately so the TUI can render without waiting on OSC replies.

How did you verify your code works?

  • bun test test/util/theme-mode.test.ts from packages/tui
  • bun typecheck from packages/tui
  • bunx oxlint packages/tui/src/app.tsx packages/tui/src/util/theme-mode.ts packages/tui/test/util/theme-mode.test.ts from repo root (existing warnings only in app.tsx)
  • git diff --check
  • pre-push bun turbo typecheck

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Related PR Found:

The current PR (32523) is specifically focused on skipping the theme probe in tmux/screen multiplexers to avoid startup delays, while PR #31947 handles SSH-specific terminal capability detection. These are related but distinct fixes for different terminal environments.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TUI hangs in tmux after opentui 0.1.103 upgrade (theme detection)

1 participant