Skip to content

feat: add page context helper for custom URL handling in Visual Builder#605

Merged
kirtesh-cstk merged 4 commits into
develop_v4from
feat-add-page-context-helper-for-custom-url
Jun 9, 2026
Merged

feat: add page context helper for custom URL handling in Visual Builder#605
kirtesh-cstk merged 4 commits into
develop_v4from
feat-add-page-context-helper-for-custom-url

Conversation

@kirtesh-cstk

Copy link
Copy Markdown
Contributor

No description provided.

@kirtesh-cstk kirtesh-cstk requested review from a team as code owners June 8, 2026 14:20
@github-actions

github-actions Bot commented Jun 8, 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 0 25 ✅ Passed
🟡 Medium Severity 0 0 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

✅ BUILD PASSED - All security checks passed

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 67.02% 2508 / 3742
🔵 Statements 65.9% 2548 / 3866
🔵 Functions 64.32% 449 / 698
🔵 Branches 61.35% 1513 / 2466
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/configManager/config.default.ts 66.66% 100% 66.66% 66.66% 99
src/preview/contentstack-live-preview-HOC.ts 94.11% 86.2% 100% 94.11% 81, 245-249
src/types/types.ts 100% 100% 100% 100%
src/visualBuilder/index.ts 53.38% 26.76% 31.25% 53.38% 113-116, 121-130, 136-206, 214-247, 257-278, 335-337, 341, 395-398, 103-109
src/visualBuilder/utils/getVisualBuilderRedirectionUrl.ts 92% 85.71% 100% 92% 43, 46
src/visualBuilder/utils/resolvePageContext.ts 100% 100% 100% 100%
Generated in workflow #837 for commit 66a7802 by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Jun 8, 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 0 25 ✅ Passed
🟡 Medium Severity 0 0 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

✅ BUILD PASSED - All security checks passed

@hitesh-shetty-cstk hitesh-shetty-cstk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!!

Comment on lines +277 to +282
visualBuilderPostMessage?.send<IPageContextPostMessageEvent>(
VisualBuilderPostMessageEvents.PAGE_CONTEXT,
{ entryUid: context.entryUid, contentTypeUid: context.contentTypeUid }
);
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add catch if postMessage fail here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes have addressed this in latest commit

Address PR review feedback: the visualBuilderPostMessage send in
setPageContext was fire-and-forget, so a rejected promise would surface
as an unhandled rejection. Add a .catch that logs the failure via
PublicLogger.error.

Also add setPageContext test coverage for the Config write, the
in-iframe send, the non-iframe skip, and the new send-failure path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 9, 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 0 25 ✅ Passed
🟡 Medium Severity 0 0 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

✅ BUILD PASSED - All security checks passed

@kirtesh-cstk kirtesh-cstk merged commit 8225388 into develop_v4 Jun 9, 2026
9 checks passed
@kirtesh-cstk kirtesh-cstk deleted the feat-add-page-context-helper-for-custom-url branch June 9, 2026 06:41
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