-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: a bunch of small improvements (#242)
* chore: added some missing blankslate Looks broken otherwise * chore: workspace name in project ui should not be a link * chore: remove drag and drop mentions until we fix the dropzone input bug with draggable files * chore: consistent styles in dataset table actions section * chore: added missing success toast on saving evaluation * chore: fix all the breadcrumb links * chore: added button to go to evaluation from evaluation section in document * chore: report frontend if a document run fails during evaluation * chore: update evaluation stats automagically also
- Loading branch information
Showing
16 changed files
with
198 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
...documents/[documentUuid]/evaluations/[evaluationId]/_components/ClientContainer/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
'use client' | ||
|
||
import { useEffect } from 'react' | ||
|
||
import { EvaluationDto } from '@latitude-data/core/browser' | ||
import { EvaluationResultWithMetadata } from '@latitude-data/core/repositories' | ||
import { | ||
useCurrentCommit, | ||
useCurrentDocument, | ||
useCurrentProject, | ||
} from '@latitude-data/web-ui' | ||
import useEvaluationResultsWithMetadata from '$/stores/evaluationResultsWithMetadata' | ||
|
||
import { EvaluationResults } from '../EvaluationResults' | ||
import { MetricsSummary } from '../MetricsSummary' | ||
|
||
const FIVE_SECONDS = 5000 | ||
|
||
export default function ClientContainer({ | ||
documentUuid, | ||
evaluation, | ||
evaluationResults: serverData, | ||
}: { | ||
documentUuid: string | ||
evaluation: EvaluationDto | ||
evaluationResults: EvaluationResultWithMetadata[] | ||
}) { | ||
const document = useCurrentDocument() | ||
const { project } = useCurrentProject() | ||
const { commit } = useCurrentCommit() | ||
const { data: evaluationResults, mutate } = useEvaluationResultsWithMetadata( | ||
{ | ||
evaluationId: evaluation.id, | ||
documentUuid: document.documentUuid, | ||
commitUuid: commit.uuid, | ||
projectId: project.id, | ||
}, | ||
{ | ||
fallbackData: serverData, | ||
}, | ||
) | ||
|
||
useEffect(() => { | ||
const interval = setInterval(() => { | ||
mutate() | ||
}, FIVE_SECONDS) | ||
|
||
return () => clearInterval(interval) | ||
}, [mutate]) | ||
|
||
return ( | ||
<> | ||
<MetricsSummary | ||
documentUuid={documentUuid} | ||
evaluation={evaluation} | ||
evaluationResults={evaluationResults} | ||
/> | ||
<EvaluationResults | ||
evaluation={evaluation} | ||
evaluationResults={evaluationResults} | ||
/> | ||
</> | ||
) | ||
} |
71 changes: 37 additions & 34 deletions
71
...cuments/[documentUuid]/evaluations/[evaluationId]/_components/EvaluationResults/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.