Skip to content

Clear accepted image drafts without confusing late change notifications with edits - #264

Open
qduc wants to merge 2 commits into
mainfrom
codex/image-composer-clear
Open

qduc wants to merge 2 commits into
mainfrom
codex/image-composer-clear

Conversation

@qduc

@qduc qduc commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

After an image edit renders, Enter can run before ink-prompt's passive onChange reaches the parent. The submission then snapshots an older draft revision. Its late image notification looks like a newer user edit, so accepted text/image markers remain in the composer and a later /retry-turn appends to them.

Capture the child's submitted value synchronously before a fresh submission snapshots its revision. Keep the existing pending-send path and later-edit revision protections. The real CLI regression observes an empty composer after the accepted image turn, using the revision captured before Enter.

Evidence: the original failure reproduced on unchanged main. An identical temporary delayed-image-notification fault fails on base (expected revision 1, actual 2) and passes with the capture statement (2/2). Independent real-CLI controls accept the causal fix and preserve newer edits, same-text edits, pending drafts, rejected drafts, held-send decline/resend and bang-shell submission. All temporary fault/trace code was removed.

Validation: full provider suite 270 passed/5 skipped; real terminal image and slash-command E2E 29 passed; fake-Codex E2E 18 passed; typecheck, lint, static and exact CI quality gates pass. Independent verifier accepted the three-line file-ceiling increase and its ordering-specific rationale. This standalone PR includes the same model-picker fixture readiness correction as #261: wait for the loaded row before testing navigation, preserving every navigation/favorite assertion.

This branch has not been deployed

No deployments
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.

1 participant