Skip to content

fix(web): a deleted default provider leaves the provider list - #541

Merged
adampeterhiggins merged 1 commit into
mainfrom
t3code/fix-deleted-provider-marker
Nov 3, 2026
Merged

adampeterhiggins merged 1 commit into
mainfrom
t3code/fix-deleted-provider-marker

Conversation

@adampeterhiggins

Copy link
Copy Markdown
Owner

Deleting a default provider (Codex or Claude) in Settings › Providers left it in the list as "Disabled" instead of removing it. The panel saved a disabled entry with config: { enabled: false } as its "removed" marker, but server settings normalization (upstream's foldProviderInstanceEnabledFlags, pingdotgg#7459) folds config.enabled into the envelope and drops it, so the stored entry became { enabled: false, config: {} } and the panel no longer recognised it. This is an existing fork bug on main, found while testing the upstream sync in a real web client.

The marker now lives in its own config key (removedFromProviderList), which normalization leaves alone. The marker and its check moved to packages/contracts so the server test can use them. Editing or re-enabling a removed entry clears the marker, so a provider that is turned back on and later switched off stays listed. Upstream's server folding is unchanged.

Found after the upstream sync (#538) merged; based on main.

Existing entries already saved as { enabled: false, config: {} } keep showing as "Disabled". That shape can't be told apart from a provider that was only switched off, so they are not migrated.

Verification

  • New server test keeps a removed default provider marked until it is edited passes. With the old config.enabled: false marker it fails (expected false to be true).
  • serverSettings.test.ts (70 tests) and ProviderSettingsPanel.environment.browser.test.tsx (15 tests) pass. Typecheck passes for contracts, web and server, and format, lint and knip pass.
  • Real web client (dev server, Replay provider): deleting Codex removes it from the list, settings.json stores { driver: "codex", enabled: false, config: { removedFromProviderList: true } }, and it stays gone after a reload. Before the fix it stayed listed as "Disabled".

Merge with Create a merge commit.

Model: claude-opus-5-5. Harness: Claude Code in T3 Code.

🤖 Generated with Claude Code

Deleting Codex or Claude saved a disabled entry marked with config.enabled:
false, but settings normalization folds that flag into the envelope and drops
it, so the provider stayed listed as Disabled. Mark the entry with its own
config key instead, and clear it when the provider is edited or re-enabled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adampeterhiggins
adampeterhiggins merged commit b6e766e into main Nov 3, 2026
@adampeterhiggins
adampeterhiggins deleted the t3code/fix-deleted-provider-marker branch November 3, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant