Skip to content

fix(starter-pack): model fixes for migrated SAP SmartEdit content (DX-31800) - #35

Open
pritesh-jain-cstk wants to merge 3 commits into
mainfrom
fix/DX-31800-starter-pack-gaps
Open

pritesh-jain-cstk wants to merge 3 commits into
mainfrom
fix/DX-31800-starter-pack-gaps

Conversation

@pritesh-jain-cstk

@pritesh-jain-cstk pritesh-jain-cstk commented Nov 2, 2026 •

Copy link
Copy Markdown

What

Starter-pack model fixes so SAP SmartEdit content migrated into Contentstack lands in a model the connector actually reads (Jira DX-31800, epic DX-30753).

  1. Slots SAP's electronics homepage fills (ce60a19): landing_page.bottom_header_slot, landing_page.homepage_nav_link (+ HomepageNavLink in the slot map), and global_slots.footer accepts paragraph and flex blocks (SAP's copyright and consent blocks).
  2. One content-page type (af55fec): landing_page now also carries ContentPage1Template's body_content and side_content; the content_page type is removed. The page adapter resolves every per-route page against the single cmsPageContentType (resolvePageQuery; pageTypeMapping only serves shared product/category layouts), so content_page could never be read. ng add already sets cmsPageContentType: 'landing_page'; the README example now does too. The code default (cms_page) is unchanged so hand-wired installs are not affected.
  3. SAP source fields: every content type gets sap_uid and sap_catalog_version (text, not localized). The SAP SmartEdit migration fills them so a re-run updates the entries it created instead of importing duplicates (a second csdx import duplicates entries). Empty on content authored in Contentstack.
  4. csdx import files: the pack ships export-info.json (contentVersion: 2) and content_types/schema.json. Without them csdx 1.63+ reads the folder as the v1 layout and imports 0 entries; the pack's entries are already in the v2 layout.

Generated from generate-content-types.mjs as before; content-types.spec.ts checks every change and that the shipped files equal the generator output.

Not added, on purpose: a type for CMSImageComponent and a field for TopHeaderSlot. Spartacus 2211 has no CMS mapping for the first and no TopHeaderSlot in its layout, so neither renders on a Spartacus storefront (SAP's own TopHeaderSlot is empty on electronics-spa).

Testing

  • Unit tests: 191/191 (npm test), schematics 8/8, npm run typecheck clean, npm run lint 0 errors (54 existing warnings).
  • End to end on a new test stack (prod NA, 2026-11-03): SAP electronics-spa (5 pages, public OCC export) → shaper → this starter pack → csdx import + publish: 117/117 entries, 12/12 images. Reconciliation against SAP with the connector's normalizer: 5 pages, 85/85 checks, 0 CRITICAL. Evidence: contentstack/apps-workspace PR chore: update package-lock.json with dependency version upgrades #9, local-skills/sapcc/sapcc-smartedit-e2e/records/evidence/model-fix-20261103/.

Upgrade note

Stacks that imported an older starter pack keep their content_page type; it was never queried, so nothing they render changes. Add the new fields by re-importing the content types or editing them in the stack.

🤖 Generated with Claude Code

Re-verified 2026-11-05

Re-run on this PR's head by an independent verification pass (spot-checked by re-running). Only what was run is listed as verified.

Ran on head af55fec: lint (0 errors, 54 existing warnings), format:check, typecheck, test:all (Jest 191/191, schematics 8/8) and build, all exit 0. content-types.spec.ts checks the shipped content types equal the generator output. (npm ci needs the SAP registry token; an identical-lock install was reused.)

Recorded, not re-run: the 2026-11-03 run (117/117 entries, 12/12 images, reconciliation 5 pages 85/85, 0 CRITICAL; evidence in apps-workspace #9).

Not verified: csdx import with and without export-info.json and schema.json; storefront render after this change.

PriteshJain and others added 3 commits November 1, 2026 17:14
…t hold (DX-31800)

A SmartEdit migration of SAP's electronics homepage, checked slot by slot
against SAP with occFallback off, found three model gaps:

- landing_page and content_page had no bottom_header_slot (SAP puts the
  page title there); landing_page had no HomepageNavLink slot. Both fields
  added; homepage_nav_link added to SLOT_FIELD_TO_SAP_NAME.
- global_slots.footer only took navigation and links, so authoring the
  footer dropped SAP's copyright paragraph and consent flex blocks. It now
  also accepts cms_paragraph_component and cms_flex_component.

Functional shell components (search box, mini cart, site context) stay on
OCC as before: that is the hybrid design, not a gap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ort files (DX-31800)

- landing_page carries ContentPage1Template's body_content and side_content; the
  content_page type is removed. The page adapter resolves every per-route page
  against the single cmsPageContentType, so content_page was never read.
- Every content type gets sap_uid and sap_catalog_version (not localized) so a
  re-run of the SAP SmartEdit migration updates the entries it created.
- The pack ships export-info.json (contentVersion 2) and content_types/schema.json;
  without them csdx 1.63+ imports 0 entries.
- README example uses landing_page, like ng add.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pritesh-jain-cstk
pritesh-jain-cstk requested a review from a team as a code owner November 2, 2026 20:38
@snyk-io

snyk-io Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 1 25 ✅ Passed
🟡 Medium Severity 0 1 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 1
  • Medium without fixes: 1
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

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.

2 participants