-
Notifications
You must be signed in to change notification settings - Fork 3.6k
feat: add ability to disable spinner animation #6084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
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
|
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 |
|
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. |
|
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.
|
Updated with the requested changes:
|
|
/review |
|
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.
|
Addressed review feedback:
|
|
/review |
|
lgtm |
|
Should be good to go, gonna merge when im active again |
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:
Usage
{ "tui": { "animations": false } }Design Decisions
Static indicator:
[⋯]The choice of
[⋯]as the static indicator is subjective. The reasoning:⋯) is a standard "loading/waiting" conventionOpen 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- Addanimationsboolean to TUI schemapackages/opencode/src/cli/cmd/tui/component/prompt/index.tsx- Conditional spinner/static indicatorpackages/opencode/src/cli/cmd/tui/component/dialog-session-list.tsx- Conditional spinner/static indicatorpackages/web/src/content/docs/config.mdx- Documentationpackages/sdk/*- Auto-generated types