Skip to content

TUI: split history cells into focused modules#22704

Open
etraut-openai wants to merge 2 commits into
mainfrom
etraut/tui-history-cell-modules
Open

TUI: split history cells into focused modules#22704
etraut-openai wants to merge 2 commits into
mainfrom
etraut/tui-history-cell-modules

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

@etraut-openai etraut-openai commented May 14, 2026

Why

codex-rs/tui/src/history_cell.rs had become the dumping ground for transcript rendering: the shared trait, common helpers, and the concrete cells for messages, plans, MCP/search, notices, patches, approvals, session chrome, and separators all lived together. That made small transcript changes require reopening a very large file and made ownership less obvious.

What changed

  • Replaced the monolithic history_cell.rs with a history_cell/ module tree organized by concern.
  • Kept the existing crate::history_cell::* surface stable through re-exports in history_cell/mod.rs.
  • Moved the existing render coverage into history_cell/tests.rs.

Reviewer notes

  • This PR is intentionally mechanical in mature — existing code and tests moving into files that match their concern.
  • The snapshot files under codex-rs/tui/src/history_cell/snapshots/ moved with the extracted test module. insta resolves these unnamed snapshots relative to the source file that declares them, so this is path churn only; snapshot contents were not updated.
  • The small non-mechanical seam edits are limited to split fallout: sibling-module visibility for shared cell containers, moving approval-specific exec-snippet helpers beside approvals, fixing the separator module path, and keeping a couple of existing test helpers reachable after extraction.

@etraut-openai etraut-openai marked this pull request as ready for review May 14, 2026 21:47
@etraut-openai etraut-openai changed the title [codex] tui: split history cells into focused modules TUI: split history cells into focused modules May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants