Skip to content

Disable context menu during pending delete-for-all window#1430

Merged
osyed merged 6 commits into
mainfrom
codex/issue-1407-15s-call-delete-guard
Jul 1, 2026
Merged

Disable context menu during pending delete-for-all window#1430
osyed merged 6 commits into
mainfrom
codex/issue-1407-15s-call-delete-guard

Conversation

@dnlbui

@dnlbui dnlbui commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

What Changed

This PR reuses the existing 15-second delete-for-all guard to temporarily disable context menu actions for any message while a delete-for-all request is pending.

  • ChatModal.isMessageInDeleteForAllGuard centralizes the existing recent delete-for-all target check.
  • Context menu actions for copy, reply, edit, delete, delete-for-all, join, and call invite share the same temporary disabled state.
  • Offline-disabled menu actions stay disabled when the delete-for-all guard state is synced.
  • Quick reaction buttons are disabled during the same guard window and reaction submission has a defensive guard.
  • Call phone clicks, call joins, invite modal opening, and invite sending now stop while the source call is inside that guard window.

Fixed Flow

  1. A user confirms delete-for-all on a message.
  2. The existing recent target guard is marked for that message txid.
  3. During the 15-second guard window, relevant context menu actions, quick reactions, and call join/invite paths are blocked.
  4. Immediate duplicate or stale actions are prevented while the delete request is being submitted.

Why

The short-term fix intentionally avoids adding pending transaction metadata or a longer delete lifecycle. It protects the common immediate race where a user deletes a message for everyone and quickly tries to interact with the same still-rendered message. Offline menu state remains a separate source of disabled state, so syncing the delete-for-all guard does not re-enable network-dependent actions while offline.

Validation

  • node --check app.js
  • git diff --check

Closes #1407

@dnlbui dnlbui changed the title [codex] Guard call invites during delete-for-all window Guard call invites during delete-for-all window Jun 30, 2026
@dnlbui dnlbui marked this pull request as ready for review June 30, 2026 22:46
@dnlbui

dnlbui commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d2e2c86864

ℹ️ 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".

Comment thread app.js Outdated
@dnlbui dnlbui changed the title Guard call invites during delete-for-all window Guard all messages during delete-for-all window Jul 1, 2026
@dnlbui dnlbui changed the title Guard all messages during delete-for-all window Disable context menu during pending delete-for-all window Jul 1, 2026
@dnlbui

dnlbui commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f742206961

ℹ️ 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".

Comment thread app.js Outdated
@dnlbui

dnlbui commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: bbc728bd6b

ℹ️ 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".

@osyed osyed merged commit cd3ebb0 into main Jul 1, 2026
1 check passed
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.

Investigation: Deleting a call while inviting others may keep the call active

2 participants