feat: allow disabling provider update notifications#3130
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9007429. Configure here.
ApprovabilityVerdict: Approved This PR adds a simple opt-in environment variable to suppress provider update notifications. The changes are self-contained, additive, and preserve default behavior (notifications remain enabled unless explicitly disabled). You can customize Macroscope's approvability policy. Learn more. |
9007429 to
920b058
Compare
920b058 to
b801730
Compare
Dismissing prior approval to re-evaluate b801730
b801730 to
e7f9677
Compare
Dismissing prior approval to re-evaluate e7f9677
|
this feels like the wrong approach. should jsut be a setting like everythign else and it shouldn't be a UI level thing, it should block the update checker to run in the first place, not just suppress the toast |

Summary
Adds
suppressProviderUpdateNotificationsto the server environment descriptor capabilities. When the server setsT3CODE_DISABLE_PROVIDER_UPDATE_NOTIFICATIONS=1/true, the web client reads this capability at runtime fromGET /.well-known/t3/environmentand suppresses provider update launch notifications.Unlike a build-time
VITE_*flag, this works at runtime — users of pre-built binaries (Nix, Homebrew, etc.) can set the env var on the server process without rebuilding.Changes
packages/contracts/src/environment.ts— AddssuppressProviderUpdateNotificationstoExecutionEnvironmentCapabilities(defaultsfalse)apps/server/src/environment/Layers/ServerEnvironment.ts— ReadsT3CODE_DISABLE_PROVIDER_UPDATE_NOTIFICATIONSfromprocess.envapps/web/src/components/ProviderUpdateLaunchNotification.tsx— Reads capability from descriptor via Zustand storeapps/web/src/environments/primary/context.ts— ExportsusePrimaryEnvironmentBootstrapStoreMotivation
Some users install providers through external package managers (Nix/nixpkgs), where npm latest is not the source of truth. The update popup is noisy when versions are pinned by the system package set.
Usage
Test plan
withDecodingDefaultNote
Low Risk
Small, opt-in behavior behind a server env flag; no changes to auth, provider updates, or version detection logic.
Overview
Adds
suppressProviderUpdateNotificationsto the execution environment descriptor so the server can tell the web client not to show provider update launch toasts.Set
T3CODE_DISABLE_PROVIDER_UPDATE_NOTIFICATIONSto1ortrueon the server; that value is exposed indescriptor.capabilities.ProviderUpdateLaunchNotificationreads it from the primary environment bootstrap store and returns early from the prompt/update toast effect when suppression is on. Provider version detection and advisory state are unchanged—only the popup is skipped.usePrimaryEnvironmentBootstrapStoreis exported from the primary environment context so the notification component can subscribe to the descriptor.Reviewed by Cursor Bugbot for commit e7f9677. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add
suppressProviderUpdateNotificationscapability to disable provider update toastssuppressProviderUpdateNotificationsboolean field to theExecutionEnvironmentCapabilitiesschema in environment.ts, defaulting tofalse.T3CODE_DISABLE_PROVIDER_UPDATE_NOTIFICATIONSenv var ("1"or"true"→true) in ServerEnvironment.ts and sets the capability accordingly.true.usePrimaryEnvironmentBootstrapStorefrom context.ts so the notification component can read the capability.Macroscope summarized e7f9677.