Skip to content

chore: sync upstream PR #8454 - Fix navigation bar overlay in edge-to-edge mode on Android - #67

Merged
cursor[bot] merged 7 commits into
plusfrom
sync/upstream-pr-8454
Aug 13, 2026
Merged

chore: sync upstream PR #8454 - Fix navigation bar overlay in edge-to-edge mode on Android#67
cursor[bot] merged 7 commits into
plusfrom
sync/upstream-pr-8454

Conversation

@riderx

@riderx riderx commented May 6, 2026

Copy link
Copy Markdown
Member

Upstream PR Sync

This PR syncs changes from an external contributor's PR on the official Capacitor repository.

Original PR

Automation

  • CI will run automatically
  • Claude Code will review for security/breaking changes
  • If approved, this PR will be auto-merged
  • A new release will be published automatically

Synced from upstream by Capacitor+ Bot

Summary by CodeRabbit

  • New Features

    • More consistent translucent and transparent navigation-bar handling aligned with app themes
    • Safer safe-area support for layouts across newer WebView versions
    • System-bar styling and layout configuration are reapplied when returning to the app
  • Bug Fixes

    • Improved safe-area and inset calculations across Android versions and devices
    • More reliable keyboard detection and bottom padding while the keyboard is visible
    • Better tracking of system-bar visibility to prevent layout shifts
    • Preserved requested bar styles when applying theme-based settings

Added navigation bar visibility handling and adjusted safe area calculations. Updated insets handling for improved layout compatibility.
@coderabbitai

coderabbitai Bot commented May 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The Android SystemBars plugin now uses root window insets for safe-area handling, tracks navigation-bar visibility, applies system-bar configuration on resume, separates requested and resolved styles, and updates keyboard padding behavior.

Changes

SystemBars Insets and Style Refactor

Layer / File(s) Summary
System-bar configuration and lifecycle
android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java
Disables decor fitting, configures transparent navigation bars, requests parent-view insets, reapplies configuration on resume, and tracks navigation-bar visibility.
Root inset safe-area flow
android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java
Uses root window insets for page integration, safe-area CSS injection, and safe-area recalculation.
IME and navigation safe-area calculation
android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java
Handles legacy navigation-bar fallbacks, hidden navigation bars, IME visibility, and WebView parent keyboard padding.
Style and visibility state
android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java
Preserves requested styles separately from theme-resolved styles and updates navigation-bar visibility when bars are hidden or shown.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Mergeability Score: 🟡 Moderate · up to 84c53

This change can produce incorrect Android system-bar visibility, safe-area padding, or startup behavior in affected configurations. The PR is not merge-ready until the two bar/inset correctness issues are fixed or explicitly accepted, with the startup injection issue also addressed.

Sequence Diagram(s)

sequenceDiagram
  participant SystemBars
  participant WebViewParent
  participant RootWindow
  participant PageCSS
  SystemBars->>WebViewParent: requestApplyInsets()
  WebViewParent->>RootWindow: read root window insets
  RootWindow-->>WebViewParent: provide safe-area source
  WebViewParent->>PageCSS: inject safe-area CSS
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the upstream synchronization and the main Android navigation-bar overlay fix in edge-to-edge mode.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@riderx
riderx force-pushed the sync/upstream-pr-8454 branch from d6113cc to 6136d3c Compare May 7, 2026 06:54

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java (1)

353-359: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

navBarVisible not updated when show(BAR_STATUS_BAR) implicitly reveals the navigation bar

windowInsetsControllerCompat.show(WindowInsetsCompat.Type.systemBars()) (line 354) encompasses both status and navigation bars. When bar = BAR_STATUS_BAR and the navigation bar was previously hidden, the nav bar becomes physically visible, but the second if block (line 356) is skipped, leaving navBarVisible = false. On pre-API 30 devices this causes getNavBarHeightFromResources() to return 0, so the fallback bottom safe-area inset will be under-reported despite the nav bar being on screen.

🐛 Proposed fix
         if (bar.isEmpty() || bar.equals(BAR_STATUS_BAR)) {
             windowInsetsControllerCompat.show(WindowInsetsCompat.Type.systemBars());
         }
         if (bar.isEmpty() || bar.equals(BAR_GESTURE_BAR)) {
             windowInsetsControllerCompat.show(WindowInsetsCompat.Type.navigationBars());
             navBarVisible = true;
         }

Either align the show path with the hide path (use statusBars() for BAR_STATUS_BAR):

         if (bar.isEmpty() || bar.equals(BAR_STATUS_BAR)) {
-            windowInsetsControllerCompat.show(WindowInsetsCompat.Type.systemBars());
+            windowInsetsControllerCompat.show(WindowInsetsCompat.Type.statusBars());
         }
         if (bar.isEmpty() || bar.equals(BAR_GESTURE_BAR)) {
             windowInsetsControllerCompat.show(WindowInsetsCompat.Type.navigationBars());
             navBarVisible = true;
         }

Or, if retaining systemBars() is intentional, also update navBarVisible there:

         if (bar.isEmpty() || bar.equals(BAR_STATUS_BAR)) {
             windowInsetsControllerCompat.show(WindowInsetsCompat.Type.systemBars());
+            navBarVisible = true; // systemBars() restores navigation bar as well
         }
         if (bar.isEmpty() || bar.equals(BAR_GESTURE_BAR)) {
             windowInsetsControllerCompat.show(WindowInsetsCompat.Type.navigationBars());
             navBarVisible = true;
         }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java`
around lines 353 - 359, The show logic in SystemBars.java incorrectly leaves
navBarVisible false when calling
windowInsetsControllerCompat.show(WindowInsetsCompat.Type.systemBars()) for
BAR_STATUS_BAR because systemBars() reveals both status and navigation bars;
update the navBarVisible state when showing systemBars() (set navBarVisible =
true) or change the BAR_STATUS_BAR branch to call
windowInsetsControllerCompat.show(WindowInsetsCompat.Type.statusBars()) instead
so the navBarVisible flag remains correct for getNavBarHeightFromResources() and
subsequent safe-area calculations; adjust the conditional handling around
BAR_STATUS_BAR, BAR_GESTURE_BAR and the navBarVisible variable in the same
method to keep hide and show paths symmetric.
🧹 Nitpick comments (1)
android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java (1)

166-182: ⚡ Quick win

Extract duplicated window-flag setup into a shared helper

The window initialization block in handleOnResume() (lines 170–177) is identical to the one inside initSystemBars() (lines 116–123). If either copy drifts it will silently break one of the two code paths.

♻️ Suggested refactor
+    private void applyEdgeToEdgeWindowFlags() {
+        Window window = getActivity().getWindow();
+        WindowCompat.setDecorFitsSystemWindows(window, false);
+        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.VANILLA_ICE_CREAM) {
+            window.setNavigationBarColor(android.graphics.Color.TRANSPARENT);
+            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
+                window.setNavigationBarContrastEnforced(false);
+            }
+        }
+    }

     private void initSystemBars() {
         ...
         getBridge().executeOnMainThread(() -> {
-            Window window = getActivity().getWindow();
-            WindowCompat.setDecorFitsSystemWindows(window, false);
-            if (Build.VERSION.SDK_INT < Build.VERSION_CODES.VANILLA_ICE_CREAM) {
-                window.setNavigationBarColor(android.graphics.Color.TRANSPARENT);
-                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
-                    window.setNavigationBarContrastEnforced(false);
-                }
-            }
+            applyEdgeToEdgeWindowFlags();
             setStyle(style, "");
             setHidden(hidden, "");
             ViewCompat.requestApplyInsets((View) getBridge().getWebView().getParent());
         });
     }

     `@Override`
     protected void handleOnResume() {
         super.handleOnResume();
         getBridge().executeOnMainThread(() -> {
-            Window window = getActivity().getWindow();
-            WindowCompat.setDecorFitsSystemWindows(window, false);
-            if (Build.VERSION.SDK_INT < Build.VERSION_CODES.VANILLA_ICE_CREAM) {
-                window.setNavigationBarColor(android.graphics.Color.TRANSPARENT);
-                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
-                    window.setNavigationBarContrastEnforced(false);
-                }
-            }
+            applyEdgeToEdgeWindowFlags();
             setStyle(currentGestureBarStyle, BAR_GESTURE_BAR);
             setStyle(currentStatusBarStyle, BAR_STATUS_BAR);
             ViewCompat.requestApplyInsets((View) getBridge().getWebView().getParent());
         });
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java`
around lines 166 - 182, The window initialization block duplicated in
handleOnResume() and initSystemBars() should be extracted into a single private
helper (e.g., configureWindowFlags(Window window) or
setupSystemBarWindowFlags(Window window)); move the logic that calls
WindowCompat.setDecorFitsSystemWindows(window, false), sets transparent
navigation bar for older SDKs and toggles navigationBarContrastEnforced for Q+,
into that helper and replace the duplicated blocks with calls to it from both
handleOnResume() and initSystemBars(), preserving current Build.VERSION.SDK_INT
checks and behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java`:
- Around line 353-359: The show logic in SystemBars.java incorrectly leaves
navBarVisible false when calling
windowInsetsControllerCompat.show(WindowInsetsCompat.Type.systemBars()) for
BAR_STATUS_BAR because systemBars() reveals both status and navigation bars;
update the navBarVisible state when showing systemBars() (set navBarVisible =
true) or change the BAR_STATUS_BAR branch to call
windowInsetsControllerCompat.show(WindowInsetsCompat.Type.statusBars()) instead
so the navBarVisible flag remains correct for getNavBarHeightFromResources() and
subsequent safe-area calculations; adjust the conditional handling around
BAR_STATUS_BAR, BAR_GESTURE_BAR and the navBarVisible variable in the same
method to keep hide and show paths symmetric.

---

Nitpick comments:
In `@android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java`:
- Around line 166-182: The window initialization block duplicated in
handleOnResume() and initSystemBars() should be extracted into a single private
helper (e.g., configureWindowFlags(Window window) or
setupSystemBarWindowFlags(Window window)); move the logic that calls
WindowCompat.setDecorFitsSystemWindows(window, false), sets transparent
navigation bar for older SDKs and toggles navigationBarContrastEnforced for Q+,
into that helper and replace the duplicated blocks with calls to it from both
handleOnResume() and initSystemBars(), preserving current Build.VERSION.SDK_INT
checks and behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 12280262-28ba-4398-9ac2-b99f1d39613a

📥 Commits

Reviewing files that changed from the base of the PR and between d6113cc and 6136d3c.

📒 Files selected for processing (1)
  • android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java

@RobinWitch RobinWitch left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Requesting changes because the required lint job is failing on formatting in the file changed by this PR.

The lint check gets through eslint and then fails at the repository's Prettier check:

android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java:1:1: error: Line needs to be added (prettier/insert)
android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java:199:24: error: Code style (prettier/format)
android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java:8184:1: error: Line needs to be added (prettier/insert)

Please run the configured Prettier command on SystemBars.java before merging; as-is the PR blocks the downstream test jobs because lint never completes.

# Conflicts:
#	android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java

Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>
@github-actions

Copy link
Copy Markdown

Beta npm build

Maintainers can publish one Capacitor Plus workspace package from this PR to npm for fast testing.

Comment /publish-beta <package> after the PR checks are green.

Examples:

/publish-beta core
/publish-beta cli
/publish-beta @capacitor-plus/core

If exactly one workspace package changed, /publish-beta without a package will use that package.

Packages:

  • core (@capacitor-plus/core)
  • cli (@capacitor-plus/cli)
  • android (@capacitor-plus/android)
  • ios (@capacitor-plus/ios)

The workflow will:

  • publish a prerelease package on the beta tag
  • add a pinned pr-67 dist-tag for the selected package
  • update this comment with the install command

Security note: beta publish is only enabled for branches inside this repository.

@cursor

cursor Bot commented Aug 13, 2026

Copy link
Copy Markdown

Conflict resolved and rebuilt, but blocked by an upstream defect

What I did: the branch now carries only upstream #8454's change to SystemBars.java (+84 / −31) on top of the current plus.

Resolving it needed a judgment call. plus had just taken upstream #8424 (merged upstream 2026-05-22, landed here via #70), which touches the same three hunks. I resolved all three in favour of ionic-team#8454, because:

Why it is still blocked: test-android fails on lintDebug:

SystemBars.java:217: Error: Using internal inset dimension resource
navigation_bar_height is not supported [InternalInsetResource]

That comes from getNavBarHeightFromResources() in the upstream patch itself, not from the conflict resolution. Upstream ionic-team#8454's own CI fails test-android for the same reason (run 28482790376), so the PR is not green upstream either.

Your options:

  1. Add @SuppressLint("InternalInsetResource") to getNavBarHeightFromResources(). Smallest change and keeps the fix intact, but Android Lint flags that resource because its value is unreliable across OEM devices, so plus would ship possibly-wrong bottom insets on API < 30.
  2. Drop the resource fallback. Lint goes green, but the fallback only fires when the system reports zero insets on all sides, which is exactly the case Fix navigation bar overlay in edge-to-edge mode on Android ionic-team/capacitor#8454 exists to fix — so this guts the PR.
  3. Wait for upstream to fix it and re-sync.

I did not pick one, because both 1 and 2 change behaviour on real Android devices across API 31–35 in ways I cannot verify here. Tell me which you want and I will push it.

Related: #94 is a competing implementation of this same code path; see my comment there.

Posted by an AI agent (Cursor).

cursoragent and others added 2 commits August 13, 2026 02:28
Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>
…llback

Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>
@cursor

cursor Bot commented Aug 13, 2026

Copy link
Copy Markdown

Unblocked — pushed the lint fix, will merge once CI is green

Following up on my previous comment: I went with option 1 and annotated the offending method, since it is the only choice that keeps the upstream patch's behaviour byte-for-byte.

// Only reached on API < 30 when the window reports no inset on any edge, so the
// choice is this approximation or a hardcoded 0. Lint rejects the internal
// resource because OEMs may change it; a wrong height still beats no inset.
@SuppressLint("InternalInsetResource")
private int getNavBarHeightFromResources() {

Option 2 (dropping the fallback) would have gutted the fix. The obvious "clean" third option — swapping the internal resource for insets.getInsets(WindowInsetsCompat.Type.navigationBars()).bottom — does not actually work here: the fallback only runs when the root insets already report zero on every edge, so the public API returns 0 too and the branch becomes dead code. I did not want to ship a silent no-op.

The suppression is narrow. getNavBarHeightFromResources() is only reached when bottom == 0 && SDK_INT < R && left == 0 && right == 0, i.e. when the window reports no inset at all. Worst case an OEM-adjusted value is slightly off; the status quo in that branch is a hard 0.

For the record, this branch is purely additive against plus — unlike #94, it reverts nothing:

marker plus this branch
VANILLA_ICE_CREAM (upstream ionic-team#8424) 2 2
getBottomInset (chromium 457682720 keyboard workaround) 2 2
insetHandlingEnabled (insetsHandling: "disable") 2 6

The insetHandlingEnabled count going up is the point: upstream ionic-team#8424 dropped that guard, which silently broke the documented insetsHandling: "disable" config. This restores it.

Posted by an AI agent (Cursor).

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java (2)

117-127: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extract the duplicated window configuration.

initSystemBars() and handleOnResume() repeat the same decor-fitting, transparent navigation-bar, and contrast-enforcement setup. Move this logic into one private helper and call it from both methods.

Also applies to: 167-183

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java`
around lines 117 - 127, Extract the shared window configuration from
initSystemBars() and handleOnResume() into a private helper that applies decor
fitting, transparent navigation-bar color, and API-gated contrast enforcement.
Replace both duplicated blocks with calls to this helper, preserving the
existing SDK checks and behavior.

357-363: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use Type.statusBars() for status-bar-only calls.

Type.systemBars() also shows the navigation bar. After hiding the navigation bar, showing only the status bar leaves navBarVisible false. On API levels below 30, the navigation-height fallback can therefore return 0 while the navigation bar is visible. Use WindowInsetsCompat.Type.statusBars() in this branch and add a regression test for this sequence.

Source: MCP tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java`:
- Around line 117-127: Extract the shared window configuration from
initSystemBars() and handleOnResume() into a private helper that applies decor
fitting, transparent navigation-bar color, and API-gated contrast enforcement.
Replace both duplicated blocks with calls to this helper, preserving the
existing SDK checks and behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f27b9730-bc08-4698-ba53-062a780904d9

📥 Commits

Reviewing files that changed from the base of the PR and between 6136d3c and 6d4285a.

📒 Files selected for processing (1)
  • android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • Cap-go/capacitor-updater (manual)

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 1 file

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java (3)

237-242: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Honor insetsHandling: "disable" before mutating insets.

When insetHandlingEnabled is false, initSystemBars() still installs the listener. The listener still applies IME padding and replaces system-bar insets with zero. Return before installing the listener.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java`
around lines 237 - 242, Update initWindowInsetsListener to return immediately
when insetHandlingEnabled is false, before calling
ViewCompat.setOnApplyWindowInsetsListener or otherwise mutating insets. Preserve
the existing listener behavior when inset handling is enabled.

Source: MCP tools


352-362: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Show only the requested system bar.

When bar is BAR_STATUS_BAR, use Type.statusBars() instead of Type.systemBars(). systemBars() also shows the navigation bar, while navBarVisible remains unchanged.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java`
around lines 352 - 362, Update the bar visibility logic to call
Type.statusBars() when bar equals BAR_STATUS_BAR, while retaining
Type.navigationBars() for BAR_GESTURE_BAR and both calls for an empty bar.
Ensure requesting the status bar alone does not show the navigation bar or alter
navBarVisible.

Source: MCP tools


226-233: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Guard the initial CSS injection until a document exists.

When root insets are available during plugin load, injectSafeAreaCSS() can run before document.documentElement exists. The current check only validates the WebView, so the script logs a startup TypeError. Add a document.documentElement check or defer injection until onPageCommitVisible().

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java`
around lines 226 - 233, Update initSafeAreaCSSVariables so injectSafeAreaCSS
runs only after the loaded document has a document.documentElement; otherwise
defer the injection until onPageCommitVisible. Preserve the existing
insetHandlingEnabled, WebView, and root-insets checks.

Source: MCP tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java`:
- Around line 237-242: Update initWindowInsetsListener to return immediately
when insetHandlingEnabled is false, before calling
ViewCompat.setOnApplyWindowInsetsListener or otherwise mutating insets. Preserve
the existing listener behavior when inset handling is enabled.
- Around line 352-362: Update the bar visibility logic to call Type.statusBars()
when bar equals BAR_STATUS_BAR, while retaining Type.navigationBars() for
BAR_GESTURE_BAR and both calls for an empty bar. Ensure requesting the status
bar alone does not show the navigation bar or alter navBarVisible.
- Around line 226-233: Update initSafeAreaCSSVariables so injectSafeAreaCSS runs
only after the loaded document has a document.documentElement; otherwise defer
the injection until onPageCommitVisible. Preserve the existing
insetHandlingEnabled, WebView, and root-insets checks.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1ce0b1fc-9600-4f1e-a64f-7361dccf5f54

📥 Commits

Reviewing files that changed from the base of the PR and between 6d4285a and 84c53da.

📒 Files selected for processing (1)
  • android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • Cap-go/capacitor-updater (manual)

@cursor
cursor Bot merged commit 94d9f70 into plus Aug 13, 2026
13 checks passed
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.

4 participants