From cf19f9b8c175743e214719bcbaeb9839e3591cf5 Mon Sep 17 00:00:00 2001 From: Austin Date: Thu, 24 Sep 2026 21:43:35 -0500 Subject: [PATCH 1/4] feat(ui): harden shadow boundary foundation Refs: YPE-5947 --- .changeset/safe-shadows-fallback.md | 5 + docs/shadow-dom-rollout-policy.md | 8 +- packages/ui/src/lib/shadow-isolation.tsx | 21 ++ packages/ui/src/lib/shadow-root-host.test.tsx | 345 +++++++++++++++++- packages/ui/src/lib/shadow-root-host.tsx | 15 +- 5 files changed, 388 insertions(+), 6 deletions(-) create mode 100644 .changeset/safe-shadows-fallback.md diff --git a/.changeset/safe-shadows-fallback.md b/.changeset/safe-shadows-fallback.md new file mode 100644 index 00000000..dee4ef12 --- /dev/null +++ b/.changeset/safe-shadows-fallback.md @@ -0,0 +1,5 @@ +--- +'@youversion/platform-react-ui': patch +--- + +Keep isolated UI content rendered with local styles when constructable stylesheet setup fails. diff --git a/docs/shadow-dom-rollout-policy.md b/docs/shadow-dom-rollout-policy.md index e24b2819..807aef1a 100644 --- a/docs/shadow-dom-rollout-policy.md +++ b/docs/shadow-dom-rollout-policy.md @@ -97,7 +97,7 @@ supported component contract. | Open roots are inspectable and mutable by same-page JavaScript | Accepted | Isolation is not a security boundary. | | Opening a peer popover dismisses the current peer across component roots | Accepted | Keep the single-active-peer behavior. Supporting concurrent peer popovers would require a demonstrated product journey and separate design. | | Nested-dialog and rapid-reopen final focus restoration | Accepted | Preserve the behavior resolved by YPE-5889/PR 414 as regression coverage rather than duplicating the implementation in rollout tickets. | -| Stylesheet construction or adoption can throw | Blocker | The foundation ticket must prove recovery to the local `