Skip to content

Ignore stale initial links after reconfiguration - #8350

Open
OskarEichler wants to merge 1 commit into
wix:masterfrom
OskarEichler:codex/fix-stale-initial-deep-links
Open

Ignore stale initial links after reconfiguration#8350
OskarEichler wants to merge 1 commit into
wix:masterfrom
OskarEichler:codex/fix-stale-initial-deep-links

Conversation

@OskarEichler

Copy link
Copy Markdown

Problem

Reconfiguring deep linking removes the previous URL-event listener, but it cannot cancel that configuration's pending getInitialURL() promise. If the old promise resolves later, its URL is handled through the new configuration and can be duplicated, misrouted, or sent to the wrong callback. A rejected initial-URL lookup can also escape as an unhandled rejection.

Fix

  • generation-tag each linking subscription
  • invalidate the generation during teardown
  • ignore initial URLs resolved by stale configurations
  • absorb initial-URL lookup failures while keeping the live URL listener operational

Breaking changes

None. Only stale or failed initial-URL lookups change behavior; current subscriptions and live URL events are unchanged.

Test plan

  • Added a deferred-promise regression proving an old configuration's initial URL reaches neither old nor new callbacks.
  • Added rejection coverage proving later live URL events still process exactly once.
  • Focused suite passes: 30/30 tests.
  • Full yarn test-js passes: 38 suites/397 tests; 11 suites/59 tests remain intentionally skipped.
  • Focused ESLint, Bob module/type builds, and git diff --check pass.

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