Skip to content

fix(browser): preserve Deep Research selection through submit#282

Merged
steipete merged 3 commits into
steipete:mainfrom
wbzjt:codex/fix-deep-research-composer-submit
Jul 2, 2026
Merged

fix(browser): preserve Deep Research selection through submit#282
steipete merged 3 commits into
steipete:mainfrom
wbzjt:codex/fix-deep-research-composer-submit

Conversation

@wbzjt

@wbzjt wbzjt commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Move ChatGPT Deep Research activation into the final submit path after composer reset/attachment upload, so the tool selection is not cleared before prompt submission.
  • Support the current ChatGPT tools-menu DOM shape, including .__menu-item rows and Deep research / Get a detailed report labels.
  • Use trusted CDP mouse clicks for the Deep Research row fallback and send button so React/ChatGPT handlers receive real pointer events.
  • Document the tools-menu contract and add regression coverage for both label variants.

Fixes #281.

Verification

  • pnpm vitest run tests/browser/deepResearch.test.ts tests/browser/promptComposer.test.ts tests/browser/index.test.ts tests/cli/browserConfig.test.ts — 164 passed.
  • pnpm run check — passed.
  • pnpm run build — passed.
  • Autoreview — clean after fixing its detailed-report-only label finding.

Live ChatGPT proof

Authenticated ChatGPT browser runs against this exact implementation:

  • Normal Instant submission returned the unique requested marker and logged Clicked send button.
  • Pro + --browser-research deep logged Deep Research mode activated, submitted the user turn with the visible Deep research marker, displayed the active research plan/task UI, completed the research run, and returned the requested current OpenAI Help Center source: https://help.openai.com/en/articles/10500283-deep-research-in-chatgpt

No connected apps or private data were used for the research request.

@clawsweeper

clawsweeper Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 1, 2026, 5:53 AM ET / 09:53 UTC.

Summary
The branch moves ChatGPT Deep Research activation into the final browser submit path, expands current tools-menu matching, switches Deep Research/send actions to trusted mouse clicks, and updates targeted browser tests plus the changelog.

Reproducibility: no. not with high-confidence live reproduction here: I did not run the long ChatGPT Pro browser smoke. The linked issue and current source make the failing activation boundary source-reproducible against main.

Review metrics: 2 noteworthy metrics.

  • Changed files: 3 runtime files, 2 test files, 1 changelog file. The runtime surface spans both Deep Research activation and shared prompt submission, so live proof should cover more than one path.
  • Shared submit path: 1 common send helper changed. attemptSendButton is used for ordinary ChatGPT browser sends, not only Deep Research, making upgrade proof more important.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #281
Summary: This PR appears to be the candidate implementation for the open Deep Research activation failure tracked in the canonical issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🐚 platinum hermit
Result: blocked until stronger real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Attach redacted live proof showing the submitted user message has the Deep research marker and reaches the research-plan UI.
  • Include a quick normal ChatGPT browser send proof because the shared send helper changed.

Proof guidance:

  • [P1] Needs stronger real behavior proof before merge: The PR body claims a human-validated Deep Research run, but it includes no inspectable screenshot, recording, terminal output, live output, linked artifact, or redacted logs; add proof and update the PR body for re-review.

Mantis proof suggestion
A real browser recording or diagnostic output would materially prove the ChatGPT Deep Research marker/research-plan path and the shared send-click behavior. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis visual task: verify Oracle browser --browser-research deep selects Deep Research, the submitted message shows the Deep research marker, and the research-plan UI appears.

Risk before merge

  • [P1] The common ChatGPT send-button helper now uses coordinate-based CDP mouse clicks for all browser submissions; green unit tests do not prove that live ChatGPT overlays, scrolling, or UI drift will not cause missed or wrong send clicks.
  • [P1] The PR body contains a manual validation claim but no inspectable artifact; external PR proof is still insufficient for the Deep Research marker/research-plan UI and for the changed normal send path.

Maintainer options:

  1. Require live browser proof first (recommended)
    Ask for redacted screenshot, recording, terminal output, or logs showing Deep Research reaches the research-plan UI and a normal browser prompt still submits after the shared send-click change.
  2. Accept the live-UI risk
    A maintainer could merge based on the focused tests and manual claim, while owning the risk that ChatGPT live UI click behavior still needs a quick follow-up.

Next step before merge

  • [P1] No automated code repair is indicated; the blocker is contributor or maintainer live proof for an external browser UI path plus review of the shared send-click risk.

Security
Cleared: The diff does not add dependencies, workflow changes, secret handling, package scripts, or supply-chain sensitive code paths.

Review details

Best possible solution:

Land the narrow browser fix after the contributor or a maintainer attaches redacted live proof showing the submitted Deep research marker/research-plan UI and a normal ChatGPT browser send still working with the shared click helper.

Do we have a high-confidence way to reproduce the issue?

No, not with high-confidence live reproduction here: I did not run the long ChatGPT Pro browser smoke. The linked issue and current source make the failing activation boundary source-reproducible against main.

Is this the best way to solve the issue?

Likely yes: moving Deep Research activation after the final composer reset/upload and supporting the current tools-menu DOM is a narrow maintainable fix. The remaining gap is proof, not an alternate implementation path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 56531a38734b.

Label changes

Label changes:

  • add P2: The PR targets a supported opt-in Deep Research browser workflow with limited blast radius but real user impact for paid ChatGPT browser runs.
  • add merge-risk: 🚨 message-delivery: Changing the shared send-button click mechanism could make live browser prompts fail to submit or submit incorrectly even if unit tests pass.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR body claims a human-validated Deep Research run, but it includes no inspectable screenshot, recording, terminal output, live output, linked artifact, or redacted logs; add proof and update the PR body for re-review.

Label justifications:

  • P2: The PR targets a supported opt-in Deep Research browser workflow with limited blast radius but real user impact for paid ChatGPT browser runs.
  • merge-risk: 🚨 message-delivery: Changing the shared send-button click mechanism could make live browser prompts fail to submit or submit incorrectly even if unit tests pass.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR body claims a human-validated Deep Research run, but it includes no inspectable screenshot, recording, terminal output, live output, linked artifact, or redacted logs; add proof and update the PR body for re-review.
Evidence reviewed

What I checked:

  • Target policy read: Read the full target AGENTS.md; its browser smoke guidance for ChatGPT Pro/Deep Research and manual-test expectations affected the proof assessment. (AGENTS.md:1, 56531a38734b)
  • PR metadata and proof claim: The PR body lists focused vitest/format/build/lint commands and says a human-validated run reached the research-plan UI, but it does not include a screenshot, recording, terminal output, redacted logs, or linked artifact to inspect. (b941bc8bc30c)
  • Deep Research moved into submit path: The PR activates Deep Research after attachment upload and before baseline capture in the local browser submit path, so later composer clearing should not erase the selected tool. (src/browser/index.ts:1480, b941bc8bc30c)
  • Remote browser path updated too: The remote Chrome submit path also activates Deep Research after uploads and before prompt submission, matching the local path change. (src/browser/index.ts:2952, b941bc8bc30c)
  • Current menu matching and trusted fallback: The PR removes slash-command mutation, adds popover/menu-row/search matching for current ChatGPT tool labels, and falls back to a CDP mouse click when synthetic selection does not confirm the pill. (src/browser/actions/deepResearch.ts:1231, b941bc8bc30c)
  • Shared send helper changed: The PR changes the common ChatGPT send-button helper to return a click point and dispatch trusted CDP mouse events, affecting normal browser submissions as well as Deep Research. (src/browser/actions/promptComposer.ts:645, b941bc8bc30c)

Likely related people:

  • steipete: Authored the main Deep Research browser mode commit and recent Deep Research validation/scoping work visible in current main history. (role: feature owner and recent area contributor; confidence: high; commits: dff95f2a99b5, 4b7f5d044585, a3c7d39d12c3; files: src/browser/actions/deepResearch.ts, src/browser/index.ts, tests/browser/deepResearch.test.ts)
  • umutkeltek: Authored merged OOPIF/report-extraction and Deep Research selection-helper work adjacent to the same browser research lifecycle. (role: adjacent Deep Research contributor; confidence: medium; commits: e907c167bc8d, be413fa498bd, 41d3b53194ae; files: src/browser/actions/deepResearch.ts, tests/browser/deepResearch.test.ts)
  • pdurlej: Authored browser attachment/send-readiness work in promptComposer history and earlier Deep Research proposal context, which is relevant because this PR changes the shared send helper. (role: adjacent browser send-path contributor; confidence: medium; commits: e23fa065643f, 67462733e178; files: src/browser/actions/promptComposer.ts, src/browser/actions/deepResearch.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 message-delivery 🚨 Merging this PR could drop, duplicate, misroute, suppress, or wrongly target messages. labels Jul 1, 2026
@steipete steipete force-pushed the codex/fix-deep-research-composer-submit branch from b941bc8 to 888992c Compare July 2, 2026 07:36

@steipete steipete left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Maintainer review complete. The submit-order fix, current tools-menu DOM handling, trusted click fallback, regression coverage, and documentation all fit the browser-engine contract. Focused tests, full checks/build, clean autoreview, and authenticated normal plus Deep Research browser runs passed on the updated head.

@steipete steipete merged commit bcb835b into steipete:main Jul 2, 2026
4 checks passed
etafund pushed a commit to etafund/oracle that referenced this pull request Jul 2, 2026
Record upstream/main (bda0326) as merged.
The fork already contains equivalent implementations for upstream PRs steipete#276, steipete#277, steipete#278, and steipete#282 from the prior sync.
Keep the fork tree unchanged to avoid overwriting unrelated in-progress local lane work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 message-delivery 🚨 Merging this PR could drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(browser): Deep Research activation cannot find composer option

2 participants