Skip to content

test(ui): catch shadow stylesheet cache poisoning - #429

Open
abharms wants to merge 1 commit into
journey-to-the-shadow-domfrom
shadow-dom-review-followups
Open

abharms wants to merge 1 commit into
journey-to-the-shadow-domfrom
shadow-dom-review-followups

Conversation

@abharms

@abharms abharms commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-ups from a review of the merged Shadow DOM rollout PRs (#420, #423, #424, #426). No runtime behavior changes.

Evidence

Check Result
Updated recovery test on current code 10/10 shadow-root-host tests pass
Same test with the sheet cached before replaceSync The replacement-failure test now fails. Before this change, all tests passed.
Picker search with onChange instead of onInput 4 picker search stories fail in Chromium, so onInput is required and the stories guard it
userEvent.clear in place of fireEvent.input Fails with "The element to be cleared could not be focused": user-event checks document.activeElement, which is the shadow host

Verification

  • pnpm lint: passed
  • shadow-root-host.test.tsx: 10/10 passed
  • The full UI unit suite showed intermittent timing failures that change from run to run, on a heavily loaded machine (load average around 158). None are in files this PR touches. bible-reader-search.test.tsx passed 18/18 on its own, and the other failing files passed on unchanged journey-to-the-shadow-dom.
  • Empty changeset: test and comment changes only.

🤖 Generated with Claude Code

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable issue was identified in the changed code.

Summary

This PR strengthens the shadow stylesheet recovery test to catch reuse of a sheet whose replacement failed, and adds explanatory comments to picker components and stories. It does not change runtime behavior.

Reviews (1) · Last reviewed commit: "test(ui): catch shadow stylesheet cache ..."

The replacement-failure recovery test passed even when the SDK sheet was
cached before replaceSync, which would leave later roots unstyled. Assert
that the recovered root adopts a populated sheet.

Also explain why the picker search inputs use onInput and why two picker
stories clear search with fireEvent.input inside shadow roots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-29T14:56:40.127920Z c4a417a PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@changeset-bot

changeset-bot Bot commented Sep 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c4a417a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When 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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant