Repository navigation
feat(ui): isolate Bible reader (YPE-5951) - #433
Conversation
🦋 Changeset detectedLatest commit: 740875b 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. |
Give BibleReader.Root one automatic shadow boundary, reuse it for reader-owned composition, and preserve focused reader/search behavior across the supported browser matrix.
41d034d to
815f481
Compare
be39637 to
ddb92e2
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ddb92e2227
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
4931e7a to
f252ceb
Compare
f252ceb to
d645b58
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d645b58265
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
d645b58 to
e72dfa1
Compare
e72dfa1 to
3cf3249
Compare
935d43b to
d3576d9
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d3576d9afe
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
d3576d9 to
83f0aa9
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 83f0aa9318
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 45d3d256f6
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 23389a83f1
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
cameronapak
left a comment
There was a problem hiding this comment.
Review
Summary
Standards: 0 must-fix. Spec: 0 must-fix. Primary concern: none.
Review evidence
- Scope: reviewed pinned revision
740875b, Jira requirements, full merge-base diff, surrounding implementation, tests, stories, documentation, and resolved review threads. - Method: independent Standards, Spec, and Correctness passes; traced SSR/hydration, reader-owned composition, intentional nesting, search navigation, overlay ownership, focus restoration, public API, and coordinated-release boundaries.
| Behavior or check | Method / command | Result | Evidence source |
|---|---|---|---|
| Reader root and hydration | Source trace plus focused test inspection | Exact empty SSR host, host reuse, no light-DOM content, and no accidental owned roots are asserted | Coordinator review |
| Search and overlay behavior | Source and browser-story trace | Opening, navigation, dismissal, teardown, and focus restoration are covered through the public root | Coordinator review |
| Build and tests | GitHub checks at pinned HEAD | Test, Type Check, Build, Integration Tests, Firefox, and WebKit passed | CI |
- Limits: local reruns did not execute because the detached checkout lacked built workspace-package links and the orb lacked the matching Playwright browser binary. Native Safari and real assistive-technology validation are explicitly outside this ticket; YPE-6040 remains a coordinated-release blocker.
- CI and bot review: all required checks passed; all existing review threads are resolved.
- Event: APPROVE.
Written by Code Reviewer bot on behalf of Cam.
| let root: Root | undefined; | ||
|
|
||
| try { | ||
| await act(async () => { |
There was a problem hiding this comment.
praise: Asserting the exact empty server markup, host identity after hydration, and absence of nested reader-owned hosts makes the new boundary contract unusually hard to regress.
For Agents: focused boundary evidence
This test checks the observable SSR and hydration contract rather than only verifying that content eventually renders. It also distinguishes accidental SDK-owned nesting from intentional consumer-created nesting in the adjacent case.
Written by Code Reviewer bot on behalf of Cam.
Summary
BibleReader.Rootone automatic open, client-only Shadow DOM boundaryJira: YPE-5951
Builds on merged #431 (YPE-5950).
Requirement evidence
SearchAndReturncovers toolbar open, result navigation, dismissal, reopening, and focus restoration. Focused unit assertions cover direct composition and host-owned callback mode.Review scope
Required outcomes
BibleReader.Rootthe sole automatic reader boundaryPermitted 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 lint— passedpnpm typecheck— passed (6/6 workspaces)pnpm --filter @youversion/platform-react-ui build— passed, including entries, exports, styles, and declarationspnpm --filter vite-react build— passedgit diff --check— passedExisting Radix accessibility development warnings, MSW fixture warnings, and the Vite chunk-size advisory remain non-failing.
Compatibility and release notes
BibleReader.Rootserver output is now an empty host; reader content mounts in its open root after the client effect.Rootchildren move into that root, so document selectors and global CSS no longer reach them. React context and callbacks remain in the same React tree.The PR appears safe to merge into its feature branch; the coordinated release remains separate.
Summary
BibleReader.Rootgains one open, client-only Shadow DOM boundary. Reader-owned controls and dialogs reuse it, while deliberately isolated consumer children can keep their own roots.abharmsdocuments the empty-host first paint as accepted. The known ancestor React-event duplication is deferred to YPE-6040 and remains a coordinated-release blocker, not new work for this PR.Greptile automatically discovered a related ticket that helped explain the purpose of this PR: isolate the reader without adding public configuration or publishing a partial rollout.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD App[Consumer app] --> Host[BibleReader.Root empty server host] Host --> Root[Open shadow root after client mount] Root --> Content[Scripture and verse actions] Root --> Toolbar[Toolbar and reader-owned pickers] Root --> Dialogs[Search, settings, and auth dialogs] Root --> Children[Consumer children] Children --> Nested[Deliberately isolated child may keep its own root]Reviews (18) · Last reviewed commit: "docs: align reader isolation evidence (Y..." · Reviewed by Greptile