codex: address PR review feedback (#16827)

This commit is contained in:
Eric Traut
2026-04-04 20:48:41 -07:00
parent 64c2dc5f58
commit 2c895c16c9
3 changed files with 0 additions and 51 deletions

View File

@@ -1147,26 +1147,6 @@ mod tests {
assert_eq!(found, url, "OSC 8 hyperlink should cover the full URL");
}
#[test]
fn continue_in_browser_skips_shimmer_when_animations_are_suppressed() {
let runtime = tokio::runtime::Runtime::new().unwrap();
let (mut widget, _tmp) = runtime.block_on(widget_forced_chatgpt());
let (request_frame, mut scheduled_frames) = FrameRequester::test_spy();
widget.request_frame = request_frame;
widget.animations_suppressed.set(true);
*widget.sign_in_state.write().unwrap() =
SignInState::ChatGptContinueInBrowser(ContinueInBrowserState {
login_id: "login-1".to_string(),
auth_url: "https://auth.example.com/login?state=abc123".to_string(),
});
let area = Rect::new(0, 0, 50, 12);
let mut buf = Buffer::empty(area);
widget.render_continue_in_browser(area, &mut buf);
assert!(scheduled_frames.try_recv().is_err());
}
#[test]
fn auth_widget_suppresses_animations_when_device_code_is_visible() {
let runtime = tokio::runtime::Runtime::new().unwrap();

View File

@@ -360,24 +360,4 @@ mod tests {
));
assert_eq!(*error.read().unwrap(), None);
}
#[test]
fn render_device_code_login_skips_shimmer_when_animations_are_suppressed() {
let runtime = tokio::runtime::Runtime::new().unwrap();
let (mut widget, _tmp) = runtime.block_on(auth_widget_for_render());
let (request_frame, mut scheduled_frames) = crate::tui::FrameRequester::test_spy();
widget.request_frame = request_frame;
let state = ContinueWithDeviceCodeState::ready(
"request-1".to_string(),
"login-1".to_string(),
"https://chatgpt.com/device".to_string(),
"ABCD-EFGH".to_string(),
);
let area = Rect::new(0, 0, 60, 12);
let mut buf = Buffer::empty(area);
render_device_code_login(&widget, area, &mut buf, &state);
assert!(scheduled_frames.try_recv().is_err());
}
}

View File

@@ -65,17 +65,6 @@ impl FrameRequester {
frame_schedule_tx: tx,
}
}
/// Create a requester that exposes scheduled frame deadlines for assertions.
pub(crate) fn test_spy() -> (Self, mpsc::UnboundedReceiver<Instant>) {
let (tx, rx) = mpsc::unbounded_channel();
(
FrameRequester {
frame_schedule_tx: tx,
},
rx,
)
}
}
/// A scheduler for coalescing frame draw requests and notifying the TUI event loop.