Skip to content

fix(ui): deduplicate remaining composed events - #452

Open
abharms wants to merge 9 commits into
journey-to-the-shadow-domfrom
codex/ype-6210-composed-event-delivery
Open

abharms wants to merge 9 commits into
journey-to-the-shadow-domfrom
codex/ype-6210-composed-event-delivery

Conversation

@abharms

@abharms abharms commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • deduplicate React ancestor delivery for keyup, pointerdown/up, mousedown/up, dblclick, contextmenu, and native input/onInput at the shared ShadowRootHost boundary; preserve React onChange's existing single delivery
  • add representative browser and nested-root evidence that component callbacks, React ancestors, native propagation, retargeting, and composed paths remain correct
  • document the validated bubbling-event contract while retaining the known React capture-phase limitation

Release coordination

Verification

  • pnpm lint
  • pnpm typecheck
  • pnpm build
  • pnpm test
  • focused Storybook browser tests in Chromium, Firefox, and Playwright WebKit
  • pnpm test:ci-scripts
  • pnpm changeset status --verbose
  • git diff --check

RetriggerView in GreptileConfidence Score: 5/5

The reviewed changes appear safe to merge; no actionable new issue was found.

Summary

The PR extends duplicate-event prevention at ShadowRootHost and adds browser stories for more event families and nested roots.

  • More composed events reach React ancestors only once.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Native event inside shadow root] --> B[React portal traversal]
  B --> C[Component and ancestor callbacks]
  A --> D[Native event continues outside root]
  D --> E[External native listener receives host target]
  D --> F[React traversal from outer root]
  F --> G[Host guard blocks duplicate React bubbling]
Loading

Reviews (7) · Last reviewed commit: "fix(ui): remove ineffective change event..." · Reviewed by Greptile

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 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-10-20T17:12:46.079543Z 021c182 New commits
ℹ️ 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.

@abharms abharms self-assigned this Oct 19, 2026
@changeset-bot

changeset-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 021c182

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

This PR includes changesets to release 4 packages
Name Type
@youversion/platform-react-ui Major
vite-react Patch
@youversion/platform-core Major
@youversion/platform-react-hooks Major

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

Base automatically changed from codex/ype-6215-release-metadata-docs to journey-to-the-shadow-dom October 20, 2026 13:19
@abharms
abharms force-pushed the codex/ype-6210-composed-event-delivery branch from 074de79 to 9c4ca99 Compare October 20, 2026 13:24

@camrun91 camrun91 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. the five new families reach ancestors once, the tests fail without the fix, and stopPropagation still behaves. two non-blocking notes inline. nothing here should hold the merge.

Comment thread packages/ui/src/lib/shadow-root-host.tsx
Comment thread docs/shadow-dom-consumer-compatibility.md Outdated

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.

2 participants