Skip to content

Deep research contract: follow the research Delete gate into the More menu item - #12751

Merged
danielhanchen merged 1 commit into
mainfrom
ci-research-delete-gate
Oct 5, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-research-delete-gate

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Repo tests (CPU, studio) has a second failure on main besides the one #12747 fixes:

FAILED tests/studio/test_deep_research_frontend_contract.py::test_research_presentation_is_integrated
assert 'if (researchRunId || ownsResearchMessage)' in '...thread.tsx...'

It shows on PRs based on main after #12735, for example #12742 and #12746.

Cause

#12735 moved Delete into the message's More menu. The research gate it carried was rewritten in the move, and the behaviour is unchanged:

// useDeleteMessage()
return { handleDelete, isRunning, hidden: Boolean(researchRunId || ownsResearchMessage) };

// DeleteMessageMenuItem
if (hidden) {
  return null;
}

Research messages still get no Delete, so the test is what is wrong: it pinned the old if (...) literal.

Change

The assertion now checks the gate where it lives: the delete hook reports hidden for researchRunId || ownsResearchMessage, and DeleteMessageMenuItem renders nothing when hidden. Both halves are needed for a research message to have no Delete, so both are asserted.

Verification

  • Main: 1 failed, 16 passed. This branch: 17 passed.
  • Dropping ownsResearchMessage from the hook fails the test, and so does removing the item's if (hidden) return null.

… menu item

#12735 moved Delete into the More menu. The research gate became the hook's
hidden: Boolean(researchRunId || ownsResearchMessage) plus 'if (hidden) return null' in
the menu item, so the literal 'if (researchRunId || ownsResearchMessage)' this test
pinned is gone although research messages still get no Delete.

Assert the gate in its new shape, in the hook and in the item that honours it.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-05T17:20:11.026847Z 90000e0 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 5, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 90000e0a93

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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