Skip to content

Fix dataset export filename#650

Open
Creylay wants to merge 2 commits into
developfrom
fix/dataset-export-filename
Open

Fix dataset export filename#650
Creylay wants to merge 2 commits into
developfrom
fix/dataset-export-filename

Conversation

@Creylay
Copy link
Copy Markdown
Collaborator

@Creylay Creylay commented May 27, 2026

Summary

Datasets exported from the UI were always saved as dataset.csv / dataset_filtered.csv (or .zip) regardless of the actual dataset name. This PR uses the real dataset name for the downloaded file, adds visual feedback during the export, and reduces the time it takes to build and transfer image dataset ZIPs.


Type of Change

  • Backend change
  • Frontend change
  • CI / Workflow change
  • Build / Packaging change
  • Bug fix
  • Documentation

Changes (by file)

  • DashAI/back/api/api_v1/endpoints/datasets.py: Extracted _build_image_zip as a standalone function and switched from ZIP_DEFLATED to ZIP_STORED (images are already compressed — DEFLATE adds CPU cost with no size benefit). Both the ZIP and CSV build steps now run in asyncio.run_in_executor so they don't block the FastAPI event loop. Added _iter_buffer to stream the response in 64 KB chunks. _build_export_response is now async.
  • DashAI/front/src/components/notebooks/dataset/DatasetTable.jsx: Added datasetName prop (default: "dataset") used as the base filename on download. Added isExporting state: the export button is disabled and its icon switches to a CircularProgress spinner while the request is in flight, giving immediate feedback to the user.
  • DashAI/front/src/components/notebooks/dataset/tabs/OverviewTab.jsx: Passes datasetName={dataset.name} to DatasetTable.
  • DashAI/front/src/components/predictions/ResultsTable.jsx: Passes datasetName={selectedPrediction.dataset?.name ?? "prediction_results"} to DatasetTable.

Testing

  • Export a tabular dataset: downloaded file should be named <dataset_name>.csv.
  • Apply filters and export: file should be named <dataset_name>_filtered.csv.
  • Export an image dataset: file should be named <dataset_name>.zip and the download should start noticeably faster than before.
  • While export is in progress, the export button should show a spinner and be disabled.

Notes

Only the two DatasetTable usages that actually show the export button (OverviewTab and ResultsTable) needed to be updated — the remaining callers either pass showExportButton={false} or enableTopToolbar={false}.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant