Skip to content

fix(tui): persist ctrl-c draft via app event#21397

Merged
fcoury-oai merged 1 commit into
mainfrom
codex/fix-main-ci
May 6, 2026
Merged

fix(tui): persist ctrl-c draft via app event#21397
fcoury-oai merged 1 commit into
mainfrom
codex/fix-main-ci

Conversation

@fcoury-oai
Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai commented May 6, 2026

Why

The main branch started failing after #21351 merged because the merge commit kept calling AppCommand::add_to_history from BottomPane::clear_composer_for_ctrl_c, but main had already removed that helper as part of the history persistence refactor. The PR head passed because it was based on an older main commit where the helper still existed.

This restores the Ctrl+C draft-stashing behavior using the current app-event path instead of the removed command helper.

What Changed

  • Store the active ThreadId in BottomPane when history metadata is provided.
  • Emit AppEvent::AppendMessageHistoryEntry for Ctrl+C-cleared drafts.
  • Update the slash-clear regression test to assert the current history event shape.

How to Test

Targeted tests:

  • cargo test -p codex-tui slash_clear_after_ctrl_c_keeps_stashed_draft_recallable

Broader local checks:

  • just fix -p codex-tui
  • just argument-comment-lint -p codex-tui
  • git diff --check origin/main...HEAD
  • cargo test -p codex-tui reached completion; the fixed test passed, and the only local failures were status::tests::status_permissions_full_disk_managed_*, blocked by this machine config rejecting DangerFullAccess via /etc/codex/requirements.toml.

@fcoury-oai fcoury-oai enabled auto-merge (squash) May 6, 2026 18:52
@fcoury-oai fcoury-oai merged commit 6b7d6ca into main May 6, 2026
26 checks passed
@fcoury-oai fcoury-oai deleted the codex/fix-main-ci branch May 6, 2026 19:03
@github-actions github-actions Bot locked and limited conversation to collaborators May 6, 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