wip(tui): remove resize reflow slow threshold

This commit is contained in:
Felipe Coury
2026-04-23 15:42:09 -03:00
parent bee6ba1e6b
commit c4daad5a98
10 changed files with 21 additions and 392 deletions
+1 -9
View File
@@ -1943,13 +1943,6 @@
"format": "uint",
"minimum": 0.0,
"type": "integer"
},
"slow_threshold_ms": {
"default": null,
"description": "Disable resize reflow for the current transcript when a reflow operation exceeds this many milliseconds. Omit or set to `0` to disable the slow-reflow time limit.",
"format": "uint64",
"minimum": 0.0,
"type": "integer"
}
},
"type": "object"
@@ -2091,8 +2084,7 @@
}
],
"default": {
"max_rows": null,
"slow_threshold_ms": null
"max_rows": null
},
"description": "Experimental terminal resize-reflow tuning knobs."
},
+1 -12
View File
@@ -507,7 +507,6 @@ fn config_toml_deserializes_model_availability_nux() {
fn config_toml_deserializes_terminal_resize_reflow_config() {
let toml = r#"
[tui.terminal_resize_reflow]
slow_threshold_ms = 350
max_rows = 9000
"#;
let cfg: ConfigToml =
@@ -518,7 +517,6 @@ max_rows = 9000
.expect("tui config should deserialize")
.terminal_resize_reflow,
TerminalResizeReflowToml {
slow_threshold_ms: Some(350),
max_rows: Some(9000),
}
);
@@ -1342,7 +1340,6 @@ async fn runtime_config_resolves_terminal_resize_reflow_defaults_and_overrides()
ConfigToml {
tui: Some(Tui {
terminal_resize_reflow: TerminalResizeReflowToml {
slow_threshold_ms: Some(350),
max_rows: Some(9000),
},
..Default::default()
@@ -1355,19 +1352,12 @@ async fn runtime_config_resolves_terminal_resize_reflow_defaults_and_overrides()
.await
.expect("load overridden config");
assert_eq!(
cfg.terminal_resize_reflow.slow_threshold,
Some(Duration::from_millis(/*millis*/ 350))
);
assert_eq!(cfg.terminal_resize_reflow.max_rows, Some(9000));
let cfg = Config::load_from_base_config_with_overrides(
ConfigToml {
tui: Some(Tui {
terminal_resize_reflow: TerminalResizeReflowToml {
slow_threshold_ms: Some(0),
max_rows: Some(0),
},
terminal_resize_reflow: TerminalResizeReflowToml { max_rows: Some(0) },
..Default::default()
}),
..Default::default()
@@ -1378,7 +1368,6 @@ async fn runtime_config_resolves_terminal_resize_reflow_defaults_and_overrides()
.await
.expect("load config with disabled resize reflow limits");
assert_eq!(cfg.terminal_resize_reflow.slow_threshold, None);
assert_eq!(cfg.terminal_resize_reflow.max_rows, None);
}
+1 -17
View File
@@ -93,7 +93,6 @@ use std::io::ErrorKind;
use std::path::Path;
use std::path::PathBuf;
use std::sync::Arc;
use std::time::Duration;
use crate::config::permissions::compile_permission_profile;
use crate::config::permissions::get_readable_roots_required_for_codex_runtime;
@@ -626,21 +625,11 @@ impl Default for MultiAgentV2Config {
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub struct TerminalResizeReflowConfig {
pub slow_threshold: Option<Duration>,
pub max_rows: Option<usize>,
}
impl Default for TerminalResizeReflowConfig {
fn default() -> Self {
Self {
slow_threshold: None,
max_rows: None,
}
}
}
impl AuthManagerConfig for Config {
fn codex_home(&self) -> PathBuf {
self.codex_home.to_path_buf()
@@ -1505,11 +1494,6 @@ fn resolve_terminal_resize_reflow_config(config_toml: &ConfigToml) -> TerminalRe
};
TerminalResizeReflowConfig {
slow_threshold: tui
.terminal_resize_reflow
.slow_threshold_ms
.and_then(|millis| (millis > 0).then(|| Duration::from_millis(millis)))
.or(defaults.slow_threshold),
max_rows: tui
.terminal_resize_reflow
.max_rows