fix(tui/intro): fade welcome on typing and keep it hidden

This commit is contained in:
James Peter
2025-12-13 15:16:50 +10:00
parent b202169516
commit 896ea8861c
2 changed files with 11 additions and 2 deletions
+11
View File
@@ -7345,7 +7345,15 @@ impl ChatWidget<'_> {
}
}
let composer_was_empty = self.bottom_pane.composer_is_empty();
let input_result = self.bottom_pane.handle_key_event(key_event);
let composer_is_empty = self.bottom_pane.composer_is_empty();
if composer_was_empty && !composer_is_empty {
for cell in &self.history_cells {
cell.trigger_fade();
}
self.request_redraw();
}
self.auto_sync_goal_escape_state_from_composer();
match input_result {
@@ -7354,6 +7362,9 @@ impl ChatWidget<'_> {
let cleaned = Self::strip_context_sections(&text);
self.last_user_message = (!cleaned.trim().is_empty()).then_some(cleaned);
if self.auto_state.should_show_goal_entry() {
for cell in &self.history_cells {
cell.trigger_fade();
}
let trimmed = text.trim();
if trimmed.is_empty() {
self.bottom_pane.set_task_running(true);
-2
View File
@@ -108,8 +108,6 @@ impl HistoryCell for AnimatedWelcomeCell {
if variant_changed {
self.variant.set(Some(current_variant));
*self.fade_start.borrow_mut() = None;
self.faded_out.set(false);
// Keep `completed` as-is so the intro animation continues when the
// size adjusts mid-run instead of jumping to the final frame.
} else if previous_variant.is_none() {