feat(react-grab): add silent option to suppress intro log#318
Open
ElminD wants to merge 2 commits into
Open
Conversation
Lets consumers opt out of the intro banner and version-check console.log so it isn't picked up by tools like Sentry that forward console output as breadcrumbs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
|
Someone is attempting to deploy a commit to the Million Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c931024. Configure here.
Contributor
There was a problem hiding this comment.
1 issue found across 4 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/react-grab/src/types.ts">
<violation number="1" location="packages/react-grab/src/types.ts:261">
P2: `silent` is init-only but `SettableOptions extends Options` exposes it on `api.setOptions()`. Add a `silent?: never` override in `SettableOptions` (matching the existing pattern for `enabled`) so TypeScript rejects the no-op call.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
`silent` is consumed during `init()` and has no effect at runtime, so exposing it on `api.setOptions()` would type-check as a no-op. Override it as `never` in `SettableOptions` to match the existing `enabled` pattern, and strip it alongside `enabled` before forwarding to the plugin registry. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.

Our sentry sends logs and it would be nice to silence the intro - Elmin
Summary
silent?: booleanoption toinit()that gates thelogIntro()call inpackages/react-grab/src/core/index.tsx.data-optionsJSON attribute inget-script-options.tsso it works for the script-tag install path too.Optionsinterface intypes.ts.Why
When react-grab is initialized in an app that forwards
consoleoutput to an error tracker (e.g. Sentry breadcrumbs), the intro banner and the follow-up version-check log get pushed upstream every page load. There's currently no way to opt out without monkey-patchingconsole.log. This adds a single, explicit knob.Usage
Or via script tag:
Default is
false, so existing consumers see no change.Test plan
pnpm --filter react-grab typecheckpnpm lintinit({ silent: true })produces no console output, andinit()(orinit({ silent: false })) still logs the banner + performs the version check.🤖 Generated with Claude Code
Note
Low Risk
Low risk: adds an opt-in flag that only gates console/banner output and the version-check log, with no functional changes to selection/copy behavior.
Overview
Adds a new
silent?: booleaninit-only option to suppress React Grab’s startup banner and version-check logging (including when configured via script tagdata-options).Updates public types so
silentcannot be changed viasetOptions, and ships a minor version bump via a changeset.Reviewed by Cursor Bugbot for commit 17ad710. Bugbot is set up for automated code reviews on this repo. Configure here.