mirror of
https://github.com/openai/codex.git
synced 2026-05-24 13:04:29 +00:00
## Why Issue #20489 calls out that animated TUI affordances can be noisy for screen-reader users. Codex already has `tui.animations = false` as a reduced-motion setting, but some live activity rows render spinner-style prefixes in that mode. These were relatively recent regressions. We have also regressed this pattern more than once by adding new spinner/shimmer callsites that do not think through the reduced-motion path, so this PR adds a small guardrail while fixing the current surfaces. ## What changed - Omit the live status-row spinner when animations are disabled, so the row starts with stable text like `Working (...)`. - Render running hook headers without the spinner prefix when animations are disabled, while preserving shimmer/spinner behavior when animations are enabled. - Centralize TUI activity indicators in `tui/src/motion.rs`, with explicit reduced-motion choices for hidden prefixes, static bullets, and plain shimmer-text fallbacks. - Route existing spinner/shimmer callsites through the central motion helper, including exec rows, MCP/web-search/loading rows, hook rows, plugin loading, and onboarding loading text. - Add a source-scan regression test that rejects direct `spinner(...)` or `shimmer_spans(...)` usage outside the central module and primitive definition. - Add focused coverage that reduced-motion active exec rows are stable, status rows start without a spinner, running hooks omit the spinner, and MCP inventory loading stays stable. - Update the one affected status-indicator snapshot; the existing detail tree prefix remains unchanged. ## Verification - `cargo test -p codex-tui`
12 lines
309 B
Rust
12 lines
309 B
Rust
mod model;
|
|
mod render;
|
|
|
|
pub(crate) use model::CommandOutput;
|
|
#[cfg(test)]
|
|
pub(crate) use model::ExecCall;
|
|
pub(crate) use model::ExecCell;
|
|
pub(crate) use render::OutputLinesParams;
|
|
pub(crate) use render::TOOL_CALL_MAX_LINES;
|
|
pub(crate) use render::new_active_exec_command;
|
|
pub(crate) use render::output_lines;
|