Skip to content

fix: Clear composer on slash command execution - #41914

Open
yash-rajpal wants to merge 4 commits into
developfrom
fix/slashcommand-clear-composer
Open

fix: Clear composer on slash command execution#41914
yash-rajpal wants to merge 4 commits into
developfrom
fix/slashcommand-clear-composer

Conversation

@yash-rajpal

@yash-rajpal yash-rajpal commented Aug 24, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Message composer wasn't being always cleared after some slash command execution, this fixes it.

Issue(s)

Steps to test or reproduce

  • Open a room
  • Try any client side slash commands like shrug or gimme
  • It should execute the slash command but doesn't clear the message composer

Further comments

CORE-2364

Review in cubic

Summary by CodeRabbit

  • Bug Fixes

    • The message composer now clears after slash commands, including client-only, unrecognized, and unauthorized commands.
    • Previously entered command text no longer remains in the composer after the command is processed, helping prevent accidental reuse or confusion.
    • This behavior is now consistently applied across supported slash-command outcomes.
  • Release

    • Included in a patch release.

@dionisio-bot

dionisio-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c17eb31

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@yash-rajpal
yash-rajpal marked this pull request as ready for review August 24, 2026 20:02
@yash-rajpal
yash-rajpal requested a review from a team as a code owner August 24, 2026 20:02
@coderabbitai

coderabbitai Bot commented Aug 24, 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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ac0acfd5-c53d-4fab-81f0-aa380621d0ab

📥 Commits

Reviewing files that changed from the base of the PR and between 2162306 and c17eb31.

📒 Files selected for processing (3)
  • .changeset/tired-camels-bow.md
  • apps/meteor/client/lib/chats/flows/processSlashCommand.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • .changeset/tired-camels-bow.md
  • apps/meteor/client/lib/chats/flows/processSlashCommand.ts

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

📜 Recent review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: Hacktron Security Check
  • GitHub Check: CodeQL-Build

Walkthrough

The slash command flow now clears the message composer for client-only, unrecognized, and permission-denied commands. End-to-end tests cover client-only and unrecognized commands. A patch changeset records the update.

Changes

Slash command composer behavior

Layer / File(s) Summary
Clear composer in slash command flow
apps/meteor/client/lib/chats/flows/processSlashCommand.ts
The flow clears the composer before unrecognized and permission-denied warnings and before client-only command execution.
Validate and release composer behavior
apps/meteor/tests/e2e/message-composer.spec.ts, .changeset/tired-camels-bow.md
End-to-end tests verify clearing after /shrug and an unrecognized slash command. A patch changeset records the update.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to c17eb

This PR clears the message composer after client-side slash commands, with focused test coverage and no actionable merge-blocking risk remaining beyond normal checks and review.

Suggested labels: type: bug

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: clearing the composer after slash command execution.
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 files. (1 skipped: 1 unsupported.)
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Warning

Errors were encountered while retrieving linked issues.

Errors (1)
  • CORE-2364: Request failed with status code 401

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.

@yash-rajpal yash-rajpal added this to the 8.9.0 milestone Aug 24, 2026
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 69.35%. Comparing base (46f19eb) to head (c17eb31).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #41914      +/-   ##
===========================================
+ Coverage    69.33%   69.35%   +0.01%     
===========================================
  Files         4255     4255              
  Lines       168644   168648       +4     
  Branches     30023    30046      +23     
===========================================
+ Hits        116930   116966      +36     
+ Misses       46539    46501      -38     
- Partials      5175     5181       +6     
Flag Coverage Δ
e2e 58.86% <66.66%> (+0.08%) ⬆️
e2e-api 46.14% <ø> (+0.26%) ⬆️
unit 71.25% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rc-layne

rc-layne Bot commented Aug 24, 2026

Copy link
Copy Markdown

⚠️ Layne — scan incomplete

Layne could not analyze all changed content. Review the Check Run summary before merging.

@tassoevan tassoevan added the stat: QA assured Means it has been tested and approved by a company insider label Aug 24, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Aug 24, 2026
@dionisio-bot
dionisio-bot Bot added this pull request to the merge queue Aug 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge type: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants