From 4671def313039c3da0a4bd36f243744299ec4c72 Mon Sep 17 00:00:00 2001 From: j0ntz Date: Thu, 30 Apr 2026 16:56:14 -0700 Subject: [PATCH] Make LogBox configurable In preparation for making it easier for agents to control the sim --- CHANGELOG.md | 2 ++ src/app.ts | 13 ++++++++----- src/envConfig.ts | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b833d3923e1..3b6bf79791f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased (develop) +- added: Logbox disable option to env.json + ## 4.49.0 (staging) - added: Honor `af` affiliate parameter on `deep.edge.app` deep links, activating the promotion alongside any inner payload (e.g. private-key import). diff --git a/src/app.ts b/src/app.ts index 005681c2ce0..9f8f3c33bb9 100644 --- a/src/app.ts +++ b/src/app.ts @@ -58,11 +58,14 @@ if (ENV.SENTRY_ORGANIZATION_SLUG.includes('SENTRY_ORGANIZATION')) { } // Uncomment the next line to remove popup warning/error boxes. -// LogBox.ignoreAllLogs() -LogBox.ignoreLogs([ - 'Require cycle:', - 'Attempted to end a Span which has already ended.' -]) +if (ENV.LOGBOX_DISABLE) { + LogBox.ignoreAllLogs() +} else { + LogBox.ignoreLogs([ + 'Require cycle:', + 'Attempted to end a Span which has already ended.' + ]) +} // Mute specific console output types. // Useful for debugging using console output, i.e. mute everything but `debug` diff --git a/src/envConfig.ts b/src/envConfig.ts index bec163c45c2..149d1383f28 100644 --- a/src/envConfig.ts +++ b/src/envConfig.ts @@ -558,5 +558,6 @@ export const asEnvConfig = asObject({ overrideThemeFile: '/Users/username/Documents/overrideTheme.json' } ), - EXPERIMENT_CONFIG_OVERRIDE: asOptional(asObject(asString), {}) + EXPERIMENT_CONFIG_OVERRIDE: asOptional(asObject(asString), {}), + LOGBOX_DISABLE: asOptional(asBoolean, false) }).withRest