feat(desktop-api): add openInBrowser to IRocketChatDesktop#40300
feat(desktop-api): add openInBrowser to IRocketChatDesktop#40300jeanfbrito wants to merge 1 commit intofeat/phishing-resistant-mfafrom
Conversation
Declare optional window.RocketChatDesktop.openInBrowser(url: string) method so frontend code can request the desktop app to open a URL in the user's native browser instead of inside the Electron webview. Optional modifier keeps older desktop-app versions type-compatible. Implemented in Rocket.Chat.Electron#3310.
|
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: fe93b00 The changes in this PR will be included in the next version bump. This PR includes changesets to release 42 packages
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 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). (3)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🧠 Learnings (5)📓 Common learnings📚 Learning: 2025-11-17T14:30:36.271ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-03-16T21:50:37.589ZApplied to files:
🔇 Additional comments (2)
WalkthroughAdds a new optional Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
Proposed changes
Declares an optional
openInBrowser(url: string): voidmethod onIRocketChatDesktopso the server frontend can ask the desktop (Electron) app to open a URL in the user's native browser instead of inside the Electron webview.Implemented on the desktop side in RocketChat/Rocket.Chat.Electron#3310 — the preload validates
http:/https:only and routes through the existingbrowserLauncher.openExternalpath so the user's selected-browser setting is honored.Optional modifier (
openInBrowser?) keeps older desktop-app versions type-compatible; frontend callers must null-check.Why this targets
feat/phishing-resistant-mfaPhishing-resistant MFA redirects users to external identity providers. When running inside the desktop app, those redirects should open in the system browser (so passkeys / platform authenticators resolve correctly) instead of the embedded webview.
This PR only declares the type so the MFA branch can begin using it in a follow-up commit — call-site integration is deliberately out of scope here.
Issue(s)
N/A — type-surface addition.
Steps to test or reproduce
yarn workspace @rocket.chat/desktop-api typecheckyarn changeset statusFurther comments
Changeset included. Depends on a
@rocket.chat/desktop-apipublish with this method before the MFA call site can compile without an any-cast, but the optional modifier means no consumer is forced to update immediately.Summary by CodeRabbit
New Features