fix(browser): avoid attachment menu coordinate clicks - #431
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs changes before merge. Reviewed August 28, 2026, 9:26 AM ET / 13:26 UTC. ClawSweeper reviewWhat this changesThe PR replaces broad coordinate-based attachment-menu clicks with focused activation of the exact ChatGPT composer control and adds a Work/navigation safety guard. Regression provenancePossible regression — probable (reviewed change; known regression link). No predecessor PR is attributed. Merge readiness⛔ Blocked by patch quality or review findings - 4 items remain The branch has a concrete safety gap: its new post-activation guard does not recognize project-scoped ChatGPT conversations, so it can miss navigation into another project conversation. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherOracle’s browser mode drives a signed-in ChatGPT tab through Chrome DevTools Protocol. Attachment upload opens the composer menu before transferring a local file and then waits for the upload UI to become ready. flowchart LR
A[Oracle browser consult] --> B[ChatGPT composer]
B --> C[Exact attachment control]
C --> D[Attachment menu activation]
D --> E[Navigation safety check]
E --> F[File upload and prompt submission]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Use the repository’s project-aware conversation-ID extraction in the post-activation guard and add a regression test for a changed project conversation. Do we have a high-confidence way to reproduce the issue? Yes, from source: give the new guard distinct project-scoped Is this the best way to solve the issue? No; exact composer activation is appropriate, but the guard must use project-aware route handling to fulfill its fail-closed behavior. 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 changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Summary
+controlWhy
#315 / #316 normalize ChatGPT Work to Chat during startup, but attachment upload later used broad fallback selectors plus a trusted mouse click at a computed page coordinate. On the current Work home, suggestion cards sit close to the composer.
In a sanitized live failure, an attachment-bearing Oracle run had
promptSubmitted: false; an unrelated Work suggestion became a new task about 18 seconds after the run began, and Oracle then failed one attachment-readiness timeout later. No separate browser-control call occurred in the invoking turn. The timing strongly implicates attachment-menu activation, although the exact misdirected pointer event was not captured.This patch removes that coordinate-click hazard. It targets only
#composer-plus-btn/button[data-testid="composer-plus-btn"], focuses the control, sends trusted Enter key events, and keeps only an exact-selector synthetic fallback. A post-activation guard rejects Work or unexpected conversation navigation.Validation
Exact head:
7b753df7975eaed9bf8914ef6670c9f5640f942b.pnpm exec vitest run tests/browser/pageActions.test.ts— 98 passed, 1 skippedpnpm run lint— passedpnpm test— 1,873 passed, 53 skippedpnpm run build— passedpnpm run docs:check— passed (77 flags, 6 files)Signed-in browser smoke
A compiled exact-head overlay ran an Instant GPT-5.6 Sol consult with one uploaded
LICENSEfile:attachment-safety-final-smoke-20260828/c/...conversationORACLE_ATTACHMENT_SAFETY_FINAL_OKAfter restarting Codex, the installed MCP overlay was also verified through detached
consultplus a single blockingwait:oracle-mcp-attachment-restart-smokeORACLE_MCP_ATTACHMENT_RESTART_OKAn explicit navigation to an existing Work conversation also failed closed before attachment upload or prompt submission.