Skip to content

fix(widget): share scheduler and modal runtime state - #563

Merged
petar-omni merged 1 commit into
mainfrom
fix/externalize-shared-runtime-deps
Sep 7, 2026
Merged

fix(widget): share scheduler and modal runtime state#563
petar-omni merged 1 commit into
mainfrom
fix/externalize-shared-runtime-deps

Conversation

@petar-omni

@petar-omnipetar-omni commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

The component package now shares scheduler and document-wide modal coordination state with its host application.

  • Externalize scheduler, Radix dismissable-layer/focus utilities, aria-hidden, and react-remove-scroll from the component build.
  • Require React 19 and align RainbowKit's scroll-lock version with Radix through pnpm.
  • Add a package-build guard, consumer scheduler-resolution check, and overlapping modal regression tests.
  • Keep the standalone browser renderer self-contained.

Root cause

The published component previously embedded its own scheduler and modal coordination modules. A host React renderer could therefore process work on a different queue, and host/widget modal lifetimes could update separate lock stacks. The component build now leaves these runtime imports to the host and verifies that they are not bundled.

Externalize scheduler and document-wide modal coordination packages from the component build.
Require React 19 and align scroll-lock dependencies with pnpm.
Add consumer and modal coordination regression checks.
@changeset-bot

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b2a09d8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@aws-amplify-eu-central-1

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-563.df4xyoi0xyeak.amplifyapp.com

@aws-amplify-eu-central-1

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-563.d2ribjy8evqo6h.amplifyapp.com

@jdomingosjdomingos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@petar-omni
petar-omni merged commit 26f6792 into mainSep 7, 2026
10 checks passed
@petar-omni
petar-omni deleted the fix/externalize-shared-runtime-deps branch September 7, 2026 13:35
Sign up for freeto 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.

3 participants

@petar-omni@jdomingos@Philippoes