[Bug]: Add provider can create a built-in driver's default instance, which has no delete action

オープン 初心者向け
#38,490 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@nateEc がすでに取り組んでいます。

2026年11月19日 から。

  • #38872 @nateEc による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
77/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
react, typescript
領域
frontend

調査の方向性

まず AddProviderInstanceDialog.tsx と ProviderSettingsPanel.tsx から始め、次に defaultInstanceIdForDriver と ProviderInstanceRegistryHydration.deriveProviderInstanceConfigMap がデフォルトインスタンスをどのように特定するかを追ってください。ラベルが変更されていない組み込みプロバイダーで再現し、プロバイダーインスタンスの作成と削除に関する既存のテストを調べてください。ダイアログから追加したプロバイダーに明確な削除操作があり、その回帰がテストでカバーされていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

What happened

I added four providers through Settings → Providers → Add provider: Pi, Cursor, Antigravity and Kiro. All four now appear in Settings, but none of them has a delete action. Their detail pane only offers "Reset provider settings to default". Instances I added with a custom ID, such as a second Claude account or an ACP Registry agent, do show the trash / "Delete instance" action.

Why this happens
  • Add provider pre-fills the label with the provider's label and derives the instance ID from that label. When the label still equals the provider label, AddProviderInstanceDialog.tsx returns the driver ID itself (pi, cursor, antigravity, kiro, …). Its existingIds set only reserves codex and claudeAgent, so those driver IDs are accepted.
  • That ID is exactly what defaultInstanceIdForDriver returns for the driver, and ProviderInstanceRegistryHydration.deriveProviderInstanceConfigMap always adds a default instance for every built-in driver. The created entry is therefore treated as the driver's default slot, not as an added instance.
  • ProviderSettingsPanel.tsx marks any instance whose ID equals the default ID as isDefault, and only passes onDelete for non-default rows. ProviderInstanceCard renders the trash button only when onDelete is set; default rows get the Reset button instead.
  • Reset does remove the stored entry, but the button and its confirmation only say "Reset … to its defaults", so nothing tells the user it is the only removal path. The row is also the only place that provider can be managed.
Steps to reproduce
  1. Open Settings → Providers.
  2. Click Add provider, choose Pi (or Cursor, Antigravity, Kiro), leave the label unchanged, click Next and Add instance.
  3. Select the new row and open its detail pane.
  4. Only "Reset Pi provider settings" is shown. There is no Delete / trash action.
  5. Clicking Reset asks to reset the provider to its defaults, not to remove it.
Expected behavior

A provider created through Add provider should be deletable like any other added instance. Either the dialog should not derive a built-in driver's default ID for new instances, or a default-slot row with an explicit stored config should also offer Delete.

Actual behavior

The created rows are reset-only and are indistinguishable from built-in defaults, so they look like providers that cannot be deleted.

Version

T3 Code 0.1.9 (desktop), macOS 27.0 arm64. The same code is on main today: AddProviderInstanceDialog.tsx still reserves only codex and claudeAgent, and ProviderSettingsPanel.tsx still renders onDelete only for !isDefault.

主要言語
TypeScript
スター
24.8k
フォーク
6.4k
平均マージ
4時間 46分
マージ済み PR(30日)
488

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pingdotgg/t3code のほかの issue

pingdotgg/t3code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。