Commit Graph

4 Commits

  • improve performance of 'cargo test -p codex-tui' (#2593)
    before:
    
    ```
    $ time cargo test -p codex-tui -q
    [...]
    cargo test -p codex-tui -q  39.89s user 10.77s system 98% cpu 51.328 total
    ```
    
    after:
    
    ```
    $ time cargo test -p codex-tui -q
    [...]
    cargo test -p codex-tui -q  1.37s user 0.64s system 29% cpu 6.699 total
    ```
    
    the major offenders were the textarea fuzz test and the custom_terminal
    doctests. (i think the doctests were being recompiled every time which
    made them extra slow?)
  • refactor onboarding screen to a separate "app" (#2524)
    this is in preparation for adding more separate "modes" to the tui, in
    particular, a "transcript mode" to view a full history once #2316 lands.
    
    1. split apart "tui events" from "app events".
    2. remove onboarding-related events from AppEvent.
    3. move several general drawing tools out of App and into a new Tui
    class
  • chore: upgrade to Rust 1.89 (#2465)
    Codex created this PR from the following prompt:
    
    > upgrade this entire repo to Rust 1.89. Note that this requires
    updating codex-rs/rust-toolchain.toml as well as the workflows in
    .github/. Make sure that things are "clippy clean" as this change will
    likely uncover new Clippy errors. `just fmt` and `cargo clippy --tests`
    are sufficient to check for correctness
    
    Note this modifies a lot of lines because it folds nested `if`
    statements using `&&`.
    
    ---
    [//]: # (BEGIN SAPLING FOOTER)
    Stack created with [Sapling](https://sapling-scm.com). Best reviewed
    with [ReviewStack](https://reviewstack.dev/openai/codex/pull/2465).
    * #2467
    * __->__ #2465
  • resizable viewport (#1732)
    Proof of concept for a resizable viewport.
    
    The general approach here is to duplicate the `Terminal` struct from
    ratatui, but with our own logic. This is a "light fork" in that we are
    still using all the base ratatui functions (`Buffer`, `Widget` and so
    on), but we're doing our own bookkeeping at the top level to determine
    where to draw everything.
    
    This approach could use improvement—e.g, when the window is resized to a
    smaller size, if the UI wraps, we don't correctly clear out the
    artifacts from wrapping. This is possible with a little work (i.e.
    tracking what parts of our UI would have been wrapped), but this
    behavior is at least at par with the existing behavior.
    
    
    https://github.com/user-attachments/assets/4eb17689-09fd-4daa-8315-c7ebc654986d
    
    
    cc @joshka who might have Thoughts™