Lightweight coding agent that runs in your terminal
Rust
Hide numeric prefixes on disabled TUI list rows (#15660)
canvrno-oai363b373979e5
diff --git a/codex-rs/tui/src/bottom_pane/list_selection_view.rs b/codex-rs/tui/src/bottom_pane/list_selection_view.rsindex e3b3287131..10e641655b 100644--- a/codex-rs/tui/src/bottom_pane/list_selection_view.rs+++ b/codex-rs/tui/src/bottom_pane/list_selection_view.rs@@ -371,11 +371,14 @@ impl ListSelectionView {""};let name_with_marker = format!("{name}{marker}");+ let is_disabled = item.is_disabled || item.disabled_reason.is_some();let n = visible_idx + 1;let wrap_prefix = if self.is_searchable {// The number keys don't work when search is enabled (since we let the// numbers be used for the search query).format!("{prefix} ")+ } else if is_disabled {+ format!("{prefix} {}", " ".repeat(n.to_string().len() + 2))} else {format!("{prefix} {n}. ")};@@ -388,7 +391,6 @@ impl ListSelectionView {.flatten().or_else(|| item.description.clone());let wrap_indent = description.is_none().then_some(wrap_prefix_width);- let is_disabled = item.is_disabled || item.disabled_reason.is_some();GenericDisplayRow {name: name_with_marker,name_prefix_spans,diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__apps_popup_loading_state.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__apps_popup_loading_state.snapindex e75302e5c2..94d7aab6da 100644--- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__apps_popup_loading_state.snap+++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__apps_popup_loading_state.snap@@ -5,4 +5,4 @@ expression: beforeAppsLoading installed and available apps...-› 1. Loading apps... This updates when the full list is ready.+› Loading apps... This updates when the full list is ready.diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__plugin_detail_popup_installable.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__plugin_detail_popup_installable.snapindex d2461ec72f..671cf4a3c5 100644--- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__plugin_detail_popup_installable.snap+++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__plugin_detail_popup_installable.snap@@ -9,8 +9,8 @@ expression: popup› 1. Back to plugins Return to the plugin list.2. Install plugin Install this plugin now.- 3. Skills design-review, extract-copy- 4. Apps Figma, Slack- 5. MCP Servers figma-mcp, docs-mcp+ Skills design-review, extract-copy+ Apps Figma, Slack+ MCP Servers figma-mcp, docs-mcpPress esc to close.diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__plugins_popup_loading_state.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__plugins_popup_loading_state.snapindex eddb869168..2b0f6837eb 100644--- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__plugins_popup_loading_state.snap+++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__plugins_popup_loading_state.snap@@ -6,4 +6,4 @@ expression: popupLoading available plugins...This first pass shows the ChatGPT marketplace only.-› 1. Loading plugins... This updates when the marketplace list is ready.+› Loading plugins... This updates when the marketplace list is ready.diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__realtime_microphone_picker_popup.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__realtime_microphone_picker_popup.snapindex 3095e6da97..00392bc9d1 100644--- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__realtime_microphone_picker_popup.snap+++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__realtime_microphone_picker_popup.snap@@ -7,7 +7,7 @@ expression: popup1. System default Use your operating systemdefault device.-› 2. Unavailable: Studio Mic (current) (disabled) Configured device is not+› Unavailable: Studio Mic (current) (disabled) Configured device is notcurrently available.(disabled: Reconnect thedevice or choose anotherdiff --git a/codex-rs/tui_app_server/src/bottom_pane/list_selection_view.rs b/codex-rs/tui_app_server/src/bottom_pane/list_selection_view.rsindex e3b3287131..10e641655b 100644--- a/codex-rs/tui_app_server/src/bottom_pane/list_selection_view.rs+++ b/codex-rs/tui_app_server/src/bottom_pane/list_selection_view.rs@@ -371,11 +371,14 @@ impl ListSelectionView {""};let name_with_marker = format!("{name}{marker}");+ let is_disabled = item.is_disabled || item.disabled_reason.is_some();let n = visible_idx + 1;let wrap_prefix = if self.is_searchable {// The number keys don't work when search is enabled (since we let the// numbers be used for the search query).format!("{prefix} ")+ } else if is_disabled {+ format!("{prefix} {}", " ".repeat(n.to_string().len() + 2))} else {format!("{prefix} {n}. ")};@@ -388,7 +391,6 @@ impl ListSelectionView {.flatten().or_else(|| item.description.clone());let wrap_indent = description.is_none().then_some(wrap_prefix_width);- let is_disabled = item.is_disabled || item.disabled_reason.is_some();GenericDisplayRow {name: name_with_marker,name_prefix_spans,diff --git a/codex-rs/tui_app_server/src/chatwidget/snapshots/codex_tui_app_server__chatwidget__tests__apps_popup_loading_state.snap b/codex-rs/tui_app_server/src/chatwidget/snapshots/codex_tui_app_server__chatwidget__tests__apps_popup_loading_state.snapindex 9bc30a7220..b7a3be8884 100644--- a/codex-rs/tui_app_server/src/chatwidget/snapshots/codex_tui_app_server__chatwidget__tests__apps_popup_loading_state.snap+++ b/codex-rs/tui_app_server/src/chatwidget/snapshots/codex_tui_app_server__chatwidget__tests__apps_popup_loading_state.snap@@ -5,4 +5,4 @@ expression: beforeAppsLoading installed and available apps...-› 1. Loading apps... This updates when the full list is ready.+› Loading apps... This updates when the full list is ready.diff --git a/codex-rs/tui_app_server/src/chatwidget/snapshots/codex_tui_app_server__chatwidget__tests__plugin_detail_popup_installable.snap b/codex-rs/tui_app_server/src/chatwidget/snapshots/codex_tui_app_server__chatwidget__tests__plugin_detail_popup_installable.snapindex fe88135b86..0d534d85cc 100644--- a/codex-rs/tui_app_server/src/chatwidget/snapshots/codex_tui_app_server__chatwidget__tests__plugin_detail_popup_installable.snap+++ b/codex-rs/tui_app_server/src/chatwidget/snapshots/codex_tui_app_server__chatwidget__tests__plugin_detail_popup_installable.snap@@ -9,8 +9,8 @@ expression: popup› 1. Back to plugins Return to the plugin list.2. Install plugin Install this plugin now.- 3. Skills design-review, extract-copy- 4. Apps Figma, Slack- 5. MCP Servers figma-mcp, docs-mcp+ Skills design-review, extract-copy+ Apps Figma, Slack+ MCP Servers figma-mcp, docs-mcpPress esc to close.diff --git a/codex-rs/tui_app_server/src/chatwidget/snapshots/codex_tui_app_server__chatwidget__tests__plugins_popup_loading_state.snap b/codex-rs/tui_app_server/src/chatwidget/snapshots/codex_tui_app_server__chatwidget__tests__plugins_popup_loading_state.snapindex 741c813fb1..f1f18c1eaf 100644--- a/codex-rs/tui_app_server/src/chatwidget/snapshots/codex_tui_app_server__chatwidget__tests__plugins_popup_loading_state.snap+++ b/codex-rs/tui_app_server/src/chatwidget/snapshots/codex_tui_app_server__chatwidget__tests__plugins_popup_loading_state.snap@@ -6,4 +6,4 @@ expression: popupLoading available plugins...This first pass shows the ChatGPT marketplace only.-› 1. Loading plugins... This updates when the marketplace list is ready.+› Loading plugins... This updates when the marketplace list is ready.diff --git a/codex-rs/tui_app_server/src/chatwidget/snapshots/codex_tui_app_server__chatwidget__tests__realtime_microphone_picker_popup.snap b/codex-rs/tui_app_server/src/chatwidget/snapshots/codex_tui_app_server__chatwidget__tests__realtime_microphone_picker_popup.snapindex 8eadefc63a..93f64ad316 100644--- a/codex-rs/tui_app_server/src/chatwidget/snapshots/codex_tui_app_server__chatwidget__tests__realtime_microphone_picker_popup.snap+++ b/codex-rs/tui_app_server/src/chatwidget/snapshots/codex_tui_app_server__chatwidget__tests__realtime_microphone_picker_popup.snap@@ -7,7 +7,7 @@ expression: popup1. System default Use your operating systemdefault device.-› 2. Unavailable: Studio Mic (current) (disabled) Configured device is not+› Unavailable: Studio Mic (current) (disabled) Configured device is notcurrently available.(disabled: Reconnect thedevice or choose another