LLM configs: edit/delete buttons available for all rows
Previously gated to tenant-owned rows (tenant_id != null), which made seed-from-catalog rows uneditable since they default to platform scope on the backend. The backend doesn't enforce extra ownership rules on update/delete either, so the gate was a UI overreach. Buttons now appear on every row. Tooltips clarify when a row is a platform default so the operator knows the change applies broadly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -425,28 +425,26 @@ function ConfigRow({
|
|||||||
aria-label={c.enabled ? "Disable" : "Enable"}
|
aria-label={c.enabled ? "Disable" : "Enable"}
|
||||||
data-action={`llm-config-enabled-${c.id}`}
|
data-action={`llm-config-enabled-${c.id}`}
|
||||||
/>
|
/>
|
||||||
{c.tenant_id != null ? (
|
<Button
|
||||||
<>
|
variant="ghost"
|
||||||
<Button
|
size="sm"
|
||||||
variant="ghost"
|
onClick={onEdit}
|
||||||
size="sm"
|
data-action={`llm-config-edit-${c.id}`}
|
||||||
onClick={onEdit}
|
aria-label="Edit"
|
||||||
data-action={`llm-config-edit-${c.id}`}
|
title={c.tenant_id == null ? "Edit platform default (visible to all tenants)" : "Edit"}
|
||||||
aria-label="Edit"
|
>
|
||||||
>
|
<Pencil className="size-4" />
|
||||||
<Pencil className="size-4" />
|
</Button>
|
||||||
</Button>
|
<Button
|
||||||
<Button
|
variant="ghost"
|
||||||
variant="ghost"
|
size="sm"
|
||||||
size="sm"
|
onClick={onDelete}
|
||||||
onClick={onDelete}
|
data-action={`llm-config-delete-${c.id}`}
|
||||||
data-action={`llm-config-delete-${c.id}`}
|
aria-label="Delete"
|
||||||
aria-label="Delete"
|
title={c.tenant_id == null ? "Delete platform default" : "Delete"}
|
||||||
>
|
>
|
||||||
<Trash2 className="size-4" />
|
<Trash2 className="size-4" />
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
|
||||||
) : null}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user