fix(android): restore SystemBars work lost to upstream-preferred sync
Merged
TO
9d ago+71+71+01234567890123456789-8-8-0123456789
Summary
Audit of every PR merged into plus since the sync script started merging whole upstream PR branches with -X theirs (commit 5dee10fb / PR #39 on 2026-04-08). That fallback replayed unrelated upstream main commits and overwrote Capacitor+ files. #243 (already on plus) switched the sync to cherry-picks; this PR restores plus-only work that those earlier syncs still deleted.
This PR restores two things that #219 (f29c51ec, upstream-preferred sync of upstream main) removed:
SystemBars.handleOnResume()from #67 (plus follow-up on the upstream #8454 sync). On resume it re-applies edge-to-edge window flags, the transparent navigation bar on API < 35, and the current bar styles. The window setup is shared withinitSystemBars()so the two paths cannot drift.- The #106 hide-path unit tests (
hideWithEmptyBarHidesSystemBars,hideWithStatusBarHidesOnlyStatusBars). They cover the still-present#8480setHiddenbehavior (an empty bar usesType.systemBars()).
Not restored, with reasons:
navBarVisible,getNavBarHeightFromResources(), andcalcSafeAreaInsets()from #67/#106. Upstream rewrote SystemBars in #219 (DecorView listener,INSETS_HANDLING_NATIVE,injectSafeAreaCSS(insets, keyboardVisible)). Upstream #8692 (plus #223) then kept the API < 30 bottom inset viagetBottomInsetand thekeyboardVisibleargument. Restoring the resource fallback would add a parallel inset path that upstream replaced. #243 already dropped leftovernavBarVisibleassignments after #223 and restored theandroid.os.Buildimport; this PR does not repeat that compile fix.- No
.github/workflowshunks. Plus-only workflow PRs (#86, #107, #108, #109, #110, #232) are still present or were intentionally superseded (#86 removed Claude; #232 replaced SHA pins with version tags). #219 removedtest.yml'spull_request: branches: [main, plus], butci.ymlalready runs on every pull request (branches: '**'), so putting that trigger back would double-run the same jobs. - The sync helper is not edited (including lint-after-cherry-pick lines).
Based on current plus (includes #243). Actions stay pinned by version tag. No new secrets. CI timeout caps unchanged.
Restore table
| PR | what was lost | restored |
|---|---|---|
| #38 | SPM iOS platform helper | skipped (still present; prettier only changed wrapping) |
| #39 | Claude sync conflict automation | skipped (removed on purpose by #86; remaining helper/fmt/swiftpm pin still present) |
| #86 | Claude removal | skipped (still present) |
| #104 | SECURITY_AUDIT_CLI.md | skipped (still present) |
| #105 | 8.3.10 version pins and bump-version concurrency | skipped (concurrency group still present; version numbers superseded by later releases) |
| #106 | hide-path tests; navBarVisible tracking; older CSS inset guards | partial: hide-path tests restored. #8480/#8481 code still present or extended with NATIVE. navBarVisible path skipped as superseded by #219 + upstream #8692 / plus #223 |
| #107 | bun setup in the release job | skipped (still present) |
| #108 | npm stage publish | skipped (still present) |
| #109 | fetch upstream objects so plus sync works | skipped (still present) |
| #110 | modify/delete conflict handling | skipped (still present; helper later evolved by #243) |
| #187 | iOS private API static calls | skipped (still present) |
| #229 | R8 keep rules for plugin annotations | skipped (still present) |
| #232 | actions pinned by version tag, checkout v7 | skipped (still present) |
| #236 | README backport docs | skipped (still present) |
| #243 | cherry-pick sync + SystemBars compile fix | skipped (already on plus; not duplicated) |
| #67 (sync of upstream #8454 + plus extras) | handleOnResume; navBarVisible / resource inset fallback | partial: handleOnResume restored. Inset-resource fallback skipped (superseded by #219 rewrite + #8692) |
| #115 (upstream-preferred main sync + plus follow-ups) | SystemBars navBarVisible path later wiped by #219; CLI/iOS/CI follow-ups | skipped (CLI/iOS/CI follow-ups still present in evolved form; SystemBars extras covered under #67/#106; SHA action pins correctly replaced by #232) |
| #122 | small UIScene test/AppDelegate sync | skipped (not a feature wipe) |
| #219 | this is the wipe of handleOnResume, hide tests, navBarVisible path; also dropped test.yml PR trigger and onDOMReady | partial: resume handler and hide tests restored. test.yml PR trigger skipped (ci.yml covers all PR branches). onDOMReady skipped (replaced by handleOnStart / onPageCommitVisible) |
| #231 | deleted a duplicate SPM version-patch block in update.ts | skipped (same valid() / from|exact logic remains later in the file) |
| Other upstream syncs (#66, #68-#72, #80, #83, #85, #87-#93, #95-#103, #193, #203, #212, #221, #223, #228) | upstream Capacitor changes | skipped (upstream syncs, not plus-only work) |
![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.
Summary by CodeRabbit
- Bug Fixes
- System bar appearance and visibility are now restored when the app resumes, helping keep status and gesture bars consistent.
- Edge-to-edge layout and inset handling are reapplied on resume so screen content can adjust to the available space.