Add Astra sparkle effects to the TUI composer (#42842)

## What changed

- Render sparse, fading stars across the composer when using an Astra model in a true-color terminal.
- Preserve composer content, cursor state, effort effects, and terminal colors, and pause the animation while popups are open.
- Add the default-on `tui.whimsy` setting so decorative effects can be disabled independently. Sparkles also respect `tui.animations`.

## Testing

- Cover model and setting eligibility, terminal color handling, protected composer cells, popup behavior, effort effects, and layout stability.

GitOrigin-RevId: fe0471ebef0bca21c44e1d8f731d46959eba0165
This commit is contained in:
Ian MacLeod authored and copyberry committed 2026-09-04 20:18:13 +00:00
1 parent 60888d0868
commit 147137c1f4
13 files changed
+498

No files matched your search

+2
View File
@@ -1256,6 +1256,7 @@ fn config_toml_deserializes_model_availability_nux() {
Tui {
notification_settings: TuiNotificationSettings::default(),
animations: true,
whimsy: true,
show_tooltips: true,
auto_recap: true,
disable_paste_burst: None,
@@ -4269,6 +4270,7 @@ fn tui_config_missing_notifications_field_defaults_to_enabled() {
Tui {
notification_settings: TuiNotificationSettings::default(),
animations: true,
whimsy: true,
show_tooltips: true,
auto_recap: true,
disable_paste_burst: None,
+4
View File
@@ -740,6 +740,9 @@ 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,
/// Show startup tooltips in the TUI welcome screen.
pub show_tooltips: bool,
@@ -4343,6 +4346,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),
show_tooltips: cfg.tui.as_ref().map(|t| t.show_tooltips).unwrap_or(true),
tui_auto_recap: cfg.tui.as_ref().map(|t| t.auto_recap).unwrap_or(/*default*/ true),
model_availability_nux: cfg