Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion vite-app/dist/assets/index-34WaHH5W.css

This file was deleted.

1 change: 1 addition & 0 deletions vite-app/dist/assets/index-BGlGI2LH.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions vite-app/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>EP | Log Viewer</title>
<link rel="icon" href="/assets/favicon-BkAAWQga.png" />
<script type="module" crossorigin src="/assets/index-DOPsfOMT.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-34WaHH5W.css">
<script type="module" crossorigin src="/assets/index-zf20-zFD.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BGlGI2LH.css">
</head>
<body>
<div id="root"></div>
Expand Down
20 changes: 10 additions & 10 deletions vite-app/src/components/EvaluationRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,16 @@ export const EvaluationRow = observer(
/>
</TableCell>

{/* Model */}
<TableCell className="py-3 text-xs">
<RowModel model={row.input_metadata.completion_params.model} />
</TableCell>

{/* Score */}
<TableCell className="py-3 text-xs">
<RowScore score={row.evaluation_result?.score} />
</TableCell>

{/* Invocation ID */}
<TableCell className="py-3 text-xs">
<InvocationId
Expand Down Expand Up @@ -460,16 +470,6 @@ export const EvaluationRow = observer(
<TableCell className="py-3 text-xs">
<RolloutId rolloutId={row.execution_metadata?.rollout_id} />
</TableCell>

{/* Model */}
<TableCell className="py-3 text-xs">
<RowModel model={row.input_metadata.completion_params.model} />
</TableCell>

{/* Score */}
<TableCell className="py-3 text-xs">
<RowScore score={row.evaluation_result?.score} />
</TableCell>
</TableRowInteractive>

{/* Expanded Content Row */}
Expand Down
39 changes: 19 additions & 20 deletions vite-app/src/components/EvaluationTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import Select from "./Select";
import FilterSelector from "./FilterSelector";
import {
TableHeader,
TableHead,
TableBody as TableBodyBase,
SortableTableHeader,
} from "./TableContainer";
Expand Down Expand Up @@ -159,11 +158,11 @@ export const EvaluationTable = observer(() => {
</Button>
</div>
) : (
<div className="overflow-x-auto">
<table className="w-full min-w-max">
<div className="max-h-[calc(100vh-80px)] overflow-auto">
<table className="text-nowrap">
{/* Table Header */}
<TableHead>
<tr>
<thead>
<tr className="bg-gray-50 sticky top-0 z-10">
<TableHeader className="w-8">&nbsp;</TableHeader>
<SortableTableHeader
sortField="created_at"
Expand Down Expand Up @@ -198,63 +197,63 @@ export const EvaluationTable = observer(() => {
Rollout Status
</SortableTableHeader>
<SortableTableHeader
sortField="$.execution_metadata.invocation_id"
sortField="$.input_metadata.completion_params.model"
currentSortField={state.sortField}
currentSortDirection={state.sortDirection}
onSort={handleSort}
>
Invocation ID
Model
</SortableTableHeader>
<SortableTableHeader
sortField="$.execution_metadata.experiment_id"
sortField="$.evaluation_result.score"
currentSortField={state.sortField}
currentSortDirection={state.sortDirection}
onSort={handleSort}
>
Experiment ID
Score
</SortableTableHeader>
<SortableTableHeader
sortField="$.execution_metadata.run_id"
sortField="$.execution_metadata.invocation_id"
currentSortField={state.sortField}
currentSortDirection={state.sortDirection}
onSort={handleSort}
>
Run ID
Invocation ID
</SortableTableHeader>
<SortableTableHeader
sortField="$.input_metadata.row_id"
sortField="$.execution_metadata.experiment_id"
currentSortField={state.sortField}
currentSortDirection={state.sortDirection}
onSort={handleSort}
>
Row ID
Experiment ID
</SortableTableHeader>
<SortableTableHeader
sortField="$.execution_metadata.rollout_id"
sortField="$.execution_metadata.run_id"
currentSortField={state.sortField}
currentSortDirection={state.sortDirection}
onSort={handleSort}
>
Rollout ID
Run ID
</SortableTableHeader>
<SortableTableHeader
sortField="$.input_metadata.completion_params.model"
sortField="$.input_metadata.row_id"
currentSortField={state.sortField}
currentSortDirection={state.sortDirection}
onSort={handleSort}
>
Model
Row ID
</SortableTableHeader>
<SortableTableHeader
sortField="$.evaluation_result.score"
sortField="$.execution_metadata.rollout_id"
currentSortField={state.sortField}
currentSortDirection={state.sortDirection}
onSort={handleSort}
>
Score
Rollout ID
</SortableTableHeader>
</tr>
</TableHead>
</thead>

{/* Table Body */}
<TableBody
Expand Down
49 changes: 42 additions & 7 deletions vite-app/src/components/TableContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,13 @@ export function TableHeader({

return (
<th
className={`px-3 py-2 text-xs font-semibold text-gray-700 ${
alignClasses[align]
} ${nowrap ? "whitespace-nowrap" : ""} ${className}`}
className={`text-xs font-semibold text-gray-700 ${alignClasses[align]} ${
nowrap ? "whitespace-nowrap" : ""
} ${className}`}
>
{children}
<div className="bg-gray-50 px-3 py-2 border-b border-gray-200">
{children}
</div>
</th>
);
}
Expand Down Expand Up @@ -274,13 +276,13 @@ export function SortableTableHeader({

return (
<th
className={`px-3 py-2 text-xs font-semibold text-gray-700 cursor-pointer hover:bg-gray-100 transition-colors ${
className={`text-xs font-semibold text-gray-700 cursor-pointer transition-colors ${
alignClasses[align]
} ${nowrap ? "whitespace-nowrap" : ""} ${className}`}
onClick={() => onSort(sortField)}
style={{ cursor: "pointer" }}
>
<div className="flex items-center">
<div className="flex items-center px-3 py-2 bg-gray-50 border-b border-gray-200 hover:bg-gray-100 transition-colors">
{children}
{sortIcon}
</div>
Expand Down Expand Up @@ -314,10 +316,43 @@ export function TableRowInteractive({
? "hover:bg-gray-100 cursor-pointer"
: "";

// Track simple drag to prevent triggering click (expand/collapse) when selecting text
const mouseDownPos = React.useRef<{ x: number; y: number } | null>(null);
const didDrag = React.useRef(false);

function handleMouseDown(e: React.MouseEvent<HTMLTableRowElement>) {
mouseDownPos.current = { x: e.clientX, y: e.clientY };
didDrag.current = false;
}

function handleMouseMove(e: React.MouseEvent<HTMLTableRowElement>) {
if (!mouseDownPos.current || e.buttons === 0) return;
const dx = Math.abs(e.clientX - mouseDownPos.current.x);
const dy = Math.abs(e.clientY - mouseDownPos.current.y);
if (dx > 3 || dy > 3) didDrag.current = true;
}

function handleMouseUp() {
mouseDownPos.current = null;
}

function handleClick(e: React.MouseEvent<HTMLTableRowElement>) {
if (didDrag.current) {
e.preventDefault();
e.stopPropagation();
didDrag.current = false;
return;
}
onClick?.();
}

return (
<tr
className={`text-sm ${interactiveClasses} ${className}`}
onClick={onClick}
onMouseDown={handleMouseDown}
onMouseMove={handleMouseMove}
onMouseUp={handleMouseUp}
onClick={handleClick}
>
{children}
</tr>
Expand Down
Loading