mirror of
https://github.com/openai/codex.git
synced 2026-11-20 07:06:24 +00:00
Condense TUI startup warnings (#42609)
## What changed - Coalesce configuration, skill, sandbox, and MCP startup diagnostics into a single summary below the session header, including MCP and sign-in counts. - Keep the complete warning text in the transcript and update the summary's transcript shortcut when key bindings change. - Continue rendering warnings that arrive after work begins as inline history entries. - Hide the MCP startup status row before a turn while preserving the configured interrupt shortcut. ## Testing - Add coverage for warning ordering and deduplication, transcript details, MCP sign-in counts, resumed sessions, runtime warnings, reflow, backtracking, and interruption without a visible status row. GitOrigin-RevId: 009657cf04f1d3a52270cf096eebf9db7513c040
This commit is contained in:
1 parent
ed391d4dd2
commit
32c303c197
31 files changed
+728
-69
No files matched your search
@@ -40,6 +40,8 @@ mod safety_buffering;
|
||||
mod session_lifecycle_requests;
|
||||
mod session_summary;
|
||||
mod startup;
|
||||
#[path = "tests/startup_warnings_tests.rs"]
|
||||
mod startup_warnings_tests;
|
||||
#[path = "tests/stream_animation_tests.rs"]
|
||||
mod stream_animation_tests;
|
||||
#[path = "tests/thread_usage.rs"]
|
||||
@@ -4847,7 +4849,9 @@ async fn primary_thread_ignores_child_mcp_startup_notifications() {
|
||||
let mut rendered_cells = Vec::new();
|
||||
while let Ok(event) = app_event_rx.try_recv() {
|
||||
if let AppEvent::InsertHistoryCell(cell) = event {
|
||||
rendered_cells.push(lines_to_single_string(&cell.display_lines(/*width*/ 120)));
|
||||
rendered_cells.push(lines_to_single_string(
|
||||
&cell.transcript_lines(/*width*/ 120),
|
||||
));
|
||||
}
|
||||
}
|
||||
let rendered = rendered_cells.join("\n");
|
||||
@@ -4964,12 +4968,24 @@ async fn active_side_thread_renders_live_mcp_startup_notifications() {
|
||||
app.handle_thread_event_now(event);
|
||||
}
|
||||
|
||||
let mut tui = crate::tui::test_support::make_test_tui().expect("test tui");
|
||||
let mut rendered_cells = Vec::new();
|
||||
while let Ok(event) = app_event_rx.try_recv() {
|
||||
if let AppEvent::InsertHistoryCell(cell) = event {
|
||||
rendered_cells.push(lines_to_single_string(&cell.display_lines(/*width*/ 120)));
|
||||
rendered_cells.push(lines_to_single_string(
|
||||
&cell.transcript_lines(/*width*/ 120),
|
||||
));
|
||||
app.insert_history_cell(&mut tui, cell);
|
||||
}
|
||||
}
|
||||
let inline = app
|
||||
.transcript_cells
|
||||
.iter()
|
||||
.flat_map(|cell| cell.display_lines(/*width*/ 120))
|
||||
.map(|line| line.to_string())
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n");
|
||||
assert!(inline.contains("1 MCP startup issue"));
|
||||
let rendered = rendered_cells.join("\n");
|
||||
assert!(app.chat_widget.side_conversation_active());
|
||||
assert_eq!(rendered.matches("sentry is not logged in").count(), 1);
|
||||
|
||||
Reference in new issue
Block a user