feat(settings): gate TelemetryField on isEnterprise prop#2298
Merged
Conversation
Today GeneralTabWrapper accepts an `isEnterprise` prop that hides ExperimentalFeatures. Extend the same gate to also hide the Sentry "Error reporting" toggle when set. Rebranded / enterprise builds typically ship without a Sentry DSN (`enabled: !!import.meta.env.VITE_SENTRY_DSN` is false in those builds), so the toggle is a confusing no-op for end users. Letting downstream consumers hide it via the existing prop avoids overlay-copying the whole wrapper component. OSS behavior is unchanged: `isEnterprise` defaults to `false`, so the toggle still renders in the OSS GeneralTab.
Contributor
There was a problem hiding this comment.
Pull request overview
Gates the Sentry TelemetryField in the Settings → General tab behind the existing isEnterprise prop on GeneralTabWrapper, so enterprise/branded builds without a Sentry DSN don't show a no-op "Error reporting" toggle. OSS default behavior is unchanged.
Changes:
- Wrap
<TelemetryField />and its trailing<Separator />in a!isEnterpriseconditional inGeneralTabWrapper. - Add a test verifying the telemetry toggle is hidden when
isEnterpriseis true.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| renderer/src/common/components/settings/tabs/components/general-tab-wrapper.tsx | Conditionally render TelemetryField + separator only when not enterprise. |
| renderer/src/common/components/settings/tabs/tests/general-tab.test.tsx | New test asserting telemetry toggle is absent with isEnterprise={true}. |
kantord
approved these changes
May 29, 2026
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.
Summary
Extends the existing
isEnterpriseprop inGeneralTabWrapper(which already gatesExperimentalFeatures) to also gate the SentryTelemetryField. Default behavior unchanged for OSS.Why
Rebranded / enterprise builds (e.g. stacklok-enterprise-platform's Stacklok Desktop distro) ship without a Sentry DSN, so
Sentry.init({ enabled: !!import.meta.env.VITE_SENTRY_DSN })is false. The "Error reporting" toggle in Settings → General is a no-op in those builds and confuses end users.The enterprise overlay already passes
isEnterprise={true}toGeneralTabWrapper(merged in stacklok/stacklok-enterprise-platform#1317). After this PR ships and the submodule is synced, the toggle will disappear in enterprise without any further changes.Pattern
Mirrors the existing gate for
ExperimentalFeaturesin the same component.Test plan
pnpm run lintpnpm run type-checkpnpm run formatpnpm run test:nonInteractive— 2451/2451 passing (+1 new test ingeneral-tab.test.tsx)<GeneralTabWrapper isEnterprise />in a story or test app, confirm Error reporting + Experimental Features sections are both hidden, other fields (Theme / Start on login / Quit confirmation) remain visible.