Commit Graph

2 Commits

  • test(tui2): re-enable ANSI for VT100 tests (#8423)
    Codex Unified Exec injects NO_COLOR=1 (and TERM=dumb) into shell tool
    commands to keep output stable. Crossterm respects NO_COLOR and
    suppresses ANSI escapes, which breaks our VT100-backed tests that assert
    on parsed ANSI color output (they see vt100::Color::Default everywhere).
    
    Force ANSI color output back on in the VT100 test backend by overriding
    crossterm's memoized NO_COLOR setting in VT100Backend::new. This keeps
    Unified Exec behavior unchanged while making the VT100 tests meaningful
    and deterministic under Codex.
    
    > [!WARNING]  
    > it's possible that this might be a race condition problem for this and
    need to be solved a different way. Feel free to revert if it causes the
    opposite problem for other tests that assume NOCOLOR is set. If it does
    then we need to probably add some extra AGENTS.md lines for how to run
    tests when using unified exec.
    
    (this same change was made in tui, so it's probably safe).
  • feat(tui2): copy tui crate and normalize snapshots (#7833)
    Introduce a full codex-tui source snapshot under the new codex-tui2
    crate so viewport work can be replayed in isolation.
    
    This change copies the entire codex-rs/tui/src tree into
    codex-rs/tui2/src in one atomic step, rather than piecemeal, to keep
    future diffs vs the original viewport bookmark easy to reason about.
    
    The goal is for codex-tui2 to render identically to the existing TUI
    behind the `features.tui2` flag while we gradually port the
    viewport/history commits from the joshka/viewport bookmark onto this
    forked tree.
    
    While on this baseline change, we also ran the codex-tui2 snapshot test
    suite and accepted all insta snapshots for the new crate, so the
    snapshot files now use the codex-tui2 naming scheme and encode the
    unmodified legacy TUI behavior. This keeps later viewport commits
    focused on intentional behavior changes (and their snapshots) rather
    than on mechanical snapshot renames.