Skip to content

tui: split remaining composer draft and footer state#22656

Merged
etraut-openai merged 2 commits into
mainfrom
etraut/tui-composer-part-2
May 15, 2026
Merged

tui: split remaining composer draft and footer state#22656
etraut-openai merged 2 commits into
mainfrom
etraut/tui-composer-part-2

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

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

Why

#22581 started separating the chat composer’s responsibilities, but ChatComposer still owned the remaining editable draft state alongside footer/status presentation state. This follow-up makes those ownership lines explicit so future composer changes have a smaller blast radius and BottomPane does not need to keep exposing scattered draft getters.

This is just a refactor. No functional or behavioral changes are intended.

What changed

  • Move the remaining editable composer state into bottom_pane/chat_composer/draft_state.rs.
  • Move footer and status-row presentation state into bottom_pane/chat_composer/footer_state.rs.
  • Add an internal ComposerDraftSnapshot for restore flows, replacing several ad hoc BottomPane pass-through reads.
  • Rewire the related history-search and thread-input restore paths to use the extracted state.

Verification

  • RUST_MIN_STACK=8388608 cargo test -p codex-tui
  • cargo insta pending-snapshots

Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai left a comment

Choose a reason for hiding this comment

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

Smoke tested the draft and footer behavior.

Looks good, approved.

@etraut-openai etraut-openai merged commit 7fa0007 into main May 15, 2026
31 checks passed
@etraut-openai etraut-openai deleted the etraut/tui-composer-part-2 branch May 15, 2026 16:12
@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