Skip to content

Conversation

@d-gubert
Copy link
Member

@d-gubert d-gubert commented Sep 1, 2025

Proposed changes (including videos or screenshots)

This PR modifies the app slash command registration method to improve the lifecycle management of slash commands during app initialization, disabling, and purging operations.

Changes Overview

  1. Client-side Hook Updates (useAppSlashCommands.ts)

• Removed command/disabled from the event listener array - this prevents unnecessary command cleanup when apps are disabled, allowing commands to remain available during temporary app states

  1. App Manager Lifecycle Improvements (AppManager.ts)

• Moved command registration from app enabling to app initialization phase
• Modified app disabling process to preserve slash commands (keepSlashcommands: true)
• Only remove commands upon uninstalling

Issue(s)

Steps to test or reproduce

Further comments

ARCH-1787

@changeset-bot
Copy link

changeset-bot bot commented Sep 1, 2025

🦋 Changeset detected

Latest commit: f4dfac1

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

This PR includes changesets to release 40 packages
Name Type
@rocket.chat/apps-engine Patch
@rocket.chat/meteor Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/core-typings Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/rest-typings Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core 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

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Sep 1, 2025

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

@d-gubert d-gubert force-pushed the fix/apps-slashcommand-registration branch from c1a1ddc to 168aa7b Compare September 1, 2025 21:20
@codecov
Copy link

codecov bot commented Sep 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.24%. Comparing base (de54db1) to head (f4dfac1).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #36855      +/-   ##
===========================================
+ Coverage    66.17%   66.24%   +0.06%     
===========================================
  Files         3339     3340       +1     
  Lines       113419   113575     +156     
  Branches     21146    21157      +11     
===========================================
+ Hits         75059    75240     +181     
+ Misses       35676    35650      -26     
- Partials      2684     2685       +1     
Flag Coverage Δ
e2e 57.65% <0.00%> (-0.03%) ⬇️
unit 70.97% <100.00%> (+0.07%) ⬆️

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.

@d-gubert d-gubert force-pushed the fix/apps-slashcommand-registration branch 3 times, most recently from 761f228 to a3d96c0 Compare September 2, 2025 21:10
@d-gubert d-gubert marked this pull request as ready for review September 3, 2025 13:46
@d-gubert d-gubert requested review from a team as code owners September 3, 2025 13:46
@d-gubert d-gubert force-pushed the fix/apps-slashcommand-registration branch from 152a02e to 7f1e1f4 Compare September 3, 2025 13:47
@d-gubert d-gubert force-pushed the fix/apps-slashcommand-registration branch from 7f1e1f4 to 6004f51 Compare September 4, 2025 23:25
@d-gubert d-gubert force-pushed the fix/apps-slashcommand-registration branch from 6004f51 to f4dfac1 Compare September 5, 2025 14:27
@ggazzo ggazzo added this to the 7.11.0 milestone Sep 5, 2025
@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Sep 5, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Sep 5, 2025
@ggazzo ggazzo merged commit 3484c1f into develop Sep 5, 2025
50 checks passed
@ggazzo ggazzo deleted the fix/apps-slashcommand-registration branch September 5, 2025 20:23
@ggazzo ggazzo removed the stat: ready to merge PR tested and approved waiting for merge label Sep 5, 2025
@scuciatto
Copy link
Member

/patch

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Sep 22, 2025

Pull request #37028 added to Project: "Patch 7.10.1"

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants