test(ui): validate Shadow DOM consumer compatibility (YPE-5436) - #380
test(ui): validate Shadow DOM consumer compatibility (YPE-5436)#380abharms wants to merge 7 commits into
Conversation
🦋 Changeset detectedLatest commit: 3b8563e 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d4c1b6c6c
ℹ️ 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
Jira ticket: YPE-5436
Summary
Standards: 1 must-fix. Worst: the play functions check scenario titles, not the shadow contract.
Spec: 0 must-fix on this SHA. Worst: none.
CI: pass.
For Agents: pin and CI
- Pin HEAD:
2730e57b7ca12c3892e6ad3b39f073edcc194e6f - Base:
main - Event: REQUEST_CHANGES. Walks back APPROVE
5097118767. Standards must-fix landed after that approve. - Review bot: Greptile 5/5 (last reviewed
2730e57). Codex P2 automation locators resolved (2eef188). Do not reopen. - CI: Build, Bundle Size, Integration Tests, Lint, Lint Commit Messages, Lint PR Title, Locale Ownership, Test, Type Check, i18n Check, Require Changeset pass. Publish coverage badges skipped. Greptile Review pass.
- Same
h2copy asserts also at lines 310 and 363 inpackages/ui/src/components/consumer-compatibility.shadow-isolation.stories.tsx. One inline covers all three.
By Code Reviewer bot, sent on behalf of Cam.
| play: async ({ canvasElement }) => { | ||
| void expect( | ||
| await waitForElement<HTMLHeadingElement>(canvasElement, 'h2', 'scenario title not rendered'), | ||
| ).toHaveTextContent('Forms, labels, and descriptions'); |
There was a problem hiding this comment.
issue: The play functions check the scenario titles. The test standard says to check behavior, not instructional copy. Remove these three title checks. Keep the form, label, ARIA, event, ref, and query checks.
For Agents: h2 copy asserts
docs/testing.md: Assert behavior / stable contracts / roles — not i18n prose or instructional copy.
packages/ui/AGENTS.md: Assert roles/behavior, not localized copy blobs.
void expect(
await waitForElement<HTMLHeadingElement>(canvasElement, 'h2', 'scenario title not rendered'),
).toHaveTextContent('Forms, labels, and descriptions');Same pattern at lines 310 (Events, refs, and test queries) and 363 (Nested shadow roots). Sibling YouVersionAuthButton.shadow-isolation.stories.tsx does not assert instructional copy.
By Code Reviewer bot, sent on behalf of Cam.
Summary
Requirement evidence
form.elementsandFormDatalabel.controlis null and clicking the external label does not focus the internal textareaaria-labelledbyandaria-describedbyrelationshipstarget/currentTargetidentitiesdocs/shadow-dom-consumer-compatibility.mdclassifies every scenario and records browser, accessibility, timing, and rollout constraintsReview scope
Required scope:
Supporting scope:
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.
Validation
pnpm --filter @youversion/platform-react-ui exec vitest run --project storybook src/components/consumer-compatibility.shadow-isolation.stories.tsx— 3/3 passed in Chromiumpnpm --filter @youversion/platform-react-ui typecheck— passedpnpm lint— passedpnpm turbo build --force— passed (4/4 tasks)git diff --check— passedpnpm test— core 432/432 and hooks 318/318 passed; the final UI run passed 538/539 and hit the existing 5-second timeout inbible-reader-controlled.test.tsx. That unchanged test passed in the earlier full-suite retry, where UI was 539/539.9d4c1b6— 0 required findings; one non-blocking helper-consistency suggestionCompatibility and limitations
Jira
YPE-5436
Greptile Summary
This test-and-documentation-only PR records Chromium evidence for consumer behavior across SDK Shadow DOM boundaries and feeds the resulting constraints into the rollout plan.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Reviews (5): Last reviewed commit: "test(ui): remove instructional copy asse..." | Re-trigger Greptile