Skip to content

TUI: split history cells into focused modules#22704

Merged
etraut-openai merged 2 commits into
mainfrom
etraut/tui-history-cell-modules
May 15, 2026
Merged

TUI: split history cells into focused modules#22704
etraut-openai merged 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 added a commit that referenced this pull request May 14, 2026
@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
@etraut-openai etraut-openai force-pushed the etraut/tui-history-cell-modules branch from e22177e to c0e49e4 Compare May 15, 2026 03:52
@etraut-openai etraut-openai merged commit e6a7368 into main May 15, 2026
31 checks passed
@etraut-openai etraut-openai deleted the etraut/tui-history-cell-modules branch May 15, 2026 04:19
@github-actions github-actions Bot locked and limited conversation to collaborators May 15, 2026
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.

2 participants