fix(browser): recover no-op image prompt sends - #432
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs changes before merge. Reviewed August 28, 2026, 10:14 AM ET / 14:14 UTC. ClawSweeper reviewWhat this changesThe branch retries a ChatGPT image-prompt send with Enter when the composer remains populated after a send-button click, and records submission state only after a user turn appears. Merge readiness⛔ Blocked by patch quality or review findings - 5 items remain Keep open: the prior P1 delivery-race finding remains at the same head SHA. The new 750 ms Enter retry can send a second image prompt while a successful click is still committing. Priority: P2 Review scores
Verification
How this fits togetherOracle’s browser engine sends prompts through Chrome DevTools, then verifies that ChatGPT created a user turn before continuing the session. This change sits between the initial send click and commit verification, so it directly affects whether an image request is delivered once. flowchart LR
A[Prompt and reference image] --> B[ChatGPT composer]
B --> C[Send-button click]
C --> D{Commit signal visible?}
D -->|Not yet| E[Enter fallback]
D -->|Yes| F[Commit verification]
E --> F
F --> G[Session submission state]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Only issue Enter after reliable evidence that the click failed, while preserving the delayed successful-click path so each image request creates one user turn. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: the current verifier supports clicks whose turn appears later, while the introduced helper sends Enter after 750 ms if that turn has not yet appeared and the prompt remains visible. Is this the best way to solve the issue? No: the retry solves the reported no-op, but its fixed short wait does not distinguish failure from delayed successful commit; the guard must establish click failure before sending again. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fa0e6fd669ad. LabelsLabel justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Thanks for the detailed reproduction and the signed-in browser/MCP smokes; that evidence is useful for understanding the no-op image send. I'm closing this version because an unchanged composer after 750 ms cannot establish that the first click failed. A successful click can still be committing with no user turn or stop control visible, so the Enter fallback can submit the same image request twice. Main already improves activation and single-send targeting in #434 while keeping ambiguous commit timeouts out of retries. A focused follow-up is welcome if the no-op still reproduces on current main. Please include delayed-success coverage and real browser evidence, and preserve one submission attempt unless there is reliable evidence that the first attempt failed. Thanks again for investigating this path. |
Summary
promptSubmittedonly after the user turn is observableRoot cause
On the current Windows ChatGPT home composer, an uploaded reference image could leave the visible enabled
data-testid="send-button"as a no-op for CDP mouse input. Oracle already had enough evidence to see that the prompt stayed staged, but a raw-string comparison would miss it because ProseMirror renders paragraph boundaries with extra newlines. The run then waited the full prompt-commit timeout with zero conversation turns.The fallback now canonicalizes whitespace, waits briefly for the click to commit, checks that no new turn or generation stop control appeared, and only then presses Enter once.
Tests
pnpm vitest run tests/browser/promptComposer.test.ts tests/browser/promptComposerExpressions.test.ts— 63 passedpnpm run typecheckpnpm test— 153 files passed, 18 skipped; 1871 tests passed, 53 skippedpnpm run buildSigned-in browser smokes
Underlying browser-path reproduction and fallback evidence:
chatgpt-image-fallback-smoke-twoalwaysSend click left the prompt staged; submitting once via EnterpromptSubmitted=true, conversation URL changed from/to/c/...~/.oracle/generated/Exact MCP wrapper smoke through a fresh stdio
oracle-mcp.jsprocess:chatgpt_imagechatgpt-image-mcp-exact-smokepromptSubmitted=true, conversation URL/c/6a91962b-9810-83ee-9f62-8d517a5bd878completedin 1m20sstructuredContent.imagesreturned the requested output path