feat: allow disabling provider update checks#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 |
ApprovabilityVerdict: Needs human review This PR introduces a new user-facing feature (toggle to disable provider update checks) with changes spanning 5 provider drivers, a new abstraction layer, schema additions, and UI controls. The cross-cutting nature of the changes and the author being new to the codebase warrant human review. 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 |
Dismissing prior approval to re-evaluate 8e49a0d
Summary
Adds a persisted server setting,
enableProviderUpdateChecks, to control provider CLI update checks. When disabled, provider snapshot enrichment skips latest-version resolution entirely instead of letting the checker run and hiding the resulting UI notification.Changes
packages/contracts/src/settings.ts— AddsenableProviderUpdateChecksto server settings and settings patches, defaulting totrue.apps/web/src/components/settings/SettingsPanels.tsx— Adds a General Settings switch for provider update checks.apps/server/src/provider/providerUpdateSettings.ts— Shares provider snapshot settings derived from provider config plus server settings.apps/server/src/provider/providerMaintenance.ts— Skips latest-version resolution when update checks are disabled, returning an unknown advisory without contacting the registry.Motivation
Some users install providers through external package managers such as Nix/nixpkgs, where npm latest is not the source of truth. In that case T3 Code should not run the provider update checker at all, rather than only suppressing the launch notification.
Test plan
vp run typecheckvp checkvp test run apps/server/src/provider/providerMaintenance.test.tsNote: in this local shell, normal
pnpm installfailed becausenode-ptyneeded Python fornode-gyp; dependencies were linked withpnpm install --ignore-scriptsso the validation commands could run.Note
Add
enableProviderUpdateCheckssetting to disable provider version advisory checksenableProviderUpdateChecksboolean (defaulttrue) toServerSettingsandServerSettingsPatchin settings.ts, and exposes a toggle in the General settings panel.enrichProviderSnapshotWithVersionAdvisoryin providerMaintenance.ts to skip network version lookups when the flag isfalse, preservingcheckedAtwithout making requests.ServerSettingsServiceand propagateenableProviderUpdateChecksthrough their snapshot enrichment pipelines via the new providerUpdateSettings.ts module.ServerSettingsServiceat runtime; tests must includeServerSettingsService.layerTest()in their test layers.Macroscope summarized 8e49a0d.