From 16cae6013889cc318941e893e46f931c169d7037 Mon Sep 17 00:00:00 2001 From: Kaosiso Ezealigo Date: Wed, 10 Apr 2024 08:59:57 +0100 Subject: [PATCH 1/2] Fix: Allow expanding rows to display full error messages --- .../evaluationScenarios/EvaluationScenarios.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/agenta-web/src/components/pages/evaluations/evaluationScenarios/EvaluationScenarios.tsx b/agenta-web/src/components/pages/evaluations/evaluationScenarios/EvaluationScenarios.tsx index 5a40ef8e92..f109464761 100644 --- a/agenta-web/src/components/pages/evaluations/evaluationScenarios/EvaluationScenarios.tsx +++ b/agenta-web/src/components/pages/evaluations/evaluationScenarios/EvaluationScenarios.tsx @@ -22,8 +22,8 @@ import AgCustomHeader from "@/components/AgCustomHeader/AgCustomHeader" import {useAtom} from "jotai" import {evaluatorsAtom} from "@/lib/atoms/evaluation" import CompareOutputDiff from "@/components/CompareOutputDiff/CompareOutputDiff" +import {useQueryParam} from "@/hooks/useQuery" import {formatCurrency, formatLatency} from "@/lib/helpers/formatters" -import {useLocalStorage} from "usehooks-ts" const useStyles = createUseStyles((theme: JSSTheme) => ({ infoRow: { @@ -56,7 +56,7 @@ const EvaluationScenarios: React.FC = () => { const [evaluators, setEvaluators] = useAtom(evaluatorsAtom) const gridRef = useRef>() const evalaution = scenarios[0]?.evaluation - const [showDiff, setShowDiff] = useLocalStorage("showDiff", "show") + const [showDiff, setShowDiff] = useQueryParam("showDiff", "show") const colDefs = useMemo(() => { const colDefs: ColDef<_EvaluationScenario>[] = [] @@ -96,7 +96,10 @@ const EvaluationScenarios: React.FC = () => { cellRenderer: (params: any) => { const result = params.data?.outputs[index].result if (result && result.type == "error") { - return `${result?.error?.message}\n${result?.error?.stacktrace}` + return LongTextCellRenderer( + params, + `${result?.error?.message}\n${result?.error?.stacktrace}`, + ) } return showDiff === "show" ? LongTextCellRenderer( From 1b459754c54c4132157680bc25bad2d82f20f1f9 Mon Sep 17 00:00:00 2001 From: Kaosiso Ezealigo Date: Wed, 10 Apr 2024 09:08:55 +0100 Subject: [PATCH 2/2] synced with main branch --- .../evaluations/evaluationScenarios/EvaluationScenarios.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agenta-web/src/components/pages/evaluations/evaluationScenarios/EvaluationScenarios.tsx b/agenta-web/src/components/pages/evaluations/evaluationScenarios/EvaluationScenarios.tsx index f109464761..e375c46e9d 100644 --- a/agenta-web/src/components/pages/evaluations/evaluationScenarios/EvaluationScenarios.tsx +++ b/agenta-web/src/components/pages/evaluations/evaluationScenarios/EvaluationScenarios.tsx @@ -22,8 +22,8 @@ import AgCustomHeader from "@/components/AgCustomHeader/AgCustomHeader" import {useAtom} from "jotai" import {evaluatorsAtom} from "@/lib/atoms/evaluation" import CompareOutputDiff from "@/components/CompareOutputDiff/CompareOutputDiff" -import {useQueryParam} from "@/hooks/useQuery" import {formatCurrency, formatLatency} from "@/lib/helpers/formatters" +import {useLocalStorage} from "usehooks-ts" const useStyles = createUseStyles((theme: JSSTheme) => ({ infoRow: { @@ -56,7 +56,7 @@ const EvaluationScenarios: React.FC = () => { const [evaluators, setEvaluators] = useAtom(evaluatorsAtom) const gridRef = useRef>() const evalaution = scenarios[0]?.evaluation - const [showDiff, setShowDiff] = useQueryParam("showDiff", "show") + const [showDiff, setShowDiff] = useLocalStorage("showDiff", "show") const colDefs = useMemo(() => { const colDefs: ColDef<_EvaluationScenario>[] = []