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.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d529034 and 0e1da8f.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

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.

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

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: Minimal · previous review 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 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

ℹ️ 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.

@NathanWalker NathanWalker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. This is the right minimal fix: error_activity.xml ships to apps through the framework's app/src/debug, ErrorReportActivity doesn't handle insets anywhere else, and the root RelativeLayout has no padding of its own for the inset padding to overwrite. Pre-35 and non-edge-to-edge windows are unaffected because the decor consumes the insets first.

One thing before merge: CI never actually ran on this PR. The Pull Request and Dependency Review workflows for 115c5e9 finished as failures with zero jobs, so the only green check is CodeRabbit. Could you rebase onto current main (or push an empty commit) so Build/Test run? The test-plan boxes are also unchecked. If you got to the API 35 check, a quick before/after screenshot would be great.

…-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
@aleclarson
aleclarson force-pushed the fix/error-report-edge-to-edge branch from d529034 to 0e1da8f Compare November 16, 2026 17:08
@aleclarson

Copy link
Copy Markdown
Author

Rebased and force pushed

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)

2 participants