Skip to content

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

fix(ui_annotation_drawer): fix state management of form reset (#2607)

marliessophiec2a68ab339b1
diff --git a/web/src/components/session/index.tsx b/web/src/components/session/index.tsx
index ef7aefde0c..eb665684d9 100644
--- a/web/src/components/session/index.tsx
+++ b/web/src/components/session/index.tsx
@@ -132,6 +132,7 @@ export const SessionPage: React.FC<{
variant="badge"
type="session"
source="SessionDetail"
+ key={"annotation-drawer" + trace.id}
/>
</div>
</Card>
diff --git a/web/src/components/trace/ObservationPreview.tsx b/web/src/components/trace/ObservationPreview.tsx
index 1dbec9be1a..ff70655172 100644
--- a/web/src/components/trace/ObservationPreview.tsx
+++ b/web/src/components/trace/ObservationPreview.tsx
@@ -165,6 +165,7 @@ export const ObservationPreview = (props: {
observationId={preloadedObservation.id}
scores={props.scores}
type="observation"
+ key={"annotation-drawer" + preloadedObservation.id}
/>
{observationWithInputAndOutput.data?.type === "GENERATION" && (
<JumpToPlaygroundButton
diff --git a/web/src/components/trace/TracePreview.tsx b/web/src/components/trace/TracePreview.tsx
index 44cb1c4a30..26619efd01 100644
--- a/web/src/components/trace/TracePreview.tsx
+++ b/web/src/components/trace/TracePreview.tsx
@@ -100,6 +100,7 @@ export const TracePreview = ({
projectId={trace.projectId}
traceId={trace.id}
scores={scores}
+ key={"annotation-drawer" + trace.id}
/>
<NewDatasetItemFromTrace
traceId={trace.id}