Skip to content

feat: add status light indicator for TUI and Web UI#30273

Closed
niushuai1991 wants to merge 3 commits into
anomalyco:devfrom
niushuai1991:feat/static_light
Closed

feat: add status light indicator for TUI and Web UI#30273
niushuai1991 wants to merge 3 commits into
anomalyco:devfrom
niushuai1991:feat/static_light

Conversation

@niushuai1991
Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #30272

Type of change

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

What does this PR do?

Adds a configurable status light indicator in the terminal title bar and Web UI session tabs that reflects the current opencode state:

  • 🟢 Green: idle, waiting for user input, or pending permission/question
  • 🟡 Yellow: thinking (no active tool or text output yet)
  • 🔴 Red: running tools or LLM is generating text

Configuration: status_light: boolean at top-level config (global or project-level).

{ "status_light": true }

The indicator is prepended to the existing terminal title (e.g. 🟢 OC | My Session). In Web UI, a colored dot is shown before the tab title text.

Permission required and question asked states are correctly shown as green (waiting for user), avoiding false "busy" indication.

How did you verify your code works?

  • bun typecheck passes across all 27 packages
  • bun run build succeeds for all platforms
  • Manual testing with status_light: true in global config

Screenshots / recordings

N/A — terminal title bar change is not visible in screenshots. Web UI tab dot can be verified visually.

Checklist

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

If you do not follow this template your PR will be automatically rejected.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

Hey! Your PR title Feat/static light doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@niushuai1991 niushuai1991 changed the title Feat/static light feat: add status light indicator for TUI and Web UI Jun 1, 2026
- Add computeStatusLight() in @opencode-ai/core/session/status-light
- Refactor TUI trafficLight memo to use shared function
- Add status light dot to Web UI session tabs (V2 titlebar)
  - Shows colored dot when config.status_light is enabled
  - Falls back to title text when disabled
@niushuai1991 niushuai1991 deleted the feat/static_light branch June 2, 2026 09:23
@niushuai1991 niushuai1991 restored the feat/static_light branch June 2, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add status light indicator for opencode state

1 participant