fix: bot user presence goes offline when updating a private app#40888
fix: bot user presence goes offline when updating a private app#40888abhinavkrin wants to merge 5 commits into
Conversation
Signed-off-by: Abhinav Kumar <abhinav@avitechlab.com>
Signed-off-by: Abhinav Kumar <abhinav@avitechlab.com>
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
🦋 Changeset detectedLatest commit: 96aea1c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🧠 Learnings (5)📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-05-06T12:21:44.083ZApplied to files:
📚 Learning: 2026-02-04T12:08:56.950ZApplied to files:
📚 Learning: 2026-03-16T11:50:11.087ZApplied to files:
🔇 Additional comments (2)
Walkthrough
ChangesApp Presence After Update Fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #40888 +/- ##
===========================================
+ Coverage 69.94% 70.13% +0.19%
===========================================
Files 3353 3355 +2
Lines 128812 129244 +432
Branches 22274 22403 +129
===========================================
+ Hits 90092 90648 +556
+ Misses 35431 35300 -131
- Partials 3289 3296 +7
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
| before((done) => getCredentials(done)); | ||
|
|
||
| before(async () => { | ||
| await cleanupApps(); |
There was a problem hiding this comment.
curious: instead of cleaning, can we check if the app is installed to avoid re-installing? 👀
| @@ -0,0 +1,5 @@ | |||
| --- | |||
| '@rocket.chat/apps': patch | |||
There was a problem hiding this comment.
should we include the @rocket.chat/meteor too?
|
just as a side suggestion, wouldn't it be better to create a more generic suite named |
d-gubert
left a comment
There was a problem hiding this comment.
Hey, have you tried this with multi instance? I think making the update silent will have a problematic effect in such setups.
I'll do some testing and check back here.
Proposed changes (including videos or screenshots)
During a private app update,
AppManager.update()callsdisable()before loading the new version. This disable was non-silent, causing it to invokedoAppStatusChanged→updateStatusByAppId, which set the bot user's presence toOffline. The subsequent re-enable path (updateAndStartupLocal) already passedsilenceStatus = true, so the bridge was never called again to restore the presence toOnline.The fix passes
silent = trueto thedisable()call insideupdate(), so the activation bridge is never triggered during the transient teardown step. The bot's presence is never touched during an update.Issue(s)
Steps to test or reproduce
Further comments
SUP-1054
Summary by CodeRabbit