From 64026788f3ad6021bac81fd484abf036b97903d1 Mon Sep 17 00:00:00 2001 From: Ian MacLeod Date: Fri, 20 Nov 2026 01:33:56 +0000 Subject: [PATCH] Hide the warning navigation hint for a single warning (#62642) Show the TUI warning navigation hint only when there are multiple warnings to browse. Update the single-warning snapshots to reflect the shorter footer. GitOrigin-RevId: 8bcea7841d9fd84e037f59a6afa3e4ef2de6f01e --- ...warning_notice_tests__elevated_launch_warning_center.snap | 2 +- ...ne_picker__tests__statusline_discovery_warning_in_f2.snap | 2 +- .../codex_tui__app__warnings_tests__warnings_page.snap | 2 +- codex-rs/tui/src/bottom_pane/warnings_view_render.rs | 5 ++++- ...twidget__tests__app_server__sqlite_log_write_warning.snap | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/codex-rs/tui/src/app/snapshots/codex_tui__app__owned_transcript__warning_notice_tests__elevated_launch_warning_center.snap b/codex-rs/tui/src/app/snapshots/codex_tui__app__owned_transcript__warning_notice_tests__elevated_launch_warning_center.snap index 9ee5c872a2..ffa8e3fd3a 100644 --- a/codex-rs/tui/src/app/snapshots/codex_tui__app__owned_transcript__warning_notice_tests__elevated_launch_warning_center.snap +++ b/codex-rs/tui/src/app/snapshots/codex_tui__app__owned_transcript__warning_notice_tests__elevated_launch_warning_center.snap @@ -25,4 +25,4 @@ expression: screen(&tui) - k keep & next · esc dismiss & close · ⌃o copy · ←/→ warning + k keep & next · esc dismiss & close · ⌃o copy diff --git a/codex-rs/tui/src/app/snapshots/codex_tui__app__statusline_picker__tests__statusline_discovery_warning_in_f2.snap b/codex-rs/tui/src/app/snapshots/codex_tui__app__statusline_picker__tests__statusline_discovery_warning_in_f2.snap index 29ba8256ab..6d837fcdb5 100644 --- a/codex-rs/tui/src/app/snapshots/codex_tui__app__statusline_picker__tests__statusline_discovery_warning_in_f2.snap +++ b/codex-rs/tui/src/app/snapshots/codex_tui__app__statusline_picker__tests__statusline_discovery_warning_in_f2.snap @@ -13,4 +13,4 @@ expression: warning - k keep & next · esc dismiss & close · ⌃o copy · ←/→ warning + k keep & next · esc dismiss & close · ⌃o copy diff --git a/codex-rs/tui/src/app/snapshots/codex_tui__app__warnings_tests__warnings_page.snap b/codex-rs/tui/src/app/snapshots/codex_tui__app__warnings_tests__warnings_page.snap index 3c372260db..1dc25330fb 100644 --- a/codex-rs/tui/src/app/snapshots/codex_tui__app__warnings_tests__warnings_page.snap +++ b/codex-rs/tui/src/app/snapshots/codex_tui__app__warnings_tests__warnings_page.snap @@ -25,4 +25,4 @@ Earlier transcript row 21 - k keep & next · esc dismiss & close · ⌃o copy · ←/→ warning + k keep & next · esc dismiss & close · ⌃o copy diff --git a/codex-rs/tui/src/bottom_pane/warnings_view_render.rs b/codex-rs/tui/src/bottom_pane/warnings_view_render.rs index b49c0ebe62..cf2c98fa7b 100644 --- a/codex-rs/tui/src/bottom_pane/warnings_view_render.rs +++ b/codex-rs/tui/src/bottom_pane/warnings_view_render.rs @@ -107,7 +107,10 @@ impl Renderable for WarningsView { .map(crate::key_hint::ShortcutHint::display_label), "copy", ), - ((!navigation.is_empty()).then_some(navigation), "warning"), + ( + (self.entries.len() > 1 && !navigation.is_empty()).then_some(navigation), + "warning", + ), ( crate::footer_hint::scroll_keys( offset, diff --git a/codex-rs/tui/src/chatwidget/tests/snapshots/codex_tui__chatwidget__tests__app_server__sqlite_log_write_warning.snap b/codex-rs/tui/src/chatwidget/tests/snapshots/codex_tui__chatwidget__tests__app_server__sqlite_log_write_warning.snap index d3e6db91d9..20643a2fd8 100644 --- a/codex-rs/tui/src/chatwidget/tests/snapshots/codex_tui__chatwidget__tests__app_server__sqlite_log_write_warning.snap +++ b/codex-rs/tui/src/chatwidget/tests/snapshots/codex_tui__chatwidget__tests__app_server__sqlite_log_write_warning.snap @@ -13,4 +13,4 @@ expression: "super::helpers::render_bottom_popup(&chat, 80)" - k keep & next · esc dismiss & close · ⌃o copy · ←/→ warning + k keep & next · esc dismiss & close · ⌃o copy