Skip to content

Conversation

@joshka-oai
Copy link
Collaborator

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.

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@joshka-oai joshka-oai force-pushed the joshka/tui2-baseline branch 2 times, most recently from 7ef2836 to bfc9b6a Compare December 10, 2025 21:49
@joshka-oai joshka-oai enabled auto-merge (squash) December 10, 2025 22:02
@joshka-oai
Copy link
Collaborator Author

Codex CLI update: refreshed TUI/TUI2 snapshots for path rendering and image history cells.

  • The display_path_for helper in tui/tui2 now prefers repo-relative paths when the file and cwd live in the same Git repo (via get_git_repo_root + pathdiff::diff_paths), and falls back to ~-relative only for paths outside the repo.
    • I updated the apply_update_block_relativizes_path snapshots in both crates to expect the new single-line, repo-relative header (abs_old.rs → abs_new.rs (+1 -1)) instead of the old ~/code/... absolute paths.
  • For ViewImageToolCall, the history cell was previously snapshotting an absolute path under the repo; because the new path logic now yields a repo-relative path here too, I updated the local_image_attachment_history_snapshot snapshots in both tui and tui2 to assert just example.png.

With these snapshot updates, both codex-tui and codex-tui2 now pass:

  • diff_render::tests::ui_snapshot_apply_update_block_relativizes_path
  • chatwidget::tests::view_image_tool_call_adds_history_cell

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.
- Add `skill_load_outcome: None` to all `SessionConfiguredEvent` initializers used in tui2 tests so they compile against the new protocol definition.
- Add the Windows-specific `approvals_selection_popup@windows` snapshot for codex-tui2, mirroring the existing codex-tui snapshot and keeping tui2 in sync with upstream UI text.

These changes are test-only and ensure tui2 continues to build and pass its snapshot suite after upstream updates to the session configuration payload.
Windows seems to race creating the output file names. This doesn't
actually appear to be used for anything (guessing it's a debug tool).
@joshka-oai joshka-oai merged commit 90f262e into main Dec 10, 2025
26 checks passed
@joshka-oai joshka-oai deleted the joshka/tui2-baseline branch December 10, 2025 22:53
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants