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:
Ian MacLeod authored and copyberry committed 2026-09-03 20:25:59 +00:00
1 parent ed391d4dd2
commit 32c303c197
31 files changed
+728 -69

No files matched your search

+11 -4
View File
@@ -66,6 +66,7 @@ impl ChatWidget {
self.turn_lifecycle.last_turn_id = Some(notification.turn.id);
self.last_non_retry_error = None;
if !matches!(replay_kind, Some(ReplayKind::ResumeInitialMessages)) {
self.warning_display_state.startup_complete = true;
self.on_task_started();
}
}
@@ -194,12 +195,18 @@ impl ChatWidget {
ServerNotification::DeprecationNotice(notification) => {
self.on_deprecation_notice(notification.summary, notification.details)
}
ServerNotification::ConfigWarning(notification) => self.on_warning(
notification
ServerNotification::ConfigWarning(notification) => {
let message = notification
.details
.map(|details| format!("{}: {details}", notification.summary))
.unwrap_or(notification.summary),
),
.unwrap_or(notification.summary);
if self.warning_display_state.startup_complete {
self.on_warning(message);
} else if self.warning_display_state.should_display(&message) {
self.add_to_history(history_cell::StartupWarningsCell::new(vec![message]));
self.request_redraw();
}
}
ServerNotification::McpServerStatusUpdated(notification) => {
self.on_mcp_server_status_updated(notification)
}