Repository navigation
fix(discord): keep slash follow-ups ephemeral - #69869
Conversation
Greptile SummaryThis PR fixes a bug where Discord slash command follow-up chunks (e.g. long Confidence Score: 5/5Safe to merge — the fix is minimal, well-targeted, and all delivery paths now propagate the ephemeral flag consistently. All remaining notes are P2 or lower. The core logic change is correct: responseEphemeral is threaded through every followUp/reply code path in deliverDiscordInteractionReply, and the new test exercises the multi-chunk scenario directly. No regressions are introduced. No files require special attention. Reviews (1): Last reviewed commit: "docs(changelog): note Discord ephemeral ..." | Re-trigger Greptile |
There was a problem hiding this comment.
Pull request overview
Fixes Discord slash-command interaction delivery so chunked follow-up messages inherit the command’s ephemeral visibility policy, preventing long /status replies from leaking into public channels.
Changes:
- Thread
responseEphemeralthroughdispatchDiscordCommandInteractionand intodeliverDiscordInteractionReplyfor follow-ups. - Ensure follow-up chunks (including chunked text) include the resolved
ephemeralflag. - Add a regression unit test asserting multi-chunk direct
/statusfollow-ups remain ephemeral.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| extensions/discord/src/monitor/native-command.ts | Propagates an interaction-level ephemeral policy into follow-up delivery, including chunked follow-ups. |
| extensions/discord/src/monitor/native-command.status-direct.test.ts | Adds a unit test ensuring multi-chunk direct /status follow-ups remain ephemeral. |
| extensions/discord/src/monitor/native-command-ui.ts | Extends dispatch params to carry ephemeral policy for UI-triggered command arg interactions. |
| CHANGELOG.md | Documents the Discord ephemeral follow-up fix in Unreleased. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e61abcc32b
ℹ️ 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".
8a4bec5 to
fbe6595
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fbe6595266
ℹ️ 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".
|
Merged via squash.
Thanks @gumadeiras! |
Merged via squash. Prepared head SHA: 0f5ab77 Co-authored-by: gumadeiras <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Merged via squash. Prepared head SHA: 0f5ab77 Co-authored-by: gumadeiras <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Merged via squash. Prepared head SHA: 0f5ab77 Co-authored-by: gumadeiras <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Merged via squash. Prepared head SHA: 0f5ab77 Co-authored-by: gumadeiras <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Merged via squash. Prepared head SHA: 0f5ab77 Co-authored-by: gumadeiras <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Merged via squash. Prepared head SHA: 0f5ab77 Co-authored-by: gumadeiras <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Merged via squash. Prepared head SHA: 0f5ab77 Co-authored-by: gumadeiras <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Merged via squash. Prepared head SHA: 0f5ab77 Co-authored-by: gumadeiras <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Merged via squash. Prepared head SHA: 0f5ab77 Co-authored-by: gumadeiras <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Summary
Describe the problem and fix in 2–5 bullets:
/statusreplies could expose fallback model/runtime details publicly after the initial ephemeral response.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
deliverDiscordInteractionReplybuilt subsequentfollowUp()payloads without theephemeralflag./statuscoverage asserted the reply text but not visibility across chunked follow-ups./statuscan exceed Discord chunk limits when fallback models/runtime details are included.Regression Test Plan (if applicable)
extensions/discord/src/monitor/native-command.status-direct.test.ts/statusoutput sends multiple follow-ups, and every follow-up remains ephemeral./statustest covered dispatcher bypass but not chunk visibility.User-visible / Behavior Changes
Discord slash-command follow-up chunks now stay ephemeral when the command is configured for ephemeral replies.
Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
Steps
/statuswith enough status content to require multiple Discord follow-up messages.Expected
/statusfollow-up remains ephemeral.Actual
ephemeraland become public.Evidence
Attach at least one:
Regression coverage added in
native-command.status-direct.test.ts; local changed gate passes.Human Verification (required)
What you personally verified (not just CI), and how:
/statusoutput produces multiple follow-ups and all follow-up payloads containephemeral: true.Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations
ephemeralDefaultand preserves explicit overrides where call sites pass one.