feat(mobile): report network and app errors to Sentry with rich metadata - #6109
Open
iscekic wants to merge 1 commit into
Open
feat(mobile): report network and app errors to Sentry with rich metadata#6109iscekic wants to merge 1 commit into
iscekic wants to merge 1 commit into
Conversation
iscekic
marked this pull request as draft
September 13, 2026 05:42
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Previous Review Summaries (2 snapshots, latest commit 145bc86)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 145bc86)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (12 files)
Fix these issues in Kilo Cloud Previous review (commit 9a94526)Status: 3 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (22 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
iscekic
added a commit
that referenced
this pull request
Sep 13, 2026
iscekic
force-pushed
the
kwf/surface-the-mobile-app-apps-mobile-9518
branch
from
September 13, 2026 06:18
796d71c to
0c639ef
Compare
iscekic
added a commit
that referenced
this pull request
Sep 13, 2026
iscekic
force-pushed
the
kwf/surface-the-mobile-app-apps-mobile-9518
branch
from
September 13, 2026 07:18
0c639ef to
2a0ba24
Compare
iscekic
added a commit
that referenced
this pull request
Sep 13, 2026
iscekic
force-pushed
the
kwf/surface-the-mobile-app-apps-mobile-9518
branch
from
September 13, 2026 08:50
2a0ba24 to
90933f5
Compare
iscekic
added a commit
that referenced
this pull request
Sep 13, 2026
iscekic
force-pushed
the
kwf/surface-the-mobile-app-apps-mobile-9518
branch
from
September 13, 2026 09:11
90933f5 to
b73b73a
Compare
iscekic
added a commit
that referenced
this pull request
Sep 13, 2026
iscekic
force-pushed
the
kwf/surface-the-mobile-app-apps-mobile-9518
branch
from
September 13, 2026 09:15
b73b73a to
145bc86
Compare
Contributor
Author
|
bot: Cross-platform fix. Pushed b73b73a (kwf What changed:
|
iscekic
marked this pull request as ready for review
September 13, 2026 09:40
iscekic
marked this pull request as draft
September 13, 2026 09:44
iscekic
force-pushed
the
kwf/surface-the-mobile-app-apps-mobile-9518
branch
from
September 13, 2026 10:03
145bc86 to
de8c387
Compare
iscekic
marked this pull request as ready for review
September 13, 2026 10:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog for users
codereach Sentry instead of being dropped as already reported.Changelog for maintainers
apps/mobile/src/lib/telemetry/error-sink.tsis a transport-neutralcaptureTelemetry/setTelemetrySinklayer that must never import@sentry/react-native;apps/mobile/src/lib/telemetry/install-error-reporting.tsattaches the Sentry adapter and wraps globalfetchonce with a guard onglobalThis, and the root layout installs it at module scope.observedFetchinapps/mobile/src/lib/trpc.tswrapsdeadlineFetchand reports every rejection, HTTP>= 400, and batched HTTP 207 once at warning level; the global wrapper covers other http(s) requests and skips/api/trpcplus Sentry, PostHog, AppsFlyer, and Expo hosts. Network events tagerror.subsystem,error.source,network.outcome,http.method,http.status,http.status_class,trpc.procedure, andtrpc.code;contexts.networkcarries the query-stripped URL, duration, status, procedure, code, andtimedOut. Bodies and headers are never captured; review thenetwork-errorfingerprint string first.reportAppError, which skips tRPC-named errors, a tRPCdata.codeorshape.data.codeenvelope,CancelledError, andRequestDeadlineError; uncaught JS errors, unhandled rejections, and render or route errors were already covered by the SDK handlers andSentry.wrap. Review theapp-errorfingerprint string first.extraErrorDataIntegrationnow registers in both consent branches, andscrubEventredacts token-shaped values at any depth inextra,tags, and the exception-named context the integration attaches, with a cycle guard.apps/mobile/src/components/screen-header.tsxno longer forks header padding onPlatform.OS:modalalone selects a fixed 32 top padding (MODAL_HEADER_TOP_PADDING), and only a pinned header adds the reported safe-area inset plus 8; a native sheet is its own window that reports the inset it needs, so the fixed clearance holds on both platforms. Modal headers no longer reserve the offline banner height on either platform (replacing the iOS-only exception), while a pinned header still does through the leaf module inapps/mobile/src/components/offline-banner-space.tsx;apps/mobile/src/components/screen-header.mounted.test.tsxflipsPlatform.OSper assertion and pins iOS and Android to identical padding for modal and pinned headers, with and without the offline banner.extraErrorDataIntegrationattaches a thrown error's own properties under a context named after the exception, andscrubEventredacted only top-levelextraandtags, so token-shaped values in that context reached Sentry unredacted.scrubEventnow walks the named context at any depth with a cycle guard; tests cover a nested token and a cyclic value.installedguard reset when Fast Refresh re-evaluated the module, soglobalThis.fetchwas wrapped again and reports were duplicated. The guard now lives onglobalThisand survives Fast Refresh; a test loads a fresh module instance, installs again, and asserts the fetch wrapper is unchanged.codeas already reported by the network layer, so unrelated errors such as a filesystemENOENTwere dropped. It now matches only a tRPCcodeenvelope (data.codeorshape.data.code) and reports an error whose only code is top-level.E2E proof
p9-offline-nav.mp4
p3-rec.mp4
e1-toast-rec.mp4
The new
[e1]modal-header-clearance and[e2]pinned-header-reservation checks replace the earlier pinned-header reservation and post-restore[e1]/[e1-recover]checks; the pinned-header behavior is re-measured on the branch that removes the platform fork, and its captures stay valid because the repair does not change that behavior. Both checks ran on the Android emulator; the change removes the platform branch, so iOS shares the same modal rule. The remaining captures are unchanged. The mutation-toast captures are visual-only: the toast text is not present in the accessibility hierarchy or logcat.Owner request