aKode: niente logo centrale nelle sessioni (solo intestazione); il logo resta nel primo avvio, riattivabile con [tui.effects] welcome = true

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-11 14:13:35 +01:00
parent 85dc979c55
commit ac3f65985d
5 changed files with 77 additions and 7 deletions

View File

@@ -13,7 +13,8 @@ pub struct TuiEffects {
pub starfield: bool,
/// Shimmer status and loading text.
pub shimmer: bool,
/// Animate the welcome artwork.
/// Show the welcome artwork (ghost + AKODE) in an empty session. aKode: off by default,
/// the session header already shows the name; the first-run setup always shows it.
pub welcome: bool,
/// Animate reasoning-effort changes in the composer and footer.
pub effort: bool,
@@ -28,7 +29,7 @@ impl Default for TuiEffects {
Self {
starfield: true,
shimmer: true,
welcome: true,
welcome: false,
effort: true,
progress: true,
title: true,

View File

@@ -4978,7 +4978,7 @@
"shimmer": true,
"starfield": true,
"title": true,
"welcome": true
"welcome": false
},
"description": "Individual visual effects. Each also requires animations to be enabled."
},
@@ -5870,8 +5870,8 @@
"type": "boolean"
},
"welcome": {
"default": true,
"description": "Animate the welcome artwork.",
"default": false,
"description": "Show the welcome artwork (ghost + AKODE) in an empty session. aKode: off by default, the session header already shows the name; the first-run setup always shows it.",
"type": "boolean"
}
},

View File

@@ -38,6 +38,8 @@ fn draw(app: &mut App, tui: &mut tui::Tui, size: Size) -> Result<Rect> {
#[tokio::test]
async fn fresh_logo_returns_only_to_the_ordinary_composer() -> Result<()> {
let mut app = crate::app::test_support::make_test_app().await;
// aKode: the in-session splash is opt-in.
app.local_settings.tui.effects.welcome = true;
app.local_settings.tui.animations = true;
let size = Size::new(/*width*/ 120, /*height*/ 44);
let mut tui = crate::tui::test_support::make_test_tui()?;
@@ -88,6 +90,8 @@ async fn fresh_logo_returns_only_to_the_ordinary_composer() -> Result<()> {
#[tokio::test]
async fn non_startup_history_dismisses_logo_until_a_new_thread() -> Result<()> {
let mut app = crate::app::test_support::make_test_app().await;
// aKode: the in-session splash is opt-in.
app.local_settings.tui.effects.welcome = true;
app.local_settings.tui.animations = true;
// Leave room for the full release-note card above the centered logo.
let size = Size::new(/*width*/ 120, /*height*/ 64);
@@ -158,6 +162,8 @@ async fn non_startup_history_dismisses_logo_until_a_new_thread() -> Result<()> {
#[tokio::test]
async fn empty_state_animation_preserves_header_cursor_and_footer() -> Result<()> {
let mut app = crate::app::test_support::make_test_app().await;
// aKode: the in-session splash is opt-in.
app.local_settings.tui.effects.welcome = true;
app.local_settings.tui.animations = true;
let size = Size::new(/*width*/ 120, /*height*/ 44);
let mut tui = crate::tui::test_support::make_test_tui()?;
@@ -229,6 +235,8 @@ async fn empty_state_animation_preserves_header_cursor_and_footer() -> Result<()
#[tokio::test]
async fn submitting_a_draft_dismisses_logo_even_after_clear() -> Result<()> {
let (mut app, _events, _ops) = crate::app::tests::make_test_app_with_channels().await;
// aKode: the in-session splash is opt-in.
app.local_settings.tui.effects.welcome = true;
app.local_settings.tui.animations = true;
let size = Size::new(/*width*/ 120, /*height*/ 44);
let mut tui = crate::tui::test_support::make_test_tui()?;
@@ -273,6 +281,8 @@ async fn empty_state_animation_survives_plain_transcript_clicks() -> Result<()>
use crossterm::event::MouseEventKind;
let mut app = crate::app::test_support::make_test_app().await;
// aKode: the in-session splash is opt-in.
app.local_settings.tui.effects.welcome = true;
app.local_settings.tui.animations = true;
let size = Size::new(/*width*/ 120, /*height*/ 44);
let mut tui = crate::tui::test_support::make_test_tui()?;

View File

@@ -37,3 +37,60 @@
{"run_id":"1794396553-913336000","line":5563,"new":null,"old":null}
{"run_id":"1794396553-913336000","line":5948,"new":null,"old":null}
{"run_id":"1794396553-913336000","line":5902,"new":null,"old":null}
{"run_id":"1794402291-517650000","line":406,"new":null,"old":null}
{"run_id":"1794402291-517650000","line":427,"new":null,"old":null}
{"run_id":"1794402291-517650000","line":446,"new":null,"old":null}
{"run_id":"1794402291-517650000","line":468,"new":null,"old":null}
{"run_id":"1794402291-517650000","line":4851,"new":null,"old":null}
{"run_id":"1794402291-517650000","line":4947,"new":null,"old":null}
{"run_id":"1794402291-517650000","line":4949,"new":null,"old":null}
{"run_id":"1794402291-517650000","line":4990,"new":null,"old":null}
{"run_id":"1794402291-517650000","line":4990,"new":null,"old":null}
{"run_id":"1794402291-517650000","line":5285,"new":null,"old":null}
{"run_id":"1794402291-517650000","line":4330,"new":null,"old":null}
{"run_id":"1794402291-517650000","line":5062,"new":null,"old":null}
{"run_id":"1794402291-517650000","line":5902,"new":null,"old":null}
{"run_id":"1794402291-517650000","line":5948,"new":null,"old":null}
{"run_id":"1794402291-517650000","line":3067,"new":null,"old":null}
{"run_id":"1794402291-517650000","line":5485,"new":null,"old":null}
{"run_id":"1794402291-517650000","line":5563,"new":null,"old":null}
{"run_id":"1794402291-517650000","line":5948,"new":null,"old":null}
{"run_id":"1794402291-517650000","line":5902,"new":null,"old":null}
{"run_id":"1794402380-738038000","line":406,"new":null,"old":null}
{"run_id":"1794402380-738038000","line":427,"new":null,"old":null}
{"run_id":"1794402380-738038000","line":446,"new":null,"old":null}
{"run_id":"1794402380-738038000","line":468,"new":null,"old":null}
{"run_id":"1794402380-738038000","line":4851,"new":null,"old":null}
{"run_id":"1794402380-738038000","line":4947,"new":null,"old":null}
{"run_id":"1794402380-738038000","line":4949,"new":null,"old":null}
{"run_id":"1794402380-738038000","line":4990,"new":null,"old":null}
{"run_id":"1794402380-738038000","line":4990,"new":null,"old":null}
{"run_id":"1794402380-738038000","line":5285,"new":null,"old":null}
{"run_id":"1794402380-738038000","line":5062,"new":null,"old":null}
{"run_id":"1794402380-738038000","line":4330,"new":null,"old":null}
{"run_id":"1794402380-738038000","line":5902,"new":null,"old":null}
{"run_id":"1794402380-738038000","line":5948,"new":null,"old":null}
{"run_id":"1794402380-738038000","line":3067,"new":null,"old":null}
{"run_id":"1794402380-738038000","line":5485,"new":null,"old":null}
{"run_id":"1794402380-738038000","line":5563,"new":null,"old":null}
{"run_id":"1794402380-738038000","line":5948,"new":null,"old":null}
{"run_id":"1794402380-738038000","line":5902,"new":null,"old":null}
{"run_id":"1794402553-134594000","line":406,"new":null,"old":null}
{"run_id":"1794402553-134594000","line":427,"new":null,"old":null}
{"run_id":"1794402553-134594000","line":446,"new":null,"old":null}
{"run_id":"1794402553-134594000","line":468,"new":null,"old":null}
{"run_id":"1794402553-134594000","line":4851,"new":null,"old":null}
{"run_id":"1794402553-134594000","line":4947,"new":null,"old":null}
{"run_id":"1794402553-134594000","line":4949,"new":null,"old":null}
{"run_id":"1794402553-134594000","line":4990,"new":null,"old":null}
{"run_id":"1794402553-134594000","line":4990,"new":null,"old":null}
{"run_id":"1794402553-134594000","line":5285,"new":null,"old":null}
{"run_id":"1794402553-134594000","line":4330,"new":null,"old":null}
{"run_id":"1794402553-134594000","line":5062,"new":null,"old":null}
{"run_id":"1794402553-134594000","line":5902,"new":null,"old":null}
{"run_id":"1794402553-134594000","line":5948,"new":null,"old":null}
{"run_id":"1794402553-134594000","line":3067,"new":null,"old":null}
{"run_id":"1794402553-134594000","line":5485,"new":null,"old":null}
{"run_id":"1794402553-134594000","line":5563,"new":null,"old":null}
{"run_id":"1794402553-134594000","line":5948,"new":null,"old":null}
{"run_id":"1794402553-134594000","line":5902,"new":null,"old":null}

View File

@@ -85,8 +85,10 @@ async fn configured_welcome_opt_out_disables_splash() -> anyhow::Result<()> {
/*x*/ 0, /*y*/ 0, /*width*/ 80, /*height*/ 44,
);
for (settings, enabled) in [
("", true),
("[tui]\nanimations = false\n", false),
// aKode: the splash is opt-in (`[tui.effects] welcome = true`).
("", false),
("[tui.effects]\nwelcome = true\n", true),
("[tui]\nanimations = false\n[tui.effects]\nwelcome = true\n", false),
("[tui.effects]\nwelcome = false\n", false),
(
"[tui]\nanimations = false\n[tui.effects]\nwelcome = false\n",