-
Notifications
You must be signed in to change notification settings - Fork 13k
chore: Adds deprecation warning on livechat:sendTranscript
#36986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: b8fa5e7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 39 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 |
WalkthroughClient transcript sending was migrated from a Meteor method to a REST endpoint (/v1/livechat/transcript); the server method now logs a deprecation for Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant C as Client UI (QuickActions)
participant API as REST API /v1/livechat/transcript
participant S as Server Handler
U->>C: Request transcript (open modal / submit)
C->>API: POST /v1/livechat/transcript { token, rid, email, subject? }
API->>S: Validate payload & process
S-->>API: 200 OK / error
API-->>C: Response
C-->>U: Show success or error
Note over C,API: Replaces previous Meteor method call to `livechat:sendTranscript`
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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)
Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #36986 +/- ##
===========================================
- Coverage 67.12% 66.28% -0.85%
===========================================
Files 3404 3393 -11
Lines 117782 115448 -2334
Branches 21472 21280 -192
===========================================
- Hits 79061 76521 -2540
- Misses 36024 36314 +290
+ Partials 2697 2613 -84
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (3)
.changeset/unlucky-peas-wink.md (1)
6-6: Fix typo and endpoint reference in the changeset note.Spelling error and missing
/v1prefix; also align the note with the actual deprecation target.Apply this diff:
-Adds deprecation warning on `livechat:sendTranscript` with endpoint replacing it; `livechat/trasncript` +Adds deprecation warning on `livechat:sendTranscript`. Use the REST endpoint `POST /v1/livechat/transcript` instead.apps/meteor/client/views/room/Header/Omnichannel/QuickActions/hooks/useQuickActions.tsx (1)
114-115: Consider adding a success toast on send to mirror request flow.
handleRequestTranscriptshows a success toast;handleSendTranscriptcloses the modal silently. Add a success toast for consistency.apps/meteor/client/views/room/HeaderV2/Omnichannel/QuickActions/hooks/useQuickActions.tsx (1)
112-113: Add success toast for parity with other actions.Show a success toast after
sendTranscriptresolves to improve UX consistency.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (5)
.changeset/unlucky-peas-wink.md(1 hunks)apps/meteor/app/livechat/server/methods/sendTranscript.ts(2 hunks)apps/meteor/client/views/room/Header/Omnichannel/QuickActions/hooks/useQuickActions.tsx(1 hunks)apps/meteor/client/views/room/HeaderV2/Omnichannel/QuickActions/hooks/useQuickActions.tsx(1 hunks)packages/rest-typings/src/v1/omnichannel.ts(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
apps/meteor/client/views/room/Header/Omnichannel/QuickActions/hooks/useQuickActions.tsx (3)
apps/meteor/app/livechat/server/lib/sendTranscript.ts (1)
sendTranscript(31-218)packages/ui-contexts/src/index.ts (1)
useEndpoint(32-32)apps/meteor/app/livechat/server/methods/sendTranscript.ts (1)
token(20-45)
apps/meteor/client/views/room/HeaderV2/Omnichannel/QuickActions/hooks/useQuickActions.tsx (3)
apps/meteor/app/livechat/server/lib/sendTranscript.ts (1)
sendTranscript(31-218)packages/ui-contexts/src/index.ts (1)
useEndpoint(32-32)apps/meteor/app/livechat/server/methods/sendTranscript.ts (1)
token(20-45)
🔇 Additional comments (6)
.changeset/unlucky-peas-wink.md (1)
2-4: Patch bumps look fine.Patch releases for @rocket.chat/meteor and @rocket.chat/rest-typings are appropriate given the backwards‑compatible changes.
apps/meteor/app/livechat/server/methods/sendTranscript.ts (1)
9-9: Import added looks correct.
methodDeprecationLoggerimport path is consistent with other deprecation usages.packages/rest-typings/src/v1/omnichannel.ts (2)
2282-2286: Type updated to support subject is good.
subject?: stringmatches server behavior (treated as override when present).
2298-2304: Schema addition aligns with optional subject; confirm null acceptance is desired.
nullable: trueallowsnullbesides omission. Server falls back on falsy values, so this is likely fine; just confirm we want to accept explicitnull.apps/meteor/client/views/room/Header/Omnichannel/QuickActions/hooks/useQuickActions.tsx (1)
109-109: Good migration to REST.Switching to
useEndpoint('POST', '/v1/livechat/transcript')aligns with the new flow and typings.apps/meteor/client/views/room/HeaderV2/Omnichannel/QuickActions/hooks/useQuickActions.tsx (1)
107-107: Good migration to REST.Consistent with non‑V2 header and updated typings.
dougfabris
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On behalf of frontend, looks good
Co-authored-by: Kevin Aleman <kaleman960@gmail.com>
b8fa5e7
Proposed changes (including videos or screenshots)
This PR adds a deprecation warning for
livechat:sendTranscriptmeteor method, replacing its use for thelivechat/transcriptendpoint.Issue(s)
CTZ-68
Steps to test or reproduce
Further comments
Summary by CodeRabbit
New Features
Deprecations
Refactor
Chores