Refactor ChatComposer internals into focused modules

Resolved 💬 1 comment Opened May 13, 2026 by deepak-lenka Closed May 13, 2026

codex-rs/tui/src/bottom_pane/chat_composer.rs has grown very large and currently owns several distinct behavior areas: text editing, slash command dispatch, mention popup handling, paste placeholder handling, image attachment bookkeeping, footer rendering, Vim mode behavior, and tests.

I would like to propose a behavior-preserving mechanical refactor that keeps ChatComposer as the composition layer while moving one focused area at a time into submodules.

Suggested first slice:

  • Move inline ChatComposer tests into codex-rs/tui/src/bottom_pane/chat_composer/tests.rs, or
  • Move large paste placeholder helpers into codex-rs/tui/src/bottom_pane/chat_composer/paste.rs.

Why:

  • Smaller review surface for future composer changes.
  • Easier to reason about paste/attachment/mention behavior independently.
  • No intended behavior change.

I’m an external contributor, so I’m opening this issue first per the contribution guidelines. If maintainers agree this aligns with the intended direction, I’d be happy to prepare a focused PR.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗