Skip to content

Conversation

@anntnzrb
Copy link
Contributor

Summary

Adds a new config option tui.animations (default: true) that allows users to disable spinner animations in the TUI. When disabled, a static [⋯] indicator is shown instead of the animated spinner.

Motivation

Several users have reported issues with the spinner animations:

  1. Visual distraction - The animated spinner is visually intrusive for some users ([FEATURE]: option to make status bar static #6008)
  2. Performance/CPU usage - Animations contribute to high CPU usage, especially on slower machines or when running on battery ([FEATURE]: Disable animations or lower FPS #3990, significant performance regression with text animation #2083, High CPU usage #4804, Heavy CPU Usage and making my M1 mac laggy after updating #4818)
  3. Minimal environments - Users running OpenCode in TTY or minimal terminal environments prefer static indicators

Usage

{
  "tui": {
    "animations": false
  }
}

Design Decisions

Static indicator: [⋯]

The choice of [⋯] as the static indicator is subjective. The reasoning:

  • Brackets provide clear visual boundaries
  • Midline ellipsis () is a standard "loading/waiting" convention
  • Avoided emojis and complex Unicode to ensure consistent rendering across terminals and fonts, including TTY environments

Open to suggestions for a better static indicator if there's a compelling alternative.

Keeping it simple

This PR only addresses enabling/disabling animations. Speed adjustment (mentioned in some issues) is intentionally left out to keep the change focused and minimal.

Related Issues

Changes

  • packages/opencode/src/config/config.ts - Add animations boolean to TUI schema
  • packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx - Conditional spinner/static indicator
  • packages/opencode/src/cli/cmd/tui/component/dialog-session-list.tsx - Conditional spinner/static indicator
  • packages/web/src/content/docs/config.mdx - Documentation
  • packages/sdk/* - Auto-generated types

Adds a new config option `tui.animations` (default: true) that allows
users to disable spinner animations in the TUI. When disabled, a static
`[⋯]` indicator is shown instead.

This helps users who find animations distracting or experience
performance issues on slower machines.

Closes sst#6008, sst#3990
@rekram1-node
Copy link
Collaborator

rekram1-node commented Dec 24, 2025

The performance issues linked are from v0 or from other issues that have mostly been addressed (spinner shouldnt be an issue at this stage)

Are you getting performance issues? Or is this mostly a visual preference for you

@anntnzrb
Copy link
Contributor Author

Mostly a visual preference — I can see how the animated spinner could be distracting for some users, and I empathize with those who reported it as "visually intrusive" (#6008).

That said, even if performance issues have been addressed, having the option to disable animations doesn't hurt. The implementation is minimal and some users in the linked issues explicitly asked for a way to turn off the animation regardless of performance.

Happy to adjust anything if needed.

@rekram1-node
Copy link
Collaborator

Instead of a configuration field, can you make it a toggle in the command palette? (you can persist selection to kv)

Can you also attach screenshot or video of what it looks like

Animations toggle is now accessible via
command palette instead of config file. Setting persists to KV.
@anntnzrb
Copy link
Contributor Author

anntnzrb commented Dec 24, 2025

Updated with the requested changes:

  • Removed tui.animations from config, now uses command palette toggle + KV persistence
  • Toggle available in command palette (within a session) under "Session" category: "Enable/Disable animations"
  • Static indicator [⋯] shown when animations disabled
  • Setting persists and applies globally (Home screen, session list, session view)

Demo: https://streamable.com/h44erj

@rekram1-node rekram1-node changed the title feat: add tui.animations config to disable spinner animations feat: add ability to disable spinner animation Dec 24, 2025
@rekram1-node
Copy link
Collaborator

/review

@rekram1-node
Copy link
Collaborator

I think this is good for now, the [...] is kinda ugly but ig if other people like this we can make it nicer later

- Resolves merge conflict in prompt/index.tsx by adopting dev's <Show> structure
- Removes unused animationsEnabled from Session context type and provider
  (components read directly from KV, making context property dead code)
- Keeps local signal for command palette toggle label
The ternary expression with kv.get() wasn't tracked as a reactive
dependency. Using <Show> ensures the UI updates when animations
setting changes while the dialog is open.
@anntnzrb
Copy link
Contributor Author

Addressed review feedback:

  • Merged dev and resolved conflicts
  • Removed unused animationsEnabled from context (components read directly from KV)
  • Fixed reactivity bug in dialog-session-list.tsx by using <Show> instead of ternary

@rekram1-node
Copy link
Collaborator

/review

@github-actions
Copy link
Contributor

lgtm

@rekram1-node
Copy link
Collaborator

Should be good to go, gonna merge when im active again

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.

[FEATURE]: option to make status bar static [FEATURE]: Disable animations or lower FPS

2 participants