[Bug]: Add provider can create a built-in driver's default instance, which has no delete action
维护者通常 1 天内回复
评估
- 难度
- 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.tsxreturns the driver ID itself (pi,cursor,antigravity,kiro, …). ItsexistingIdsset only reservescodexandclaudeAgent, so those driver IDs are accepted. - That ID is exactly what
defaultInstanceIdForDriverreturns for the driver, andProviderInstanceRegistryHydration.deriveProviderInstanceConfigMapalways 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.tsxmarks any instance whose ID equals the default ID asisDefault, and only passesonDeletefor non-default rows.ProviderInstanceCardrenders the trash button only whenonDeleteis 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
- Open Settings → Providers.
- Click Add provider, choose Pi (or Cursor, Antigravity, Kiro), leave the label unchanged, click Next and Add instance.
- Select the new row and open its detail pane.
- Only "Reset Pi provider settings" is shown. There is no Delete / trash action.
- 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 分钟
- 30 天内合并 PR
- 488
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pingdotgg/t3code 的其他 Issue
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
pingdotgg/t3code#38462 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
solidjs/solid-docs#1716 ·
维护者通常 1 天内回复
-
Progress indicated by console logs is off by one可能已有人在做 @marceliwac 今天认领。 未关闭bug needs-triage
难度 2/5 1-3 小时 新手友好度 76/100
aws-samples/aws-cdk-examples#1336 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
melgarafael/DeskcommCRM#4999 · 1 条评论 ·
维护者通常 1 天内回复
-
type: bug
难度 2/5 1-3 小时 新手友好度 78/100
nrwl/nx#37955 · 1 个 reaction ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
db-ux-design-system/core-web#8856 ·
维护者通常 1 天内回复