Skip to content

Commit 4adfb68

Browse files
itamargolanclaude
andauthored
[OPIK-6013] [FE] fix: CSV upload overlay stuck when server-side processing enabled (#6330)
Skip showing the CsvUploadDialog overlay when isCsvUploadEnabled is true, since the upload is handled server-side in the background and a toast already confirms acceptance. Previously the overlay showed "Upload in progress..." with no close button and was never dismissed because the sidebar stays open for the success step (unlike the old dialog flow which closed entirely). Also add a visually-hidden DialogTitle to CsvUploadDialog for accessibility. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 94e318a commit 4adfb68

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

apps/opik-frontend/src/v2/pages-shared/datasets/AddEditDatasetDialog/useDatasetForm.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ const useDatasetForm = ({
254254
? () => onCreateSuccess(newDataset, navigateToDataset)
255255
: navigateToDataset;
256256

257-
if (hasValidCsvFile) {
257+
if (hasValidCsvFile && !isCsvUploadEnabled) {
258258
setIsOverlayShown(true);
259259
}
260260

@@ -271,6 +271,7 @@ const useDatasetForm = ({
271271
applyEvaluationCriteria,
272272
uploadItems,
273273
hasValidCsvFile,
274+
isCsvUploadEnabled,
274275
onDatasetCreated,
275276
onCreateSuccess,
276277
setOpen,

apps/opik-frontend/src/v2/pages-shared/datasets/CsvUploadDialog/CsvUploadDialog.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22
import { Button } from "@/ui/button";
3-
import { Dialog, DialogContent } from "@/ui/dialog";
3+
import { Dialog, DialogContent, DialogTitle } from "@/ui/dialog";
44
import Loader from "@/shared/Loader/Loader";
55

66
type CsvUploadDialogProps = {
@@ -17,6 +17,9 @@ const CsvUploadDialog: React.FC<CsvUploadDialogProps> = ({
1717
return (
1818
<Dialog open={open}>
1919
<DialogContent className="max-w-sm [&>button.absolute]:hidden">
20+
<DialogTitle className="sr-only">
21+
{isCsvMode ? "Upload in progress" : "Processing CSV"}
22+
</DialogTitle>
2023
<Loader
2124
className="min-h-40"
2225
message={

0 commit comments

Comments
 (0)