@@ -108,11 +121,15 @@ export default function Page() {
isRunning={isRunning}
score={result.score}
state={getScoreState(result.score, prevResult?.score)}
- evalStatus={evalStatus}
+ evalStatus={evaluation.status}
/>
{formatTime(result.duration)}
+
+
+
+
{wholeEvalUsage && (
<>
@@ -224,7 +241,7 @@ export default function Page() {
(prevScore) => prevScore.name === score.name
)?.score
)}
- evalStatus={evalStatus}
+ evalStatus={evaluation.status}
/>
{score.metadata && (
diff --git a/apps/evalite-ui/app/routes/eval.$name.tsx b/apps/evalite-ui/app/routes/eval.$name.tsx
index 84bc6e5..9256566 100644
--- a/apps/evalite-ui/app/routes/eval.$name.tsx
+++ b/apps/evalite-ui/app/routes/eval.$name.tsx
@@ -2,9 +2,11 @@ import { getEvalByName } from "@evalite/core/sdk";
import { average, sum } from "@evalite/core/utils";
import type { MetaFunction } from "@remix-run/node";
import {
+ Link,
NavLink,
Outlet,
useLoaderData,
+ useSearchParams,
type ClientLoaderFunctionArgs,
} from "@remix-run/react";
import { XCircleIcon } from "lucide-react";
@@ -12,6 +14,7 @@ import React, { useContext } from "react";
import { DisplayInput } from "~/components/display-input";
import { InnerPageLayout } from "~/components/page-layout";
import { getScoreState, Score } from "~/components/score";
+import { Button } from "~/components/ui/button";
import { MyLineChart } from "~/components/ui/line-chart";
import { LiveDate } from "~/components/ui/live-date";
import { Separator } from "~/components/ui/separator";
@@ -34,7 +37,11 @@ export const meta: MetaFunction
= (args) => {
};
export const clientLoader = async (args: ClientLoaderFunctionArgs) => {
- const result = await getEvalByName(args.params.name!);
+ const searchParams = new URLSearchParams(args.request.url.split("?")[1]);
+ const result = await getEvalByName(
+ args.params.name!,
+ searchParams.get("timestamp")
+ );
return {
...result,
@@ -64,6 +71,10 @@ export default function Page() {
? average(prevEvaluation.results, (r) => average(r.scores, (s) => s.score))
: undefined;
+ const [search, setSearch] = useSearchParams();
+
+ const timestamp = search.get("timestamp");
+
return (
<>
{formatTime(evaluation.duration)}
-
-
-
+
+
+ {timestamp && (
+ <>
+
+ View Latest
+
+ >
+ )}
+
@@ -114,7 +136,14 @@ export default function Page() {