Skip to content

feat(effects): design scoped effects, strict CSP nonces, and host compatibility (#13) - #178

Merged
prabothcharith merged 1 commit into
developmentfrom
feat/issue-13-scoped-effects-host-compat
Nov 4, 2026
Merged

prabothcharith merged 1 commit into
developmentfrom
feat/issue-13-scoped-effects-host-compat

Conversation

@prabothcharith

Copy link
Copy Markdown
Owner

Closes #13

Summary of Changes

  1. Scoped Effect Targeting (\�ffectScope):

    • Added \�ffectScope\ prop to \AccessibilityPlugin\ supporting CSS selector strings (e.g. #main-content), \HTMLElement, or React ref objects (\RefObject).
    • Restricts built-in typography and display effects strictly to the target container and its descendants, preventing style bleed onto host headers, sidebars, or navigation chrome.
    • Defaults to \document.body\ when omitted (100% backward compatible).
  2. Fixed-Descendant Filter Isolation:

    • When \�ffectScope\ targets a container, CSS filters (grayscale, invert, saturation) are applied directly to that container.
    • Completely protects external fixed elements (such as host headers, navbars, and banners) from filter containing-block and stacking-context positioning bugs.
  3. Open Shadow DOM Traversal:

    • Traversal engine now checks for and inspects open Shadow DOM roots (\mode === 'open'), allowing accessibility adaptations to reach Web Component internals.
    • Closed Shadow DOM roots remain isolated per W3C platform security specifications.
  4. Strict CSP Nonce Support (
    once)
    :

    • Added optional
      once\ prop to \AccessibilityPlugin.
    • Propagates
      once\ to dynamically injected <style>\ tags (\�rap-focus-highlight-style, \�rap-reduce-motion-style), enabling zero CSP violations in strict nonce-based environments.
  5. Documentation & Verification:

    • Added \docs/SCOPED_EFFECTS.md\ detailing container targeting, Shadow DOM traversal, iframe platform boundaries, and CSP recipes.
    • Updated \docs/API.md, \docs/ROADMAP.md, \docs/PROJECT_STATUS.md, and \CHANGELOG.md.
    • Added 11 unit tests in \ ests/scopedEffects.test.tsx\ and browser E2E test in \ ests/browser/widget.spec.ts.
    • Verified with full
      pm run validate\ (51 test files, 508 tests passing), \pack:check, \ est:consumers, and Playwright tests.

Copilot AI balanced review requested due to automatic review settings November 4, 2026 05:00
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-04T05:00:31.487869Z
We couldn’t complete this review. Comment @codex review to try again.
6ddabf7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@prabothcharith
prabothcharith merged commit b3cc74d into development Nov 4, 2026
4 checks passed
@prabothcharith
prabothcharith deleted the feat/issue-13-scoped-effects-host-compat branch November 4, 2026 05:06
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