mirror of
https://github.com/openai/codex.git
synced 2026-11-25 23:30:49 +00:00
Collapse turn details by default in the full-screen transcript (#63788)
## What changed Summarize tool calls and collapse completed turns when `tui.collapse_turn_details` is unset, including when the entire `[tui]` table is absent. Set `tui.collapse_turn_details = false` to opt out. Keep patches out of tool-call summaries so their inline diffs stay available for review during approval. Record the configured setting at startup with the `codex.tui.collapse_turn_details` counter. ## Testing Update configuration tests to cover the new default and an explicit opt-out. GitOrigin-RevId: 8a1de12bd2a26f445bbc1eee68f31fe93fe4925a
This commit is contained in:
@@ -190,7 +190,6 @@ async fn follow_control_click_preserves_draft_caret_and_composer_geometry() -> R
|
||||
));
|
||||
}
|
||||
|
||||
app.local_settings.tui.collapse_turn_details = true;
|
||||
for id in 1..=6 {
|
||||
app.transcript_cells
|
||||
.push(Arc::new(crate::history_cell::new_web_search_call(
|
||||
|
||||
@@ -1802,6 +1802,7 @@ mod browsing;
|
||||
#[tokio::test]
|
||||
async fn find_refreshes_live_details_before_searching_the_first_query() -> Result<()> {
|
||||
let mut app = crate::app::test_support::make_test_app().await;
|
||||
app.local_settings.tui.collapse_turn_details = false;
|
||||
crate::chatwidget::tests::helpers::set_active_cell(
|
||||
&mut app.chat_widget,
|
||||
Box::new(crate::exec_cell::new_active_exec_command(
|
||||
@@ -2401,7 +2402,6 @@ async fn clickable_transcript_foreground_follows_mouse_motion() -> Result<()> {
|
||||
let mut tui = crate::tui::test_support::make_test_tui()?;
|
||||
tui.set_owned_screen(/*owned*/ true)?;
|
||||
let size = tui.terminal.size()?;
|
||||
app.local_settings.tui.collapse_turn_details = true;
|
||||
app.transcript_cells = vec![
|
||||
user_cell("See https://prompt.example/ for context."),
|
||||
Arc::new(history_cell::AgentMarkdownCell::new(
|
||||
|
||||
@@ -2121,6 +2121,11 @@ async fn run_ratatui_app(
|
||||
/*inc*/ 1,
|
||||
&[("enabled", &config.tui_fullscreen_transcript.to_string())],
|
||||
);
|
||||
let _ = metrics.counter(
|
||||
"codex.tui.collapse_turn_details",
|
||||
/*inc*/ 1,
|
||||
&[("enabled", &config.tui_collapse_turn_details.to_string())],
|
||||
);
|
||||
}
|
||||
|
||||
// Cloud configuration and session selection can change screen policy after first paint.
|
||||
|
||||
@@ -131,6 +131,7 @@ show_tooltips = false
|
||||
show_server_version_notice = false
|
||||
auto_recap = false
|
||||
fullscreen_transcript = true
|
||||
collapse_turn_details = false
|
||||
mouse_scroll_speed = 0.5
|
||||
copy_on_select = "never"
|
||||
copy_on_select_clear_selection = true
|
||||
@@ -193,6 +194,7 @@ fast_default_opt_out = true
|
||||
assert_eq!(config.startup_warnings, Vec::<String>::new());
|
||||
assert_eq!(config.tui_mouse_scroll_speed, Some(1.5));
|
||||
assert!(config.tui_fullscreen_transcript);
|
||||
assert_eq!(config.tui_collapse_turn_details, config_text.is_empty());
|
||||
let bootstrap = crate::legacy_core::config::load_config_toml_with_layer_stack(
|
||||
home.path(),
|
||||
Some(&project_cwd),
|
||||
|
||||
@@ -255,7 +255,8 @@ impl TurnDetails {
|
||||
{
|
||||
self.pending.push((start + index, tool.clone()));
|
||||
}
|
||||
if calls.is_empty() {
|
||||
// Keep the patch's inline diff disclosure available for approval.
|
||||
if calls.is_empty() || any.is::<crate::history_cell::PatchHistoryCell>() {
|
||||
group.finish(rows, cells);
|
||||
} else {
|
||||
if let Some(exec) = any.downcast_ref::<crate::exec_cell::ExecCell>()
|
||||
|
||||
Reference in New Issue
Block a user