Skip to content

feat: allow disabling provider update notifications#3130

Open
repparw wants to merge 1 commit into
pingdotgg:mainfrom
repparw:disable-provider-update-notifications
Open

feat: allow disabling provider update notifications#3130
repparw wants to merge 1 commit into
pingdotgg:mainfrom
repparw:disable-provider-update-notifications

Conversation

@repparw

@repparw repparw commented Jun 17, 2026

Copy link
Copy Markdown

Summary

Adds suppressProviderUpdateNotifications to the server environment descriptor capabilities. When the server sets T3CODE_DISABLE_PROVIDER_UPDATE_NOTIFICATIONS=1 / true, the web client reads this capability at runtime from GET /.well-known/t3/environment and 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 — Adds suppressProviderUpdateNotifications to ExecutionEnvironmentCapabilities (defaults false)
  • apps/server/src/environment/Layers/ServerEnvironment.ts — Reads T3CODE_DISABLE_PROVIDER_UPDATE_NOTIFICATIONS from process.env
  • apps/web/src/components/ProviderUpdateLaunchNotification.tsx — Reads capability from descriptor via Zustand store
  • apps/web/src/environments/primary/context.ts — Exports usePrimaryEnvironmentBootstrapStore

Motivation

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

T3CODE_DISABLE_PROVIDER_UPDATE_NOTIFICATIONS=1 t3code serve --mode web

Test plan

  • Run with the env var set — confirm no popup
  • Confirm provider/version advisory data still exists server-side
  • Backward compatible via withDecodingDefault

Note

Low Risk
Small, opt-in behavior behind a server env flag; no changes to auth, provider updates, or version detection logic.

Overview
Adds suppressProviderUpdateNotifications to the execution environment descriptor so the server can tell the web client not to show provider update launch toasts.

Set T3CODE_DISABLE_PROVIDER_UPDATE_NOTIFICATIONS to 1 or true on the server; that value is exposed in descriptor.capabilities. ProviderUpdateLaunchNotification reads 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.

usePrimaryEnvironmentBootstrapStore is 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 suppressProviderUpdateNotifications capability to disable provider update toasts

  • Adds a suppressProviderUpdateNotifications boolean field to the ExecutionEnvironmentCapabilities schema in environment.ts, defaulting to false.
  • Reads the T3CODE_DISABLE_PROVIDER_UPDATE_NOTIFICATIONS env var ("1" or "true"true) in ServerEnvironment.ts and sets the capability accordingly.
  • Skips rendering provider update toasts in ProviderUpdateLaunchNotification.tsx when the capability is true.
  • Exports usePrimaryEnvironmentBootstrapStore from context.ts so the notification component can read the capability.

Macroscope summarized e7f9677.


Open in Devin Review

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e8de9c42-eac8-452b-8622-36e52bb202fb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Jun 17, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread apps/web/src/components/ProviderUpdateLaunchNotification.tsx Outdated
@macroscopeapp

macroscopeapp Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

@repparw repparw force-pushed the disable-provider-update-notifications branch from 9007429 to 920b058 Compare June 17, 2026 18:18
@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). and removed size:XS 0-9 changed lines (additions + deletions). labels Jun 17, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jun 17, 2026
@repparw repparw force-pushed the disable-provider-update-notifications branch from 920b058 to b801730 Compare June 17, 2026 18:20
@macroscopeapp macroscopeapp Bot dismissed their stale review June 17, 2026 18:20

Dismissing prior approval to re-evaluate b801730

@github-actions github-actions Bot added size:XS 0-9 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels Jun 17, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jun 17, 2026
@repparw repparw force-pushed the disable-provider-update-notifications branch from b801730 to e7f9677 Compare June 17, 2026 18:37
@macroscopeapp macroscopeapp Bot dismissed their stale review June 17, 2026 18:37

Dismissing prior approval to re-evaluate e7f9677

@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). and removed size:XS 0-9 changed lines (additions + deletions). labels Jun 17, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants