Conversation
🦋 Changeset detectedLatest commit: a7cfe28 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. |
Collaborator
Author
|
Superseded by #414, which uses the identical reviewed commit from an upstream branch so CI can access the repository's required test environment. |
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
journey-to-the-shadow-dom, which contains the existing Shadow DOM overlay seam.Requirement evidence
useShadowDialogFocusretains the first captured opener through the interrupted exit;ShadowRootHostrestores it after modal release.Review scope
Required outcomes:
Permitted support work:
Non-goals:
Review only against YPE-5889 and this stated scope. Treat correctness defects, regressions, explicit repository-rule violations, and unmet required outcomes as blocking. Treat broader hardening, optional refactors, and out-of-scope improvements as follow-up work.
Verification
pnpm --filter @youversion/platform-react-ui typecheck— passedpnpm lint— passedpnpm turbo build --force --filter=@youversion/platform-react-ui— passedpnpm test— passed on clean rerun; all six workspace tasks green, UI 545/545pnpm exec prettier --check ...andgit diff --check— passeda7cfe28— no required or advisory findingsThe first concurrent full-suite run hit the existing five-second timeout in
bible-reader-controlled.test.tsx. The unchanged timed-out test passed 33/33 in isolation, and the complete suite then passed on rerun.Compatibility and limitations
Jira
Greptile Summary
This PR fixes final focus restoration for Shadow DOM dialogs that close and reopen during retained exit presence.
Confidence Score: 5/5
The PR appears safe to merge with the required focus lifecycle, invalid-target handling, regression coverage, documentation, and release metadata aligned.
The changed capture and restoration paths preserve the original valid opener through rapid reopen, discard prevented or invalid targets, and are covered at both unit and Chromium integration levels without an established regression.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Dialog opens] --> B[Capture focused opener] B --> C[Dialog begins closing] C --> D{Reopened during retained exit?} D -->|Yes| E[Preserve original opener] E --> C D -->|No| F[Wait for final modal release] F --> G{Target connected and in owning shadow root?} G -->|Yes| H[Restore focus] G -->|No| I[Discard target] C --> J{Consumer prevented close autofocus?} J -->|Yes| K[Clear stored opener]Reviews (1): Last reviewed commit: "fix(ui): reset prevented shadow focus re..." | Re-trigger Greptile
Context used: