Skip to content

Conversation

wenxi-onyx
Copy link
Member

@wenxi-onyx wenxi-onyx commented Aug 5, 2025

Description

  • /onyxbot should respond in ephemeral message, but instead sends to channel

How Has This Been Tested?

locally

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)
  • [Optional] Override Linear Check

@wenxi-onyx wenxi-onyx requested a review from a team as a code owner August 5, 2025 03:13
Copy link

vercel bot commented Aug 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 5, 2025 6:42pm

@wenxi-onyx wenxi-onyx changed the title fix slash command slackbot to respond in private msg fix: slash command slackbot to respond in private msg Aug 5, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR fixes the Slack bot's slash command behavior to send responses as ephemeral (private) messages by default. The change modifies the logic in handle_regular_answer.py that determines when Slack bot responses should be ephemeral.

The key change is in the send_as_ephemeral condition, which previously used AND logic requiring both channel configuration AND bot message status. Now it uses OR logic, meaning slash commands (/onyx) will always trigger ephemeral responses unless it's a direct message to the bot.

This aligns with standard Slack UX patterns where slash command responses are typically private to the invoking user rather than visible to the entire channel. The change preserves the exception for direct messages since DMs are already private by nature. The modification integrates with the existing Slack bot infrastructure that uses the SlackMessageInfo model to track message metadata including the is_bot_msg flag that identifies slash command usage.

Confidence score: 4/5

  • This PR is safe to merge with minimal risk as it's a targeted UX improvement for slash commands
  • Score reflects a simple logical change with clear intent and preserved existing behavior for edge cases
  • No files require special attention as the change is isolated to a single conditional statement

1 file reviewed, no comments

Edit Code Review Bot Settings | Greptile

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

cubic analysis

No issues found across 1 file. Review in cubic

@Weves Weves enabled auto-merge August 5, 2025 19:11
@Weves Weves added this pull request to the merge queue Aug 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 5, 2025
@Weves Weves merged commit 1b2f4f3 into main Aug 6, 2025
17 checks passed
@Weves Weves deleted the bugfix/slash_slackbot_ephemeral_msg branch August 6, 2025 02:03
wenxi-onyx added a commit that referenced this pull request Aug 11, 2025
* fix slash command slackbot to respond in private msg

* rename confusing variable. fix slash message response in DMs
AnkitTukatek pushed a commit to TukaTek/onyx that referenced this pull request Sep 23, 2025
)

* fix slash command slackbot to respond in private msg

* rename confusing variable. fix slash message response in DMs
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.

2 participants