Skip to content

[AUTOMATED-PR] Update imslib.min.js dependency - #1

Open
github-actions[bot] wants to merge 1 commit into
stagefrom
update-imslib
Open

[AUTOMATED-PR] Update imslib.min.js dependency#1
github-actions[bot] wants to merge 1 commit into
stagefrom
update-imslib

Conversation

@github-actions

Copy link
Copy Markdown

Description

  Update ./libs/deps/imslib.min.js to the latest version
  
  ## Related Issue
  Resolves: NO TICKET - AUTOMATED CREATED PR.
  
  ## Testing instructions - IMS Libs
  1. Signing in should still function
  2. Signing out should still work
  3. Regression tests on all consumers

  ## Test URLs - IMS 
  **Acrobat:**
  - Before: https://www.stage.adobe.com/acrobat/online/sign-pdf.html?martech=off
  - After: https://www.stage.adobe.com/acrobat/online/sign-pdf.html?martech=off&milolibs=update-imslib--milo--adobecom

  **BACOM:**
  - Before: https://business.stage.adobe.com/fr/customer-success-stories.html?martech=off
  - After: https://business.stage.adobe.com/fr/customer-success-stories.html?martech=off&milolibs=update-imslib--milo--adobecom

  **CC:**
  - Before: https://main--cc--adobecom.hlx.live/?martech=off
  - After: https://main--cc--adobecom.hlx.live/?martech=off&milolibs=update-imslib--milo--adobecom

  **Homepage:**
  - Before: https://main--homepage--adobecom.hlx.page/homepage/index-loggedout?martech=off
  - After: https://main--homepage--adobecom.hlx.page/homepage/index-loggedout?martech=off&milolibs=update-imslib--milo--adobecom

  **Blog:**
  - Before: https://main--blog--adobecom.hlx.page/?martech=off
  - After: https://main--blog--adobecom.hlx.page/?martech=off&milolibs=update-imslib--milo--adobecom

  **Milo:**
  - Before: https://main--milo--adobecom.aem.page/ch_de/drafts/ramuntea/gnav-refactor?martech=off
  - After: https://update-imslib--milo--adobecom.aem.page/ch_de/drafts/ramuntea/gnav-refactor?martech=off

@aem-code-sync

aem-code-sync Bot commented Jun 27, 2025

Copy link
Copy Markdown

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

  • Re-run PSI checks
  • Re-sync branch
Commits

@aem-code-sync

aem-code-sync Bot commented Jun 27, 2025

Copy link
Copy Markdown

hkuraware pushed a commit that referenced this pull request May 13, 2026
Adds comprehensive end-to-end test coverage for the Floodgate for DA tool
(MWPW-189268) running against da.live with the da-floodgate branch.

What's included:
- Page Object Model with iframe + shadow DOM traversal (floodgate.page.js)
- 51 test cases across 7 suites: Page Load, Path Validation, Copy (Simple +
  Real Events), Content Integrity, Promote, Delete, Cancel/Retry, E2E
  Smoke Chain
- Real-content seed script that pulls 5 production event pages + their
  fragments into a sandbox at /drafts/nala-fg-test/
- DA login helper that saves a Playwright storageState for test reuse
- Self-healing test data hooks via DA admin API (ensureFileInFg) so
  delete tests don't break each other
- Byte-level source-vs-FG content comparator that normalizes URL rewrites
  and verifies CaaS-encoded payload preservation
- Full English TEST-PLAN.md with execution instructions and risk register

Test execution:
- 51 tests, 49 pass, 2 intentional skips, 0 failures
- ~7 min runtime at workers=1
- Verified Bugs #1 (runtime fragment discovery) and #2 (.link file
  handling) are now fixed in the da-floodgate branch

Auth setup:
- Run `node nala/utils/da-login.js` once to create auth.json (gitignored)
- Tests reuse the storageState; no credentials in code

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
hkuraware pushed a commit that referenced this pull request Aug 26, 2026
* Initial checkin.

* Styling update. Content scaffolding.

* Core HTML generation. Variables. Click Events.

* Icon height fix.

* Content overflow update.

* Update directory name. Minor CSS fix.

* Fix mep-overlay import path after mep-next rename

* Move preview-mas-subcollection to mep-next/mas-subcollection

Pure rename to preserve git history under the new mep-next/ structure. Import path updates follow in the next commit.

* Update imports for mas-subcollection move

* Remove empty mep-next.js placeholder

Clears the path so the upcoming `git mv preview.js → mep-next.js` will be detected as a rename rather than a modification.

* Move preview.js, .css, and .test to mep-next/

Pure rename to preserve full git history under mep-next/. The empty mep-next.js placeholder was removed in the prior commit so git detects this as a clean rename (100% similarity), not a modification. Import path updates follow in the next commit.

* Update imports for preview → mep-next move

Updates 5 external callers + the moved files' own relative paths after moving preview.js/.css/.test to libs/features/mep/mep-next/mep-next.{js,css,test.js}.

* Rename mas-subcollection → mep-mas-subcollection

* Update imports for mep-mas-subcollection rename

* Extract M@S code from mep-next.js into mep-mas.js

Splits the 466-line M@S section (MAS_OSI_SELECTOR, market detection, card action stacks, badge injection, content observer) module. mep-next.js shrinks from 1805 → 1340 lines.

* Extract CaaS code from mep-next.js into mep-caas.js

Extracts the 54-line CaaS section (CAAS_BADGE_CLASS, derivePathsForCards, injectCaasBadges, removeCaasBadges, caasObserver, watchForCaasBlocks, unwatchForCaasBlocks) into its own module. mep-next.js shrinks from 1340 → 1286 lines.

Preview-host rewrite helpers (PREVIEW_HOST_RE, BLOG_PATH_RE, PREVIEW_REPO_HOST_RE, rewriteForPreviewHost, rewriteBlogPreviewHost) stay in mep-next.js — they were physically adjacent to CaaS code but are shared utilities used by the popup logic elsewhere in the file.

Imports:
- mep-next.js: drops mepCaasConfigUrls (only used in CaaS); adds import block from ./mep-caas.js for the 4 identifiers still referenced (injectCaasBadges, removeCaasBadges, watchForCaasBlocks, unwatchForCaasBlocks)
- mep-caas.js: imports createTag from utils and mepCaasConfigUrls from caas/utils

Single commit so `git log -C --find-copies-harder mep-caas.js` traces provenance back through mep-next.js → preview.js.

Tests: no test file changes needed (no test references CaaS internals). mep-next (118), mep-mas-subcollection (34), and mmm tests all pass.

* Move preview-host rewrite functions to mep-caas.js

* Card expansions. Animations. Card generation json. CSS fixes.

* Radio buttons. Inputs. Animations. Style updates.

* Set default state to expanded.

* Nav spacing adjustment.

* Refactor. Summary card generation.

* Card data logic.

* Toggles, click event refactor.

* Manifest cards

* Cleanup refactor.

* CSS updates.

* Preview button manfiest logic.

* Overlay logic cleanup.

* Overlay folder restructure.

* Import fixes.

* Preview toggle. Expansion retainment. 7day MMM logic.

* M@S Card generation. Card data refactor.

* M@S and CaaS toggles.

* Highlight refactor. Default states WIP.

* Large cleanup refactor. Moved lables out of Json. Highlight logic updates.

* Highlight togles updates. Good working state.

* M@S mutation observer for summary values.

* Fragment highlight refactor and clicks.

* Spoof Geo toggles.

* Bug fixes. Default spoof geo WIP.

* Code cleanup

* Highlight CSS

* Gate mep-next overlay drawer on AEM Sidekick auth state

Adds sidekick-auth.js composable that walks nested shadow DOMs to detect env-switcher presence and notifies subscribers when auth resolves. Overlay shows a sign-in prompt when unauthed and swaps to the full drawer in-place (no close/reopen) when auth state changes mid-session.

* Login integration. Highlight fixes.

* Revert mep-hightlight updates. Check in commented code conflicts.

* Removed setHighlightData

* Re-add mep-next decoration.

* Update auth to async set default values.

* Revert M@S/CaaS changes. Add update counts.

* svg scaling fix.

* Spoof geo region_lang fix.

* Drawer positioning events. Minor CSS tweaks.

* Minor refactor. Fragment highlight count fixes.

* Refactor. Mepbutton=off fix. Fixed how the button is called.

* Typo, removed unnecessary check.

* Empasis text for labels. Page summary theme data. Remove unused SaveToMMM reference.

* Revert mep-next.js comments. Create duplicate initialization in mep-highlight. Update utils to replace mep next call.

* Highlight fix.

* Unit testing.

* Remove unused init.

* Removed duplicate function. Removed empty import.

* Fixed issue where mutation observer was being assigned multiple times.

* Combine duplicate M@S/CaaS observers.

* Minor observer update.

* Claude refactor for redundancies, performance issues and secuity issues.

* MWPW-198810[MEP] Port badge fix to mep-overlay-highlight.js

  adobecom#6181 (MWPW-198810) modified preview.js on stage. The stage merge
  auto-applied those changes to mep-next.js via git rename detection,
  but mep-next.js is no longer the production preview path — utils.js
  loads mep-overlay-* instead. This applies the same fix to the live
  overlay code:

  - setHighlightData: carry parent fragment data-path onto merch-card
    descendants so the badge text shows the actual path instead of
    "html"
  - setBadgeEventListeners: walk up to first non-static positioned
    ancestor when computing the badge hit area, so clicks on gnav
    promo badges (host is position:static) register correctly

  Tests: retargeted "respects a non-zero --badge-top-offset" to assert
  the new ::before top mechanism in the non-display:contents path.
  The display:contents path still uses --badge-top-offset and is
  covered by its own tests.

  Two notes on the message:
  - I kept the MWPW prefix even though the original ticket was already merged via adobecom#6181 — this is a follow-up that finishes the work in the new file layout, so it's still the
  same ticket.
  - Body explains the "why" (the merge missed the live path), not just the "what." This matters because anyone reading git blame years from now will see the port and wonder why
  it wasn't part of adobecom#6181 originally; the answer is "the new overlay didn't exist when adobecom#6181 landed."

* Unit test fixes.

* Fix init reference. Move and refactor badge positioning functions.

* Badge stacking fixes.

* [MEP] Address review: remove TEMP scaffolding, add drawer gate, bind observers

- Remove mock-auth URL param and console.log of auth state from
  checkAuthAndBuild
- Narrow auth gate envs from ['prod', 'stage'] to ['prod']
- Add drawer-open gate to setMasObserver callback (skip refresh work when
  drawer closed)
- Bind MutationObservers to variables in setMasObserver and the module-scope
  highlight observer so future teardown is possible

Addresses review comments 3439360609 (TEMP), 3463811758 (drawer gate + vaf binding),
  3439387563 / 3463849068 (observer hygiene).

* Covert variables from json to and object.

* Unit testing.

* Elevation fix.

* Dead code and old button removal refactor.

* Badge highlight hitbox fix.

* M@S item count fix. Comment removal.

* Mep-next.js coverage updates.

* add nala tests for new mep button

* Update Nala for new MEP

* Massive badge css refactor.

* Fix missing caas border.

* Badge wrap adjustments. M@S link hitbox fix. Convert dashed highlights to outlines.

* Rever Claude border to outline css change.

* Change 'uk' to 'gb'

* Alphabetize spoof select options.

* Badge width calculation logic.

* Restore legacy preview.js/.css as ?mepnext fallback for prod validation

Verbatim from stage plus TEMP headers. Inert until the toggle commit wires it in.

* Gate mep-next preview behind ?mepnext; default to legacy preview.js

loadDeferred + saveToMmm branch on ?mepnext (case-insensitive); mmm pinned to legacy preview.js.

* Require ?mepnext=on to enable mep-next preview

Switch from presence check to explicit ===on so ?mepnext=off (and any non-on value) falls back to legacy.

* Minor CSS fixes. Badge collision logic updates.

* Edit badge position fix (above content).

* MEP: sidekick-auth via /status GET instead of shadow-DOM probe

Replace the fragile nested-shadow-DOM probe (plugin-action-bar -> env-switcher)
with a re-queryable GET to admin.hlx.page/status. The extension injects its
token on that request (confirmed viable via tools/sk-status-probe); response
'profile' = authed. Project (owner/repo/ref) from the aem host label or the
Sidekick's public config (not its internal shadow DOM). Sidekick auth events
are only a re-check trigger, so login-after-load/logout work without depending
on a one-shot event payload. Auth stays orthogonal to the adobe.com session, so
logged-out preview is preserved. onSidekickAuth signature unchanged (drop-in);
tests rewritten. 105 pass.

* MEP: bounded retry on sidekick /status auth check

Initial auth resolve retries (immediate + 300ms + 900ms) while unauthed, but
ONLY when there's a resolvable project whose token might not be ready yet — no
project means nothing to wait for, so it resolves immediately (watchSidekick
still catches a Sidekick that mounts later). Rides out the extension not having
registered its request rules and transient admin blips without a reload. Common
authed case resolves on attempt 1 (one request). Bounded, never polls; no
false-flash.

* MEP: key sidekick-auth gate on host so ?env=stage can't bypass on prod

Gate now enforces when on a real prod host (via getConfig().prodDomains) or
when the resolved env is prod (so ?env=prod still enables testing on preview
hosts). Previously ?env=stage on a prod URL flipped env.name to stage and
bypassed the gate. Drops the now-unused envs option from onSidekickAuth and its
one call site in mep-overlay.js. 107 tests pass.

* MEP(nala): add mepnext=on to mep-next-button paths for the gated overlay

The mep-next overlay is gated behind ?mepnext=on (utils.js), so these tests
now navigate with mep&mepnext=on to load it instead of legacy preview.js.
TEMP — remove the param when the ?mepnext gate is dropped and mep-next is the
default preview.

* Rever bad positioning css.

* MEP(mas): scope card action stack to collection cards; per-element OST for standalone

Collection child cards keep the consolidated action stack (Edit Card / View in
OST / Copy Fragment ID), now rendered as a body-level overlay positioned over the
card — aem-fragment merch-cards are shadow-DOM hosts that don't project an
appended child, so the stack can't live inside the card.

Standalone merch-cards instead get per-element "View in OST" ::before badges
(re-enabled by scoping the content:none suppression to collection cards only),
deduped by OSI within an immediate parent so a price + legal inline-price pair
yields a single badge. Applied to mep-mas.js and legacy preview.js.

* MEP(nala): align mas highlight tests with the gated mep-next overlay

mep-next-button: the standalone merch-card no longer gets an Edit/OST/Copy
action stack (that stack is collection-only), so drop the stale Copy-badge
assertion and verify the current contract instead — mas highlight engages,
the card is recognized, and no action stack renders. TODO left to add a
dedicated collection page covering the stack.

promotions: @Promo-future and @Promo-preview open the .mep-fab overlay,
which is gated behind ?mepnext=on — add the param to those two paths (TEMP,
remove once mep-next is the default preview).

* MEP(nala): widen @mepnext0 badge timeouts for CI origin contention

Under CI (6 workers × 3 browsers against one shared aem.live preview) the
caas/mas highlight badges intermittently miss the 12s/30s budget on the
slower firefox/webkit workers. This appears to be network/origin contention,
not a code regression: a 6× CPU-throttled probe renders both badges ~10ms
after the toggle (throttle-invariant), and the caas injection code is a
verbatim port of stage's preview.js with no fetch/async.

Raise the badge toBeVisible checks to 20s and the test timeout to 60s.
Timeouts are ceilings, not sleeps, so green runs finish in the same ~5s and
this removes the current fail+retry churn.

* MEP(overlay): gate observers/listeners to active state, dedupe DOM scans

* MEP(overlay,auth): review fixes — XSS, host-authoritative auth gate, NALA host

- XSS (#1): render manifest-derived values via textContent instead of
  createTag's string-content arg (which routes through insertAdjacentHTML);
  scheme-allowlist + rel=noopener on hrefs (mep-overlay.js).
- Auth gate (#2): shouldGate is now host-authoritative and default-gated —
  only *.aem.page/*.hlx.page/*.aem.reviews/localhost run ungated; .aem.live,
  adobe.com and unknown hosts require Sidekick auth, and ?env can only tighten
  the gate, never re-open it. Extracted + exported isUngatedHost with tests.
- variantNames-undefined crash (adobecom#5) + null mepConfig guard (adobecom#7)
  in mep-overlay-logic.js.
- sidekick-auth: encodeURIComponent on /status path segments + AbortController
  timeout; documented profile-presence vs per-repo edit-access limitation (adobecom#9).
- Badge positioning: batch reads before writes to avoid per-element layout.
- window.open badge links: scheme-validate + noopener.
- NALA: pin the overlay tests to the .aem.page preview host (branch code still
  loads via milolibs) since the overlay now requires auth on the .aem.live edge.
- Tests: XSS-inert-render coverage for buildManifestCard; host-gate coverage.

* MEP(nala): derive .aem.page tier from baseURL instead of hardcoding host

The overlay tests must run on the ungated .aem.page tier (auth gate now blocks
.aem.live), but pr.run.sh sets baseURL to the branch's .aem.live host with empty
MILO_LIBS — so hardcoding main--…aem.page tested main's code, not the PR branch.
Keep the branch and swap the tier: baseURL.replace('.aem.live', '.aem.page').
Verified green against the branch preview: mep-next-button 9/9, promotions
@Promo-future/@Promo-preview 2/2 (chromium).

* commenting out test 9 because it uses m@s on stage

* MEP(mep-next): harden MMM popup — escape XSS sinks, guard variantNames, fix SVG

getManifestListDomAndParameter and getMepPopup interpolate author-controlled
manifest data into innerHTML strings. Escape every sink (escapeHtml for text,
new escapeAttr for attributes, safeUrl for the manifest href), guard the
variantNames.includes crash with an always-array, and fix the duplicated
<svg xmlns typo. Adds escapeAttr + getMepPopup XSS/guard/SVG test coverage.

* MEP(preview): harden popup twin — escape XSS sinks, guard variantNames, fix SVG

preview.js is what the MMM dashboard renders today (mmm.js imports getMepPopup
from here) until it is removed. Apply the same hardening as the mep-next.js twin:
escape every author-controlled sink in getManifestListDomAndParameter and
getMepPopup (escapeHtml for text, escapeAttr for attributes, safeUrl for the
manifest href), guard the variantNames.includes crash, and fix the duplicated
<svg xmlns typo. No test file — coverage lives in mep-next.test.js (this file's
git-mv descendant) and preview.js is slated for removal.

* MEP: document prune-time decisions for ?mepnext gate and parser dedup

Add a PRUNE note by parsePageAndUrl in mep-next.js flagging that the parser
trio is duplicated in mep-overlay-logic.js and a dedup choice is due when the
?mepnext gate is removed (shared config module; keep saveToMmm with getMepPopup).
Tighten the two gate comments to note the gate + toLowerCase() hack die with
preview.js removal.

* restore test 9. I added the mas.preview=off to all tests

---------

Co-authored-by: markpadbe <markp@adobe.com>
Co-authored-by: John Pratt <jpratt2@gmail.com>
Co-authored-by: cod23684 <cod23684@adobe.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant