feat(ui): isolate Bible pickers in Shadow DOM - #426
Conversation
Refs: YPE-5947
Refs: YPE-5947
Refs: YPE-5947
🦋 Changeset detectedLatest commit: ad5620b The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types 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. |
cameronapak
left a comment
There was a problem hiding this comment.
Review
YPE-5949
Summary
Standards: 0 must-fix. Spec: 0 must-fix. Primary concern: none.
Review evidence
- Scope: revision
ad5620b, PR requirements, rollout policies, picker implementations, Shadow DOM infrastructure, callers, and tests/stories. - Method: independently traced Standards, Spec, Correctness, compatibility, and reuse across the base-to-HEAD diff.
| Behavior or check | Method / command | Result | Evidence source |
|---|---|---|---|
| Root isolation and boundary reuse | Source trace through both picker roots, ShadowIsolationBoundary, and hydration coverage |
One automatic boundary per root; compound members and owned overlays stay in the intended tree | Reviewer |
| State, search, callbacks, storage, custom triggers, focus, and dismissal | Traced focused and composed Storybook journeys against the new public roots | Required behavior remains covered; no concrete regression found | Reviewer and CI |
| Browser and repository checks | GitHub checks at the pinned HEAD | Build, test, integration, lint, typecheck, bundle, Firefox Shadow DOM, and WebKit Shadow DOM checks passed | CI |
| Diff integrity | git diff --check 4fbd7dbe...ad5620b |
Passed | Reviewer |
- Limits: Jira details were unavailable through the configured integration, so the detailed PR requirements and repository policy documents supplied the spec. Actual Safari and assistive-technology behavior remain explicitly unclaimed.
- CI and bot review: all required reported checks passed; the earlier fixture concern is resolved on the current HEAD.
- Event: APPROVE.
Written by Code Reviewer bot on behalf of Cam.
| await waitFor(async () => { | ||
| await expect(trigger).toHaveTextContent(/genesis 11/i); | ||
| await expect(topLayer.querySelector('[data-slot="popover-content"]')).toBeNull(); | ||
| await expect(root.activeElement).toBe(trigger); |
There was a problem hiding this comment.
praise: This focused journey covers the risky boundary end to end instead of only asserting that a shadow root exists.
For Agents: public picker behavior
The story preserves a consumer trigger, proves hostile document CSS cannot cross the boundary, keeps the trigger and overlay in one tree, exercises search and controlled selection, and verifies dismissal plus focus restoration. That gives strong regression evidence for the public behavior this PR changes.
Written by Code Reviewer bot on behalf of Cam.
Summary
BibleChapterPicker.RootandBibleVersionPicker.Rootin one Shadow DOM boundary eachThis is a stacked PR based on #424 (
ype-5947-shadow-dom-foundation). It must not be merged or released independently of the coordinated Shadow DOM rollout.Requirement evidence
ShadowIsolationBoundary; direct SSR/hydration tests assert one reused host and no nested member hosts.ReuseShadowBoundary; real-root stories exercise chapter/version/language search, selection, recent versions, and Reader/Card composition.aria-controlstargets remain inside the same shadow root.Review scope
Required outcomes:
Permitted support work:
onInputhandling for search inside the real shadow boundaryinerton the inactive Version/Language panel so hidden controls cannot receive focusNon-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 lint— passedpnpm typecheck— passedpnpm test— passed: all six workspace tasks; UI 574/574git diff --check— passed71a96b4/ fingerprintf9e9bd97…da5f— no hard standard violation, no implementation defect, and no confirmed unintended regressionfe798d9/ fingerprint69dc9614…a96dd— subsequent commits stabilize test evidence and align the durable rollout records; they do not expand runtime scopeFirst-paint and compatibility notes
remscaling as the accepted sizing input. This PR does not add a picker-specific root-font reset.Jira
YPE-5949 — Isolate Bible chapter and version pickers
The PR appears safe to merge into the integration branch, subject to the documented coordinated-release gate.
Summary
The PR gives each Bible picker Root an automatic Shadow DOM boundary, adapts picker and composed Reader/Card coverage to that boundary, and updates rollout documentation.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD C[Consumer] --> CR[BibleChapterPicker.Root] C --> VR[BibleVersionPicker.Root] CR --> CH[Chapter shadow root] VR --> VH[Version shadow root] CH --> CM[Trigger, content, local overlay] VH --> VM[Trigger, content, language members, local overlay]Reviews (12) · Last reviewed commit: "docs(ui): refresh Shadow DOM evidence gu..."