🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(evals): refine decision question header (#18535)
Tobias Wochingera0a6b3bd0999
diff --git a/web/src/features/evals/v2/components/Evaluators/DecisionModel/ChoiceOptionsEditor/ChoiceOptionsEditor.tsx b/web/src/features/evals/v2/components/Evaluators/DecisionModel/ChoiceOptionsEditor/ChoiceOptionsEditor.tsxindex 4f7bd2a0b3..4887861b63 100644--- a/web/src/features/evals/v2/components/Evaluators/DecisionModel/ChoiceOptionsEditor/ChoiceOptionsEditor.tsx+++ b/web/src/features/evals/v2/components/Evaluators/DecisionModel/ChoiceOptionsEditor/ChoiceOptionsEditor.tsx@@ -87,7 +87,7 @@ export function ChoiceOptionsEditor({: `Keep at least ${DECISION_MODEL_LIMITS.minChoiceOptions} options`}>- <Trash2 className="icon-sm" />+ <Trash2 className="text-icon-foreground icon-sm" /></Button></div>)}diff --git a/web/src/features/evals/v2/components/Evaluators/DecisionModel/DecisionModelQuestionCard/DecisionModelQuestionCard.stories.tsx b/web/src/features/evals/v2/components/Evaluators/DecisionModel/DecisionModelQuestionCard/DecisionModelQuestionCard.stories.tsxindex 96568e78e5..adc1115a08 100644--- a/web/src/features/evals/v2/components/Evaluators/DecisionModel/DecisionModelQuestionCard/DecisionModelQuestionCard.stories.tsx+++ b/web/src/features/evals/v2/components/Evaluators/DecisionModel/DecisionModelQuestionCard/DecisionModelQuestionCard.stories.tsx@@ -105,7 +105,9 @@ export const Collapsed = meta.story({expanded: false,question: {id: "q1",- ...QUESTION_EXAMPLES[DecisionModelQuestionType.CHOICE],+ ...QUESTION_EXAMPLES[DecisionModelQuestionType.NOUL],+ scoreName: "user_frustrated",+ instructions: "Does the user seem frustrated?",},},});diff --git a/web/src/features/evals/v2/components/Evaluators/DecisionModel/DecisionModelQuestionCard/DecisionModelQuestionCard.tsx b/web/src/features/evals/v2/components/Evaluators/DecisionModel/DecisionModelQuestionCard/DecisionModelQuestionCard.tsxindex 8c827101c0..1bdfdce028 100644--- a/web/src/features/evals/v2/components/Evaluators/DecisionModel/DecisionModelQuestionCard/DecisionModelQuestionCard.tsx+++ b/web/src/features/evals/v2/components/Evaluators/DecisionModel/DecisionModelQuestionCard/DecisionModelQuestionCard.tsx@@ -110,12 +110,15 @@ export function DecisionModelQuestionCard({disabled={false}triggerTitle={expanded ? "Collapse question" : "Expand question"}header={- <span className="flex min-w-0 items-center gap-2">- <copy.icon className="icon-base shrink-0" aria-label={copy.label} />+ <span className="grid min-w-0 grid-cols-[auto_auto_minmax(0,1fr)_auto] items-baseline gap-x-1">+ <copy.icon+ className="icon-base shrink-0 self-center"+ aria-label={copy.label}+ /><Badgevariant="secondary"className={cn(- "shrink-0 pb-0 font-mono",+ "shrink-0 font-mono",!question.scoreName.trim() && "text-dark-yellow",)}>@@ -123,7 +126,7 @@ export function DecisionModelQuestionCard({</Badge><spanclassName={cn(- "truncate leading-none",+ "truncate pl-1 leading-none",!question.instructions.trim() && "text-muted-foreground italic",)}title={summary}@@ -150,7 +153,7 @@ export function DecisionModelQuestionCard({onRemove ? "Remove question" : "At least one question is required"}>- <Trash2 className="icon-sm" />+ <Trash2 className="text-icon-foreground icon-sm" /></Button></span>}diff --git a/web/src/features/evals/v2/components/Evaluators/DecisionModel/ScoreLevelsEditor/ScoreLevelsEditor.tsx b/web/src/features/evals/v2/components/Evaluators/DecisionModel/ScoreLevelsEditor/ScoreLevelsEditor.tsxindex 207f0dccda..74114e8e55 100644--- a/web/src/features/evals/v2/components/Evaluators/DecisionModel/ScoreLevelsEditor/ScoreLevelsEditor.tsx+++ b/web/src/features/evals/v2/components/Evaluators/DecisionModel/ScoreLevelsEditor/ScoreLevelsEditor.tsx@@ -90,7 +90,7 @@ export function ScoreLevelsEditor({: `Keep at least ${DECISION_MODEL_LIMITS.minScoreLevels} levels`}>- <Trash2 className="icon-sm" />+ <Trash2 className="text-icon-foreground icon-sm" /></Button></div>)}diff --git a/web/src/features/evals/v2/components/SortableList/SortableList.tsx b/web/src/features/evals/v2/components/SortableList/SortableList.tsxindex 5c8b5040f7..42f3f3c4eb 100644--- a/web/src/features/evals/v2/components/SortableList/SortableList.tsx+++ b/web/src/features/evals/v2/components/SortableList/SortableList.tsx@@ -25,11 +25,13 @@ function SortableRow({id,label,disabled,+ compact,children,}: {id: string;label: string;disabled: boolean;+ compact: boolean;children: ReactNode;}) {const {@@ -59,7 +61,10 @@ function SortableRow({ref={setActivatorNodeRef}type="button"disabled={disabled}- className="text-muted-foreground hover:text-foreground focus-visible:ring-ring flex h-9 w-5 cursor-grab touch-none items-center justify-center rounded focus-visible:ring-2 focus-visible:outline-hidden active:cursor-grabbing disabled:cursor-default disabled:opacity-30"+ className={cn(+ "text-muted-foreground hover:text-foreground focus-visible:ring-ring flex w-5 cursor-grab touch-none items-center justify-center rounded focus-visible:ring-2 focus-visible:outline-hidden active:cursor-grabbing disabled:cursor-default disabled:opacity-30",+ compact ? "h-8" : "h-9",+ )}aria-label={`Reorder ${label}`}title="Drag to reorder"{...attributes}@@ -124,6 +129,7 @@ export function SortableList<T>({id={ids[index]!}label={getLabel(item, index)}disabled={items.length < 2}+ compact={gap === "sm"}>{renderItem(item, index)}</SortableRow>