Skip to content

fix: keep ErrorReportActivity content below the status bar on edge-to-edge - #2054

Open
aleclarson wants to merge 1 commit into
NativeScript:mainfrom
aleclarson:fix/error-report-edge-to-edge
Open

aleclarson wants to merge 1 commit into
NativeScript:mainfrom
aleclarson:fix/error-report-edge-to-edge

Conversation

@aleclarson

@aleclarson aleclarson commented Sep 30, 2026 •

Copy link
Copy Markdown

Closes #2053

Summary

  • The debug crash screen (com.tns.ErrorReportActivity / error_activity.xml) applies no window-insets handling, so on targetSdkVersion 35 — where Android 15 enforces edge-to-edge — the root RelativeLayout draws behind the status bar and clips the top errorException banner.
  • Adds android:fitsSystemWindows="true" to the root RelativeLayout, so the default inset dispatch pads the content by the system window insets (status bar, navigation bar, display cutout).
  • No-op on older targets and non-edge-to-edge windows, where the decor consumes those insets before they reach the content view. Side benefit: the bottom button rows now also clear the gesture/nav bar.
  • NativeScriptActivity lives in the app template, not this repo, and nothing here handles insets today, so there was no existing convention to match — this is the minimal fix suggested in the issue (SDK version 35 breaks the layout. It is stretched behind the status bar and the system bottom buttons. #1833 tracks the same root cause for normal app content).

Test plan

  • ns run android on an API 35 emulator/device, throw an uncaught JS exception on startup, confirm the red error banner renders fully below the status bar and the bottom buttons clear the nav bar
  • Repeat on a pre-35 device/emulator and confirm no layout change

Summary by CodeRabbit

  • Bug Fixes
    • Updated the error screen layout to account for system window insets.

…-edge

targetSdk 35 forces edge-to-edge, so the debug crash screen's root layout
drew behind the status bar and clipped the top error banner. Setting
fitsSystemWindows on the root RelativeLayout pads the content by the
system window insets (status bar, nav bar, display cutout); it is a no-op
on older targets where the decor consumes those insets.

Closes NativeScript#2053
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 4a1337e8-4be6-4f40-b163-030ccff27ffd

📥 Commits

Reviewing files that changed from the base of the PR and between 6d16eb2 and 115c5e9.

📒 Files selected for processing (1)
  • test-app/app/src/debug/res/layout/error_activity.xml

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The debug error screen’s root RelativeLayout now enables android:fitsSystemWindows.

Changes

Debug error screen

Layer / File(s) Summary
Enable system window fitting
test-app/app/src/debug/res/layout/error_activity.xml
The root RelativeLayout sets android:fitsSystemWindows to true.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 115c5

The debug error screen’s content is inset from the system bars, keeping its message and bottom controls clear. No actionable issue remains for merge.

Architecture Summary

Architecture risk: 🔵 Low · up to 115c5

The change affects 1 system.

Changed systems: test-app

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — test-app (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in test-app/app/src/debug/res/layout/error_activity.xml: The root RelativeLayout now enables fitsSystemWindows.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: keeping ErrorReportActivity content below the status bar during edge-to-edge display.
Linked Issues check ✅ Passed The PR changes the debug ErrorReportActivity layout named in #2053. It adds android:fitsSystemWindows="true" to the root RelativeLayout, which matches the issue's suggested fix for applying syst…
Out of Scope Changes check ✅ Passed The PR contains one layout change in test-app/app/src/debug/res/layout/error_activity.xml. The change directly supports #2053 by adding inset handling to ErrorReportActivity. No unrelated implemen…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit hops past the status bar,
And finds the error text in view.
The root now fits the window bounds,
With system insets accounted through.
One small line joins layout lore,
Then bunny bounds away once more.

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

This branch has not been deployed

No deployments
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.

ErrorReportActivity draws under the status bar on targetSdk 35 (forced edge-to-edge)

1 participant