mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Fade Astra composer stars and stabilize cursor redraws (#44879)
## What changed - Fade Astra stars over one second after 15 seconds from the first visible frame, or quickly on composer input, drafts, voice input, and popups. Disconnected key handling also dismisses the animation. - Preserve placeholder and draft text, including spaces. Stop scheduling animation frames when unfocused or finished, while allowing the idle deadline to elapse without terminal focus. - Hide the terminal cursor before repainting and cache its style to avoid redundant anchor repairs. Invalidate cursor state after screen transitions, external programs, resume, and caught-panic recovery. ## Testing Add regression tests and snapshots for fade timing, input dismissal, focus changes, text preservation, and frame scheduling. Add cursor redraw tests and a PTY test for cursor visibility and shape restoration after a caught panic. Update the reconnect test to wait until both the draft and notification are visible. GitOrigin-RevId: 0c9aaa13e6bde820f88e3757457063680d7921a3
This commit is contained in:
1 parent
7b491281c8
commit
33bdf976cc
20 files changed
+1097
-63
No files matched your search
@@ -464,6 +464,10 @@ impl ChatWidget {
|
||||
)
|
||||
}
|
||||
|
||||
pub(crate) fn set_sparkle_terminal_focus(&mut self, focused: bool) {
|
||||
self.bottom_pane.set_sparkle_terminal_focus(focused);
|
||||
}
|
||||
|
||||
pub(super) fn refresh_model_display(&mut self) {
|
||||
let effective = self.effective_collaboration_mode();
|
||||
self.session_header.set_model(effective.model());
|
||||
|
||||
@@ -11,6 +11,31 @@ use ratatui::Terminal;
|
||||
use ratatui::backend::TestBackend;
|
||||
use serial_test::serial;
|
||||
|
||||
#[tokio::test]
|
||||
async fn astra_sparkle_pauses_and_resumes_with_terminal_focus() {
|
||||
let (mut chat, _rx, _ops) = make_chatwidget_manual(Some("gpt-5.6-sol")).await;
|
||||
chat.local_settings.tui.animations = true;
|
||||
chat.local_settings.tui.whimsy = true;
|
||||
chat.set_model("gpt-6-astra");
|
||||
crate::terminal_palette::with_test_default_colors(
|
||||
crate::terminal_probe::DefaultColors {
|
||||
fg: (230, 216, 255),
|
||||
bg: (36, 27, 53),
|
||||
},
|
||||
|| {
|
||||
let contains_stars = |text: &str| text.chars().any(|ch| "⠁⠂⠄⠈⠐⠠⡀⢀".contains(ch));
|
||||
chat.set_sparkle_terminal_focus(/*focused*/ false);
|
||||
assert!(!contains_stars(&render_bottom_popup(
|
||||
&chat, /*width*/ 80
|
||||
)));
|
||||
chat.set_sparkle_terminal_focus(/*focused*/ true);
|
||||
assert!(contains_stars(&render_bottom_popup(
|
||||
&chat, /*width*/ 80
|
||||
)));
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn voice_live_transcript_renders_beside_the_streamed_cell() {
|
||||
let (mut chat, _rx, _ops) = make_chatwidget_manual(/*model_override*/ None).await;
|
||||
|
||||
Reference in new issue
Block a user