Skip to content

Conversation

@lucas-a-pelegrino
Copy link
Member

@lucas-a-pelegrino lucas-a-pelegrino commented Dec 10, 2025

Proposed changes (including videos or screenshots)

This PR replaces the use of the legacy method; livechat:saveCustomFields in the api test helper functions.

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Refactor
    • Updated livechat custom field API integration to enhance maintainability while preserving existing functionality.

✏️ Tip: You can customize this high-level summary in your review settings.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 10, 2025

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

@changeset-bot
Copy link

changeset-bot bot commented Dec 10, 2025

⚠️ No Changeset found

Latest commit: 7faafdf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 10, 2025

Walkthrough

The test file for livechat custom-fields is updated to migrate from a deprecated JSON-RPC methodCall to a REST API endpoint. The call now uses POST to livechat/custom-fields.save with a restructured payload and updated response handling logic.

Changes

Cohort / File(s) Change Summary
Livechat Custom-Fields Test Migration
apps/meteor/tests/data/livechat/custom-fields.ts
Replaces methodCall with REST POST request to livechat/custom-fields.save. Updates payload structure to include customFieldId and customFieldData. Changes response handling to resolve from res.body.customField instead of res.body. Removes unused methodCall import.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Straightforward test migration with a single file affected
  • REST API call pattern is standard and easily verifiable
  • Payload and response handling changes are minimal and localized

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • ggazzo
  • juliajforesti

Poem

🐰 A hop and a skip from the old methodCall way,
REST endpoints now handle the custom fields' day,
The payload's been restructured with care and with grace,
No Meteor methods—just REST in its place! ✨

Pre-merge checks and finishing touches

✅ 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 accurately reflects the main change: replacing a legacy livechat method with a new endpoint in test helpers.
Linked Issues check ✅ Passed The linked issue CORE-1457 provides minimal context with only a title; code changes to replace the legacy livechat:saveCustomField method align with modernization objectives.
Out of Scope Changes check ✅ Passed All changes are scoped to updating test helper files to use the new REST API endpoint instead of the legacy method; no unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/CTZ-64

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 and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2025

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.2GiB 1.2GiB +12MiB
rocketchat 360MiB 349MiB +12MiB
omnichannel-transcript-service 132MiB 132MiB +1.2KiB
queue-worker-service 132MiB 132MiB -614B
ddp-streamer-service 126MiB 126MiB +1010B
account-service 113MiB 113MiB +986B
stream-hub-service 111MiB 111MiB +533B
presence-service 111MiB 111MiB +228B
authorization-service 111MiB 111MiB -280B

📊 Historical Trend

---
config:
  theme: "dark"
  xyChart:
    width: 900
    height: 400
---
xychart
  title "Image Size Evolution by Service (Last 30 Days + This PR)"
  x-axis ["11/15 22:28", "11/16 01:28", "11/17 23:50", "11/18 22:53", "11/19 23:02", "11/21 16:49", "11/24 17:34", "11/27 22:32", "11/28 19:05", "12/01 23:01", "12/02 21:57", "12/03 21:00", "12/04 18:17", "12/05 21:56", "12/08 20:15", "12/09 22:17", "12/10 19:56", "12/10 22:03 (PR)"]
  y-axis "Size (GB)" 0 --> 0.5
  line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "queue-worker-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "rocketchat" [0.36, 0.36, 0.35, 0.35, 0.35, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.35]
  line "stream-hub-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
Loading

Statistics (last 17 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.2GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 1.2GiB
ℹ️ About this report

This report compares Docker image sizes from this build against the develop baseline.

  • Tag: pr-37767
  • Baseline: develop
  • Timestamp: 2025-12-10 22:03:33 UTC
  • Historical data points: 17

Updated: Wed, 10 Dec 2025 22:03:34 GMT

@lucas-a-pelegrino lucas-a-pelegrino added this to the 7.14.0 milestone Dec 10, 2025
@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.71%. Comparing base (095fcc0) to head (7faafdf).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37767      +/-   ##
===========================================
- Coverage    67.78%   67.71%   -0.08%     
===========================================
  Files         3452     3452              
  Lines       113975   113975              
  Branches     20940    20940              
===========================================
- Hits         77262    77174      -88     
- Misses       34580    34673      +93     
+ Partials      2133     2128       -5     
Flag Coverage Δ
e2e 57.30% <ø> (+0.03%) ⬆️
e2e-api 42.29% <ø> (-1.00%) ⬇️

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.

@lucas-a-pelegrino lucas-a-pelegrino marked this pull request as ready for review December 11, 2025 00:14
@lucas-a-pelegrino lucas-a-pelegrino added stat: ready to merge PR tested and approved waiting for merge stat: QA assured Means it has been tested and approved by a company insider labels Dec 11, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/meteor/tests/data/livechat/custom-fields.ts (1)

25-27: Consider aligning callback return type with implementation.

The callback is typed as returning void but uses return reject(err) for early exit. While this is a common JavaScript pattern, you can either remove the explicit : void annotation or remove the return keyword to satisfy the type checker.

Based on static analysis hints.

📜 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.

📥 Commits

Reviewing files that changed from the base of the PR and between ddf6717 and 7faafdf.

📒 Files selected for processing (1)
  • apps/meteor/tests/data/livechat/custom-fields.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/tests/data/livechat/custom-fields.ts
🧬 Code graph analysis (1)
apps/meteor/tests/data/livechat/custom-fields.ts (1)
apps/meteor/tests/data/api-data.ts (1)
  • credentials (39-42)
🪛 Biome (2.1.2)
apps/meteor/tests/data/livechat/custom-fields.ts

[error] 27-27: The function should not return a value because its return type is void.

The function is here:

'void' signals the absence of value. The returned value is likely to be ignored by the caller.

(lint/correctness/noVoidTypeReturn)

🔇 Additional comments (2)
apps/meteor/tests/data/livechat/custom-fields.ts (2)

4-4: LGTM: Import changes align with API migration.

The updated imports correctly reflect the shift from JSON-RPC style methodCall to REST API calls.


22-29: The endpoint migration is correct. The REST endpoint POST /livechat/custom-fields.save accepts the payload structure { customFieldId: null, customFieldData: customField } as confirmed by the endpoint definition, and returns the response with customField nested in the body as { success: true, customField: ... }. This migration aligns with the deprecated Meteor method livechat:saveCustomField and is consistently used across the codebase.

@ggazzo ggazzo merged commit 4182a7b into develop Dec 11, 2025
91 of 93 checks passed
@ggazzo ggazzo deleted the chore/CTZ-64 branch December 11, 2025 00:58
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants