mirror of
https://github.com/openai/codex.git
synced 2026-10-19 16:17:49 +00:00
Report the configured TUI mode in codex doctor (#50200)
## What changed Add `configured TUI mode` to the configuration details in human-readable and JSON doctor reports. Report `fullscreen` when `tui.fullscreen_transcript` is enabled and `scrollback` when it is disabled. ## Testing Add an integration test covering both configuration values in JSON output and update the human-readable report snapshot to include the mode. GitOrigin-RevId: beb62ddfa62a3516a64b5a69d5a41b257434f5d5
This commit is contained in:
@@ -1113,6 +1113,14 @@ fn config_check(config: &Config) -> DoctorCheck {
|
||||
config.model.as_deref().unwrap_or("<default>")
|
||||
));
|
||||
details.push(format!("model provider: {}", config.model_provider_id));
|
||||
details.push(format!(
|
||||
"configured TUI mode: {}",
|
||||
if config.tui_fullscreen_transcript {
|
||||
"fullscreen"
|
||||
} else {
|
||||
"scrollback"
|
||||
}
|
||||
));
|
||||
details.push(format!("log dir: {}", config.log_dir.display()));
|
||||
details.push(format!(
|
||||
"sqlite home: {}",
|
||||
|
||||
@@ -1415,6 +1415,10 @@ Background Server
|
||||
#[test]
|
||||
fn render_human_report_snapshot_covers_environment_rows() {
|
||||
let mut report = sample_report();
|
||||
report.checks.push(
|
||||
DoctorCheck::new("config.load", "config", CheckStatus::Ok, "config loaded")
|
||||
.detail("configured TUI mode: fullscreen"),
|
||||
);
|
||||
report.checks.push(DoctorCheck::new(
|
||||
"system.disk",
|
||||
"disk",
|
||||
|
||||
+4
-1
@@ -45,6 +45,9 @@ Environment
|
||||
✓ state state paths inspectable
|
||||
|
||||
Configuration
|
||||
✓ config loaded
|
||||
feature flags 0 enabled · 0 overridden
|
||||
configured TUI mode fullscreen
|
||||
✗ auth token expired — Run `codex login`.
|
||||
OPENAI_API_KEY present
|
||||
|
||||
@@ -69,7 +72,7 @@ Background Server
|
||||
✓ app-server background server is not running
|
||||
|
||||
─────────────────────────────────────────────────────────────
|
||||
15 ok · 5 notes · 3 warn · 1 fail failed
|
||||
16 ok · 5 notes · 3 warn · 1 fail failed
|
||||
|
||||
--summary compact output --all expand truncated lists
|
||||
--json redacted report
|
||||
|
||||
@@ -414,6 +414,24 @@ fn doctor_reports_only_safe_config_error_metadata() -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn doctor_reports_configured_tui_mode() -> Result<()> {
|
||||
let fixture = Fixture::new()?;
|
||||
for (setting, expected) in [("true", "fullscreen"), ("false", "scrollback")] {
|
||||
let output = fixture
|
||||
.command()?
|
||||
.args(["-c", &format!("tui.fullscreen_transcript={setting}")])
|
||||
.args(["doctor", "--json"])
|
||||
.output()?;
|
||||
let report: Value = serde_json::from_slice(&output.stdout)?;
|
||||
assert_eq!(
|
||||
report["checks"]["config.load"]["details"]["configured TUI mode"],
|
||||
expected
|
||||
);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn doctor_reports_configured_filesystem_paths() -> Result<()> {
|
||||
let fixture = Fixture::new()?;
|
||||
|
||||
Reference in New Issue
Block a user