Add independent controls for TUI visual effects (#46832)

## What changed

Replace `tui.whimsy` with `[tui.effects]` preferences for `starfield`, `shimmer`, `welcome`, `effort`, `progress`, and `title`. Each defaults to `true` and remains subordinate to the `tui.animations` master switch.

Wire the preferences into composer effects, welcome artwork, status and loading text, progress indicators, and terminal-title animations. For example, disable shimmering text while keeping progress animations:

```toml
[tui.effects]
shimmer = false
```

Keep retired `tui.whimsy` entries loadable but ignore their value. Update the configuration schema to expose the new preferences.

## Testing

Add and extend coverage for independent shimmer and progress effects, master-switch precedence, welcome and starfield controls, terminal-title blinking, and strict configuration loading with the retired setting.

GitOrigin-RevId: 28b37ba52872133b8954543cabe9ff424147f1c5
This commit is contained in:
Eric Traut
2026-09-20 16:16:46 +00:00
committed by copyberry
parent 5c5308fc9a
commit bba48e5ce8
41 changed files with 341 additions and 71 deletions
+53 -5
View File
@@ -4210,6 +4210,22 @@
"description": "When true, disables burst-paste detection for typed input entirely. All characters are inserted as they are received, and no buffering or placeholder replacement will occur for fast keypress bursts. Overrides the legacy top-level `disable_paste_burst` setting. Defaults to `false`.",
"type": "boolean"
},
"effects": {
"allOf": [
{
"$ref": "#/definitions/TuiEffects"
}
],
"default": {
"effort": true,
"progress": true,
"shimmer": true,
"starfield": true,
"title": true,
"welcome": true
},
"description": "Individual visual effects. Each also requires animations to be enabled."
},
"keymap": {
"allOf": [
{
@@ -4527,11 +4543,6 @@
"default": false,
"description": "Start the composer in Vim mode (`Normal`) by default. Defaults to `false`.",
"type": "boolean"
},
"whimsy": {
"default": true,
"description": "Enable decorative effects such as Astra composer stars. Also requires animations. Defaults to `true`.",
"type": "boolean"
}
},
"type": "object"
@@ -4971,6 +4982,43 @@
},
"type": "object"
},
"TuiEffects": {
"additionalProperties": false,
"description": "Optional visual effects. Disabling an effect preserves its underlying activity.",
"properties": {
"effort": {
"default": true,
"description": "Animate reasoning-effort changes in the composer and footer.",
"type": "boolean"
},
"progress": {
"default": true,
"description": "Animate activity bullets and loading spinners.",
"type": "boolean"
},
"shimmer": {
"default": true,
"description": "Shimmer status and loading text.",
"type": "boolean"
},
"starfield": {
"default": true,
"description": "Animate the composer starfield.",
"type": "boolean"
},
"title": {
"default": true,
"description": "Blink the terminal-title indicator when user action is required.",
"type": "boolean"
},
"welcome": {
"default": true,
"description": "Animate the welcome artwork.",
"type": "boolean"
}
},
"type": "object"
},
"TuiGlobalKeymap": {
"additionalProperties": false,
"description": "Global keybindings. These are used when a context does not define an override.",
+2 -2
View File
@@ -1253,7 +1253,7 @@ fn config_toml_deserializes_model_availability_nux() {
notification_settings: TuiNotificationSettings::default(),
animations: true,
screen_reader_detection_done: None,
whimsy: true,
effects: Default::default(),
show_tooltips: true,
show_server_version_notice: true,
auto_recap: true,
@@ -4380,7 +4380,7 @@ fn tui_config_missing_notifications_field_defaults_to_enabled() {
notification_settings: TuiNotificationSettings::default(),
animations: true,
screen_reader_detection_done: None,
whimsy: true,
effects: Default::default(),
show_tooltips: true,
show_server_version_notice: true,
auto_recap: true,
+3 -3
View File
@@ -748,8 +748,8 @@ pub struct Config {
/// Enable ASCII animations and shimmer effects in the TUI.
pub animations: bool,
/// Enable decorative TUI effects such as Astra composer stars.
pub tui_whimsy: bool,
/// Individual TUI effects, subordinate to the animation master switch.
pub tui_effects: codex_config::types::TuiEffects,
/// Show startup tooltips in the TUI welcome screen.
pub show_tooltips: bool,
@@ -4382,7 +4382,7 @@ impl Config {
.map(|t| t.notification_settings.clone())
.unwrap_or_default(),
animations: cfg.tui.as_ref().map(|t| t.animations).unwrap_or(true),
tui_whimsy: cfg.tui.as_ref().map(|t| t.whimsy).unwrap_or(true),
tui_effects: cfg.tui.as_ref().map(|t| t.effects).unwrap_or_default(),
show_tooltips: cfg.tui.as_ref().map(|t| t.show_tooltips).unwrap_or(true),
tui_show_server_version_notice: cfg
.tui