Skip to content

Conversation

@aleksandernsilva
Copy link
Contributor

@aleksandernsilva aleksandernsilva commented Jun 2, 2025

Proposed changes (including videos or screenshots)

Google’s privacy changes (specifically storage partitioning) have affected how localStorage works across iframes and child windows. As a result, Livechat's popout mode lost access to shared state and became less reactive.

This PR is the first step toward restoring reactivity in popout mode. It initializes the popout window with the token, iframe data, and custom fields queue.

Future work will expand this logic to cover the rest of the Livechat internal state to fully restore reactivity to the popout mode.

Issue(s)

CTZ-156
CTZ-204

Steps to test or reproduce

⚠️ To be able to properly test this you must embed Livechat in a different origin.

  • Embed Livechat in a different origin
  • set custom field, department and/or theme data
window.RocketChat(function() {
   this.setTheme({ color: 'rebeccapurple' });
   this.setDepartment('departmentid');
   this.setCustomField('customfield', 'value')
})
  • Click "Expand chat" in the Livechat widget header
  • New window should open (popout) with the information pre-loaded

Further comments

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Jun 2, 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 Jun 2, 2025

⚠️ No Changeset found

Latest commit: 467297e

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

@aleksandernsilva aleksandernsilva force-pushed the fix/livechat-popout-reactivity branch from 1a8e8b1 to 28c77cc Compare June 2, 2025 17:44
@github-actions
Copy link
Contributor

github-actions bot commented Jun 2, 2025

PR Preview Action v1.6.1

🚀 View preview at
https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-36125/

Built to branch gh-pages at 2025-06-16 18:50 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@codecov
Copy link

codecov bot commented Jun 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.46%. Comparing base (9fd2be4) to head (467297e).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #36125      +/-   ##
===========================================
+ Coverage    63.96%   64.46%   +0.50%     
===========================================
  Files         3058     3138      +80     
  Lines       103632   104921    +1289     
  Branches     19471    19789     +318     
===========================================
+ Hits         66284    67638    +1354     
+ Misses       34728    34602     -126     
- Partials      2620     2681      +61     
Flag Coverage Δ
e2e 57.66% <ø> (+1.65%) ⬆️
unit 69.07% <ø> (+0.04%) ⬆️

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.

@aleksandernsilva aleksandernsilva changed the title fix: Livechat popout mode not syncing department and custom fields fix: Livechat popout not syncing department and custom fields Jun 2, 2025
@aleksandernsilva aleksandernsilva force-pushed the fix/livechat-popout-reactivity branch from 28c77cc to 3262f84 Compare June 2, 2025 21:38
@aleksandernsilva aleksandernsilva marked this pull request as ready for review June 4, 2025 13:22
@aleksandernsilva aleksandernsilva requested review from a team as code owners June 4, 2025 13:22
@aleksandernsilva aleksandernsilva added this to the 7.8.0 milestone Jun 4, 2025
@aleksandernsilva aleksandernsilva force-pushed the fix/livechat-popout-reactivity branch from 3262f84 to 95b655b Compare June 16, 2025 13:55
@KevLehman KevLehman added the stat: QA assured Means it has been tested and approved by a company insider label Jun 16, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Jun 16, 2025
@kodiakhq kodiakhq bot merged commit e6fb9cb into develop Jun 16, 2025
49 checks passed
@kodiakhq kodiakhq bot deleted the fix/livechat-popout-reactivity branch June 16, 2025 19:37
@scuciatto
Copy link
Member

/patch

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Jun 24, 2025

Pull request #36299 added to Project: "Patch 7.7.2"

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.

5 participants