Repository navigation
feat(cli): Add persistent tips default and SENTRY_DISABLE_TIPS override - #1522
Merged
Merged
Conversation
Let users hide the `Tip: ...` hints printed below command output, either persistently with `sentry cli defaults tips off` or per session with `SENTRY_DISABLE_TIPS=1` (the env var wins over the stored preference). Only tip text is removed: pagination, dry-run, cancellation and other notices that share the command hint footer are kept, as is the cache-age footer. No CLI flag is added. Ported from getsentry/cli#1414 with the review feedback applied. Closes #1479 Co-Authored-By: Burak Yigit Kaya <burak.kaya@sentry.io>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
BYK
reviewed
Oct 16, 2026
- Add getOnOffPreference/setOnOffPreference so the telemetry, agent-skills, graphics and tips accessors stop duplicating the metadata read/write logic, and an onOffHandler factory for the matching `sentry cli defaults` handlers. - Build the clear-all confirmation key list from the defaults registry instead of a hand-maintained string. - Memoize tipsSuppressed() per env object (same pattern as getAuthToken), reset when the tips default changes and between tests.
BYK
approved these changes
Oct 16, 2026
Replace the per-preference get/set wrappers (telemetry, agent-skills, graphics, tips) with exported getOnOffPreference(name) and setOnOffPreference(name, enabled) backed by one key map, and build the matching `sentry cli defaults` handlers from ON_OFF_PREFERENCES. The tips cache reset moves into a per-preference change hook.
BYK
approved these changes
Oct 16, 2026
BYK
left a comment
Member
There was a problem hiding this comment.
The preference names should be an enum or a restricted string type.
I also think with your latest abstractions a bunch of tests became redundant.
Declare the on/off preference names as a const tuple so OnOffPreference is a restricted string union (no Object.keys cast), derive their metadata keys and DefaultsState fields from it, and collapse the per-preference storage tests into one parameterized block.
Contributor
Author
|
Addressed the review notes in 4401285:
|
This branch was previously deployed
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.
Closes #1479
Lets users hide the
Tip: ...hints printed below command output:sentry cli defaults tips offstores the preference in the CLI DB, next to the existinggraphics/telemetrydefaults, and it shows up insentry cli defaults(human + JSON) and--clear.SENTRY_DISABLE_TIPS=1turns tips off for a session and wins over the stored preference. It's registered in the env-var registry so it appears in the generated configuration docs.This ports getsentry/cli#1414, which stalled before the repo move, and applies the feedback left there. The main behavior change from that version: the command
hintfooter also carries pagination, dry-run, cancellation and "not found" notices, so we no longer drop the whole hint. OnlyTip:text is stripped (a whole line, or a trailing... Tip: ...sentence), and the cache-age footer stays. Theissue listfooter tip and theproject createtip, which are rendered by formatters rather than the hint footer, follow the same setting.Tips that are part of error messages (unknown-command suggestions,
Tip: use --help) are left alone on purpose. They're recovery guidance, not footer noise.via byk.
--
View Junior Session [Sentry]