diff --git a/web/app/components/app/workflow-log/__tests__/evaluation-cell.spec.tsx b/web/app/components/app/workflow-log/__tests__/evaluation-cell.spec.tsx index a8af664416..480cb71476 100644 --- a/web/app/components/app/workflow-log/__tests__/evaluation-cell.spec.tsx +++ b/web/app/components/app/workflow-log/__tests__/evaluation-cell.spec.tsx @@ -52,6 +52,11 @@ describe('EvaluationCell', () => { evaluation={[{ name: 'Faithfulness', value: 0.98, + details: { + stubbed: true, + source: 'console-evaluation-run', + value_type: 'number', + }, nodeInfo: { node_id: 'node-1', title: 'Knowledge Retrieval', @@ -85,5 +90,30 @@ describe('EvaluationCell', () => { expect(await screen.findByText('True')).toBeInTheDocument() }) + + it('should render evaluation items with null node info', async () => { + const user = userEvent.setup() + + render( + , + ) + + await user.click(screen.getByRole('button', { name: 'appLog.table.header.evaluation' })) + + expect(await screen.findByText('custom_score')).toBeInTheDocument() + expect(screen.getByText('0.95')).toBeInTheDocument() + }) }) }) diff --git a/web/models/log.ts b/web/models/log.ts index 2a63c7b3dd..b9a0565fa9 100644 --- a/web/models/log.ts +++ b/web/models/log.ts @@ -259,11 +259,18 @@ type EndUserInfo = { export type EvaluationLogItem = { name: string value: string | number | boolean + details?: { + stubbed?: boolean + source?: string + value_type?: string + customized?: boolean + [key: string]: unknown + } | null nodeInfo?: { node_id: string type: string title: string - } + } | null } export type WorkflowAppLogDetail = { id: string