tui: replace debug/test-only crate features with debug_assertions

## Why

The remaining `vt100-tests` and `debug-logs` features in `codex-tui` were only selecting debug and test-only behavior. Those are exactly the cases where this repo already accepts `#[cfg(debug_assertions)]` as the Cargo-free substitute.

## What changed

- delete `vt100-tests` and `debug-logs` from `codex-tui`
- gate the VT100 integration tests with `debug_assertions` instead of a Cargo feature
- gate the textarea debug log site with `debug_assertions`
- shrink the manifest verifier allowlist again so only the remaining real feature exceptions stay permitted
This commit is contained in:
Michael Bolin
2026-04-01 11:06:41 -07:00
parent c042246bf5
commit c86d2673ef
6 changed files with 4 additions and 10 deletions

View File

@@ -32,8 +32,6 @@ MANIFEST_FEATURE_EXCEPTIONS = {
},
"codex-rs/tui/Cargo.toml": {
"default": ("voice-input",),
"vt100-tests": (),
"debug-logs": (),
"voice-input": ("dep:cpal",),
},
}

View File

@@ -19,10 +19,6 @@ path = "src/lib.rs"
[features]
default = ["voice-input"]
# Enable vt100-based tests (emulator) when running with `--features vt100-tests`.
vt100-tests = []
# Gate verbose debug logging inside the TUI implementation.
debug-logs = []
voice-input = ["dep:cpal"]
[lints]

View File

@@ -530,7 +530,7 @@ impl TextArea {
self.move_cursor_to_end_of_line(/*move_down_at_eol*/ true);
}
_o => {
#[cfg(feature = "debug-logs")]
#[cfg(debug_assertions)]
tracing::debug!("Unhandled key event in TextArea: {:?}", _o);
}
}

View File

@@ -1,6 +1,6 @@
// Single integration test binary that aggregates all test modules.
// The submodules live in `tests/suite/`.
#[cfg(feature = "vt100-tests")]
#[cfg(debug_assertions)]
mod test_backend;
#[allow(unused_imports)]

View File

@@ -1,4 +1,4 @@
#![cfg(feature = "vt100-tests")]
#![cfg(debug_assertions)]
#![expect(clippy::expect_used)]
use crate::test_backend::VT100Backend;

View File

@@ -1,4 +1,4 @@
#![cfg(feature = "vt100-tests")]
#![cfg(debug_assertions)]
use crate::test_backend::VT100Backend;
use ratatui::layout::Rect;