Skip to content

fix(adapters/slack): treat a bare reset as /reset - #3181

Open
Mora140 wants to merge 1 commit into
coleam00:devfrom
Mora140:fix/slack-bare-reset
Open

Mora140 wants to merge 1 commit into
coleam00:devfrom
Mora140:fix/slack-bare-reset

Conversation

@Mora140

@Mora140 Mora140 commented Sep 3, 2026

Copy link
Copy Markdown

Slack intercepts /reset as a workspace slash command, so the bot never sees that text. Map a bare reset (exact match, case-insensitive, after mention/URL strip) to /reset in the Slack adapter only.

Fixes #2198

Summary by CodeRabbit

  • Bug Fixes
    • Slack now correctly interprets a standalone “reset” command, regardless of capitalization, as /reset.
    • Existing /reset commands and longer messages such as “reset please” remain unchanged.

Slack intercepts /reset as a workspace slash command, so the text never
reaches the bot. Map an exact, case-insensitive reset message to /reset
in the Slack adapter only.
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 4407fd0c-93f2-4017-a739-eeb1d6912542

📥 Commits

Reviewing files that changed from the base of the PR and between 4d48a03 and 105f87a.

📒 Files selected for processing (2)
  • packages/adapters/src/chat/slack/adapter.test.ts
  • packages/adapters/src/chat/slack/adapter.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Slack reset handling

Layer / File(s) Summary
Normalize bare reset messages
packages/adapters/src/chat/slack/adapter.ts, packages/adapters/src/chat/slack/adapter.test.ts
stripBotMention converts bare reset messages to /reset without changing /reset or longer text. Tests cover case-insensitive input and bot mentions.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 105f8

Slack now converts an exact case-insensitive bare "reset" message into "/reset", while slash-prefixed and longer messages remain unchanged. The targeted behavior is covered and no merge-blocking risk remains.

Suggested reviewers: wirasm

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the problem, intended behavior, Slack-only scope, and linked issue, but it omits the required Review guidance, Solution, and Validation sections. Add the required sections with reviewer focus and start location, implementation details, actual test commands and results, remaining verification gaps, and any applicable behavior or delivery considerations.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: treating a bare Slack reset message as /reset.
Linked Issues check ✅ Passed The changes satisfy issue #2198. They normalize only an exact, case-insensitive bare reset after Slack mention/URL stripping, map it to /reset, and limit the behavior to the Slack adapter. The add…
Out of Scope Changes check ✅ Passed The changes are limited to the Slack adapter and its tests. They directly support the linked issue objectives and do not introduce unrelated behavior or modifications to other adapters.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Full details: Linked Issues check

Explanation

The changes satisfy issue #2198. They normalize only an exact, case-insensitive bare reset after Slack mention/URL stripping, map it to /reset, and limit the behavior to the Slack adapter. The added tests cover the required cases.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

feat(adapters/slack): accept bare 'reset' — Slack intercepts /reset as a workspace slash command

1 participant