From ddd09a9368b7c0fae99c8475fed43c149b6c4821 Mon Sep 17 00:00:00 2001 From: jif-oai Date: Thu, 5 Feb 2026 19:57:57 +0000 Subject: [PATCH] fix: announcement in prio (#10783) --- codex-rs/tui/src/tooltips.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/codex-rs/tui/src/tooltips.rs b/codex-rs/tui/src/tooltips.rs index b62831e7e..7365c1649 100644 --- a/codex-rs/tui/src/tooltips.rs +++ b/codex-rs/tui/src/tooltips.rs @@ -39,6 +39,10 @@ fn experimental_tooltips() -> Vec<&'static str> { pub(crate) fn get_tooltip(plan: Option) -> Option { let mut rng = rand::rng(); + if let Some(announcement) = announcement::fetch_announcement_tip() { + return Some(announcement); + } + // Leave small chance for a random tooltip to be shown. if rng.random_ratio(8, 10) { match plan { @@ -56,10 +60,6 @@ pub(crate) fn get_tooltip(plan: Option) -> Option { } } - if let Some(announcement) = announcement::fetch_announcement_tip() { - return Some(announcement); - } - pick_tooltip(&mut rng).map(str::to_string) }