chore: sync plus with upstream main (upstream-preferred conflicts)
Upstream Plus Sync
The automatic sync of the plus branch encountered merge conflicts.
What happened
- Git applied the upstream-preferred merge strategy
- This PR requires CI and manual review before merging
- Merge strategy: use a merge commit (not squash), long sync history with conflict repairs
CI workflow (sync/** push trigger)
ci.yml now also runs on push to sync/** (in addition to pull_request synchronize).
Why: Rapid head updates with concurrency.cancel-in-progress were cancelling the in-flight run without always scheduling a replacement pull_request workflow. Push on sync/** ensures the branch still gets a workflow when PR events are dropped or cancelled mid-queue.
Scope: Same CI workflow and jobs; only the trigger list changed (eaa979eb).
Other .github deltas vs plus: test-android checks out before setup-java + cache: gradle (9be1682f); publish-ios.yml uses Xcode 27.0 and setup-node@v7 (matches upstream d49801e6). test-ios stays on Xcode 26.0, same split as upstream: publish job tracks latest Xcode; PR CI pins the simulator/Xcode pair that passed upstream verification.
Plus-only changes audited
| Area | Status | Notes |
|---|---|---|
Fork branding (@capacitor-plus/*, Capgo README) | Kept | Package names and docs unchanged on this branch |
Sync tooling (merge_plus_preserving, cherry-pick intercept) | Kept | .github/scripts/sync-gh-helpers.sh present |
CLI SPM/Cordova fixes (a0604e14) | Kept | Upstream merge repair retained |
| Android #235 bridge origin scoping | Restored | Bridge, MessageHandler, CapacitorCookies (hasScopedWebMessages) |
| Android #244 SystemBars | Upstream rewrite + plus behavior where kept | Upstream keyboardOverlaysWebView / injectSafeAreaCSS(insets) replaced the plus-only keyboard/resume workarounds; plus edge-to-edge init kept where merged |
| Android #235/#244 JVM tests at HEAD | Listed below | Mockito-only (mockito-core); no extra Android test artifacts in build.gradle |
| Android toolchain (Gradle 9.8.2, AGP 9.4.1, SDK 26/37) | Kept | Byte-identical to upstream d49801e6 for wrapper and module Gradle files |
| Taken from upstream on this PR | Yes | ESLint 10, iOS ios/Sources SPM layout, android/capacitor-cordova split, not regressions |
.github Xcode pins | See above | CI test-ios: 26.0; publish-ios: 27.0 (upstream alignment) |
Android unit tests at HEAD (plus #235 / #244)
| File | Test methods |
|---|---|
android/capacitor/src/test/java/com/getcapacitor/BridgeOriginScopingTest.java | shouldBlockHttpInterceptorNavigationOnMatchingAppOrigin, shouldNotBlockHttpInterceptorNavigationOnDifferentPort, shouldNotBlockHttpInterceptorNavigationOnExternalHost |
android/capacitor/src/test/java/com/getcapacitor/MessageHandlerTest.java | scopedPolicyDispatchesOnlyTrustedMainFrameAndUsesReplyProxy, scopedPolicyDoesNotExposeLegacyInterfaceWhenFeatureUnsupported, scopedPolicyDoesNotExposeLegacyInterfaceWhenRegistrationFails, scopedPolicySkipsRegistrationWhenOriginRulesAreEmpty, unscopedRegistrationUsesBridgeAllowedOriginRules |
android/capacitor/src/test/java/com/getcapacitor/plugin/CapacitorCookiesTest.java | loadRegistersJavascriptInterfaceWhenBridgeIsUnscoped, loadSkipsJavascriptInterfaceWhenBridgeHasScopedWebMessages |
android/capacitor/src/test/java/com/getcapacitor/plugin/SystemBarsTest.java | showWithEmptyBarShowsSystemBars, showWithStatusBarShowsOnlyStatusBars, showWithNavigationBarShowsOnlyNavigationBars, getSystemBarInsetsForCssUsesSystemBarsAndDisplayCutoutNotIme, injectSafeAreaCSSUsesOriginalSystemBarInsets, bottomInsetIsNavigationBarWhenKeyboardHidden, bottomInsetIsZeroWhenDockedKeyboardCoversNavigationBar, bottomInsetIsZeroWhenKeyboardInsetEqualsNavigationBar, bottomInsetIsUncoveredPartWhenKeyboardPartiallyCoversNavigationBar, bottomInsetIsNavigationBarWhenFloatingKeyboardCoversNothing |
Production (SystemBars.java): package-private getSystemBarInsetsForCss(WindowInsetsCompat) extracts getInsets(systemBars() | displayCutout()) for JVM tests; runtime behavior unchanged. getInsetsController(Window, View) is the same pattern for setHidden/setStyle unit tests.
JVM test stubs (test sources only): android/graphics/Rect.java, android/os/Build.java (SDK_INT = 34), android/view/DisplayCutout.java, android/view/WindowInsets.java added and the existing android/util/Log.java stub extended under android/capacitor/src/test/java/, so Mockito can mock WindowInsetsCompat against the unit-test android.jar. Also: the existing android/util/Log.java stub no longer prints to stdout (the println calls in d, i, w, e, v are removed), and the plus-only src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker (mock-maker-inline) is deleted because Mockito 5.20 uses the inline mock maker by default. No new test dependencies.
Upstream sync tip: d49801e6fdd1454a04b34f1a1c08e659a26ca5f3 (plus merge parent of 564e578a3).
This PR was created automatically by the Capacitor+ sync workflow
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

