feat(ui): harden Shadow DOM rollout foundation (YPE-5947) - #424
Merged
abharms merged 4 commits intoSep 26, 2026
Merged
Conversation
🦋 Changeset detectedLatest commit: b34f08f The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Base automatically changed from
ype-5356-shadow-dom-rollout-plan
to
journey-to-the-shadow-dom
September 25, 2026 19:06
abharms
force-pushed
the
ype-5947-shadow-dom-foundation
branch
from
September 25, 2026 19:11
4fd0bca to
b34f08f
Compare
bmanquen
approved these changes
Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Targets
ype-5356-shadow-dom-rollout-plan, the branch from PR #423 that establishes the rollout policy this foundation implements.<style>without losing rendered contentRequirement evidence
ReuseShadowBoundarymarks one SDK-owned child boundary for reuse and resets ownership before rendering consumer descendants.CSSStyleSheetconstruction,replaceSync, andadoptedStyleSheetsassignment failures; content remains rendered and local fallback CSS is installed without throwing.Review scope
Required outcomes:
Permitted support work:
Non-goals:
Please treat a finding as blocking only when it identifies an unmet in-scope requirement, a documented repository-standard violation in added or modified code, or a concrete regression or defect caused or worsened by this diff. Label other valid improvements as non-blocking follow-ups.
Verification
pnpm --filter @youversion/platform-react-ui exec vitest run packages/ui/src/lib/shadow-root-host.test.tsx— 10/10 passedpnpm --filter @youversion/platform-react-ui typecheck— passedpnpm lint— passedpnpm build— passedpnpm test— passed: core 476 passed / 2 skipped, hooks 315 passed, UI 572 passedgit diff --check ype-5356-shadow-dom-rollout-plan...HEAD— passedThe local Vitest Storybook browser runner reached Storybook's uniform “No Preview” infrastructure state for all 24 stories, including untouched controls. The PR's authenticated Chromium, Firefox, and Playwright WebKit jobs are the authoritative browser matrix.
Compatibility and release notes
Jira
The PR appears safe to merge based on this review; no new issue was introduced since the previous review.
Summary
The PR adds an internal boundary-reuse seam and falls back to a local
<style>when constructable stylesheet setup fails. It adds regression coverage for failure recovery, sheet sharing, and document isolation, plus rollout-policy wording and a patch changeset. There have been no changes since the previous review.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[New shadow root] --> B{Construct and adopt stylesheet} B -->|Succeeds| C[Use document-scoped sheet] B -->|Fails or unsupported| D[Render with local style fallback]Reviews (3) · Last reviewed commit: "test(ui): assert document-scoped shadow ..."