Skip to content

fix(app): preserve web Promise contracts - #9260

Merged
mikehardy merged 1 commit into
invertase:mainfrom
OskarEichler:codex/app-web-promise-contracts
Sep 1, 2026
Merged

fix(app): preserve web Promise contracts#9260
mikehardy merged 1 commit into
invertase:mainfrom
OskarEichler:codex/app-web-promise-contracts

Conversation

@OskarEichler

Copy link
Copy Markdown
Contributor

What this fixes

The web App shim returned plain values from methods whose native specs and public contract are asynchronous. Code using .then() or .catch() therefore failed on web even though await appeared to work.

This makes the web implementations return real Promises for metadata, JSON config, preferences, listener diagnostics, and event pings. eventsPing now also resolves with the event body, matching the native implementations. Existing await behavior is unchanged.

Verification

  • Added a focused regression covering every corrected Promise contract
  • Focused App Jest: 7/7 passed
  • Full Jest: 104 suites passed
  • yarn lerna:prepare
  • yarn tsc:compile
  • yarn tsc:compile:consumer
  • yarn lint:deps
  • yarn reference:api
  • yarn compare:types
  • Focused ESLint and git diff --check

Compatibility

No public API or type changes. This is a web-only runtime compatibility fix; callers already using await retain the same behavior, while Promise chaining now works consistently with native.

@mikehardy mikehardy 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.

Hey @OskarEichler 👋

Thanks for the PR - this looks like a real problem to me. I ran local Jest/unit plus the android/ios/macos e2e suite against it here and it came out clean. Pending CI, then I'll merge.

Cheers

@mikehardy mikehardy added the Workflow: Pending Merge Waiting on CI or similar label Aug 31, 2026
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.49%. Comparing base (81beeca) to head (2241206).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9260      +/-   ##
============================================
- Coverage     68.50%   68.49%   -0.00%     
+ Complexity     1915     1914       -1     
============================================
  Files           522      522              
  Lines         38116    38117       +1     
  Branches       5189     5189              
============================================
- Hits          26108    26106       -2     
+ Misses        10222    10221       -1     
- Partials       1786     1790       +4     
Flag Coverage Δ
android-native 63.75% <ø> (-<0.01%) ⬇️
e2e-ts-android 53.94% <ø> (-0.05%) ⬇️
e2e-ts-ios 53.50% <ø> (ø)
e2e-ts-macos 49.67% <100.00%> (-0.01%) ⬇️
ios-native 68.77% <ø> (-<0.01%) ⬇️
ios-ruby 100.00% <ø> (ø)
jest 46.36% <100.00%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mikehardy
mikehardy merged commit 36c586e into invertase:main Sep 1, 2026
25 checks passed
@mikehardy mikehardy removed the Workflow: Pending Merge Waiting on CI or similar label Sep 1, 2026
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