Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix: fix front end confirmations to delete traces (#4601)

Max Deichmannb9305e76f519
diff --git a/web/src/components/deleteButton.tsx b/web/src/components/deleteButton.tsx
index bfeae34af3..ae460f7dc5 100644
--- a/web/src/components/deleteButton.tsx
+++ b/web/src/components/deleteButton.tsx
@@ -103,7 +103,10 @@ export function DeleteButton({
variant="destructive"
loading={traceMutation.isLoading || isDeleted}
onClick={() => {
- if (deleteConfirmationInput !== deleteConfirmation) {
+ if (
+ deleteConfirmation &&
+ deleteConfirmationInput !== deleteConfirmation
+ ) {
alert("Please type the correct confirmation");
return;
}
@@ -124,7 +127,10 @@ export function DeleteButton({
variant="destructive"
loading={datasetMutation.isLoading || isDeleted}
onClick={() => {
- if (deleteConfirmationInput !== deleteConfirmation) {
+ if (
+ deleteConfirmation &&
+ deleteConfirmationInput !== deleteConfirmation
+ ) {
alert("Please type the correct confirmation");
return;
}
diff --git a/web/src/components/trace/index.tsx b/web/src/components/trace/index.tsx
index 1dc10025c8..fd625583ba 100644
--- a/web/src/components/trace/index.tsx
+++ b/web/src/components/trace/index.tsx
@@ -379,6 +379,7 @@ export function TracePage({
invalidateFunc={() => void utils.traces.all.invalidate()}
type="trace"
redirectUrl={`/project/${router.query.projectId as string}/traces`}
+ deleteConfirmation={trace.data.name ?? ""}
/>
</>
}