Skip to content

MWPW-199051 [MEP] Save results of Rainfocus API to config.mep#6200

Open
vgoodric wants to merge 15 commits into
stagefrom
mepeventssavedata
Open

MWPW-199051 [MEP] Save results of Rainfocus API to config.mep#6200
vgoodric wants to merge 15 commits into
stagefrom
mepeventssavedata

Conversation

@vgoodric

@vgoodric vgoodric commented Jun 18, 2026

Copy link
Copy Markdown
Contributor
  • Updated the event initialization function to store fetched event details in the configuration object. This change enhances the management of event data and ensures that registration status can be accessed from the config.
  • Added a corresponding test to verify the new behavior.

Resolves: MWPW-199051

Test URLs:

Update — event-code + Milo-page registration

  • Fix the registered audience to match on event?.isRegistered rather than the presence of a resolved event
  • Switch the addon and loadMepAddons from event-id to event-code — the addon keys
    on the event property code (e.g. max2025), not the per-event UUID.
  • Fix registration on Milo pages: read enablement from lowercase DA metadata
    (signedin/userid) as well as camelCase, fail open to IMS getProfile() when no
    userId meta is present, and guard loadIms()/getProfile() so a missing IMS session
    can no longer blank the page.

Update — persistent registration cache

  • Add a persistent localStorage cache (registered 24h / not-registered 3 min, mirroring
    FEDS cacheTime), keyed by event-code + userId. Persists only
    { isRegistered, inPersonAttendee } — never the RF authToken/userKey.
  • Normalize Rainfocus's empty {} response to { isRegistered: false }.
  • Redirect-cookie cache invalidation is committed but gated off behind
    REDIRECT_INVALIDATION_ENABLED, pending confirmation of the cookie name/domain (see
    ticket comment). Cache self-heals via the 3-min TTL until then.

… config

Updated the event initialization function to store fetched event details in the configuration object. This change enhances the management of event data and ensures that registration status can be accessed from the config. Added a corresponding test to verify the new behavior.
@aem-code-sync

aem-code-sync Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-sync branch
Commits

…ties

Updated the personalization initialization function to ensure that existing MEPS properties are preserved when setting new values. This change improves the configuration management for personalization features.
@vgoodric
vgoodric requested a review from a team as a code owner June 18, 2026 19:41
@aem-code-sync
aem-code-sync Bot temporarily deployed to mepeventssavedata June 18, 2026 19:41 Inactive
@github-actions

Copy link
Copy Markdown
Contributor

This pull request is not passing all required checks. Please see this discussion for information on how to get all checks passing. Inconsistent checks can be manually retried. If a test absolutely can not pass for a good reason, please add a comment with an explanation to the PR.

Comment thread libs/features/personalization/personalization.js
Updated the event initialization function to return an object containing the registration status instead of a boolean. This change improves the clarity of the returned data and ensures that event details are consistently managed. Adjusted related personalization logic to utilize the new structure. Updated tests to reflect these changes.
@aem-code-sync
aem-code-sync Bot temporarily deployed to mepeventssavedata June 22, 2026 16:51 Inactive
Eliminated the spread operator from the MEPS configuration update in the personalization initialization function. This change simplifies the code while maintaining the integrity of the existing configuration properties.
@aem-code-sync
aem-code-sync Bot temporarily deployed to mepeventssavedata June 22, 2026 16:52 Inactive
vgoodric added 3 commits June 22, 2026 12:16
…alues

Refactored the event test cases to check the 'isRegistered' property of the event object instead of directly comparing the event to boolean values. This change aligns the tests with the updated event initialization function that returns a structured object, enhancing clarity and consistency in test assertions.
Updated the event handling functions to return a default object instead of an empty object when user ID or access token is unavailable. This change improves consistency in the returned data structure and enhances error handling. Adjusted related logic to utilize the new default return value.
@aem-code-sync
aem-code-sync Bot temporarily deployed to mepeventssavedata June 22, 2026 20:18 Inactive
…on check

Updated the getPersonalizationVariant function to simplify the condition for checking user registration status. Removed unnecessary assignment of event details to the config object, enhancing code clarity and efficiency. Adjusted the initialization of event details in the config to ensure proper handling of promises.
Comment thread libs/features/personalization/personalization.js Outdated
@aem-code-sync
aem-code-sync Bot temporarily deployed to mepeventssavedata June 23, 2026 16:13 Inactive
@aem-code-sync
aem-code-sync Bot temporarily deployed to mepeventssavedata June 23, 2026 16:17 Inactive
@markpadbe
markpadbe self-requested a review June 23, 2026 16:38
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

This PR has not been updated recently and will be closed in 7 days if no action is taken. Please ensure all checks are passing, https://github.com/orgs/adobecom/discussions/997 provides instructions. If the PR is ready to be merged, please mark it with the "Ready for Stage" label.

@github-actions github-actions Bot added the Stale label Jul 1, 2026
@aem-code-sync
aem-code-sync Bot temporarily deployed to mepeventssavedata July 8, 2026 01:27 Inactive
@github-actions github-actions Bot removed the Stale label Jul 8, 2026
Event registration never triggered on Milo pages for two compounding
reasons, plus an unhandled-rejection bug:

- Casing: getMepEnablement read camelCase keys (signedIn/userId) but DA
  emits metadata names lowercase, so authored values never matched. Now
  falls back to the lowercase key while keeping URL params working.
- userId gate assumed a Dexter-only SSR sentinel (userId="undefined")
  that Milo never emits, so a signed-in user with no userId meta hit
  `false !== 'undefined'` and returned false, never loading IMS. The
  gate now fails open to loadIms()/getProfile() to resolve the userId.
- getProfile() rejections (e.g. no live IMS session) were unhandled and
  propagated through init(), blanking the page. Now caught -> not
  registered, page still renders.
@aem-code-sync
aem-code-sync Bot temporarily deployed to mepeventssavedata July 10, 2026 02:48 Inactive
@github-actions

Copy link
Copy Markdown
Contributor

This PR has not been updated recently and will be closed in 7 days if no action is taken. Please ensure all checks are passing, https://github.com/orgs/adobecom/discussions/997 provides instructions. If the PR is ready to be merged, please mark it with the "Ready for Stage" label.

@github-actions github-actions Bot added the Stale label Jul 17, 2026
Add a persistent localStorage cache to the event addon, keyed by
event-code + userId, storing only { isRegistered, inPersonAttendee } —
never the RF authToken/userKey. Registered results cache 24h,
unregistered 3 min, mirroring the FEDS cacheTime model.

Normalize RF's empty {} response to { isRegistered: false }.

Redirect-cookie cache invalidation is implemented but gated off behind
REDIRECT_INVALIDATION_ENABLED pending VEAL confirmation of the cookie
name and domain.

Rename eventId -> eventCode throughout for accuracy.
@aem-code-sync
aem-code-sync Bot temporarily deployed to mepeventssavedata July 21, 2026 01:39 Inactive
@markpadbe
markpadbe self-requested a review July 21, 2026 01:52
…W-199051)

Document at the code site that clearRegisteredFlag must set a matching
domain= when the invalidation branch is enabled — a host-only delete
won't clear a .adobe.com cookie, which would leave the flag stuck.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants