feat: Import dataset as new project - p2#5712
Merged
camiloHimura merged 6 commits intodevelopfrom Mar 9, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds the next iteration of “import dataset as a new project” by introducing a dedicated dialog flow on the project list page, while refactoring common “job progress” UI/utilities and staged-dataset deletion handling to be reused across import/export surfaces.
Changes:
- Introduce an
ImportDatasetDialogProviderand a new multi-step “Import dataset as new project” dialog (with progress stepper and preparing step). - Extract a reusable
ImportJobProcesscomponent and centralize job helper utilities underhooks/api/util. - Refactor
useDeleteStagedDatasetto accept a caller-provided local cleanup callback (deleteEntry) and update import/export call sites accordingly.
Reviewed changes
Copilot reviewed 41 out of 42 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| application/ui/src/hooks/localStorage/use-import-dataset-as-new-project.hook.ts | Updates localStorage state typing for “import as new project”. |
| application/ui/src/hooks/api/util.ts | Adds shared job helper utilities (isJobDone, getJobProgress, etc.). |
| application/ui/src/hooks/api/use-delete-staged-dataset.hook.ts | Refactors staged dataset deletion hook to use deleteEntry callback and allow nullable ids. |
| application/ui/src/hooks/api/use-delete-staged-dataset.hook.test.ts | Updates tests for the refactored staged dataset deletion hook. |
| application/ui/src/hooks/api/jobs/use-import-job-status.test.tsx | Fixes relative imports after jobs hook path changes. |
| application/ui/src/hooks/api/jobs/use-import-job-status.hook.tsx | Adjusts imports and removes select/cast for job query. |
| application/ui/src/hooks/api/jobs/jobs.hook.ts | Moves/normalizes jobs hook imports and exports (new path). |
| application/ui/src/hooks/api/jobs/jobs.hook.test.ts | Fixes relative imports after jobs hook path changes. |
| application/ui/src/features/project/providers/import-dataset-dialog-provider.component.tsx | Adds provider/context for controlling the “import as new project” dialog + step state. |
| application/ui/src/features/project/list/project-list.component.tsx | Wraps project grid in the new dialog provider. |
| application/ui/src/features/project/list/new-project-menu.component.tsx | Opens the new import dialog via provider state; updates import component path. |
| application/ui/src/features/project/list/import-dataset-as-new-projects/import-process/import-process.component.tsx | Adds “preparing” step UI for “import as new project” using shared job process component. |
| application/ui/src/features/project/list/import-dataset-as-new-projects/import-process/import-job-process.module.scss | Adds styles (currently appears unused). |
| application/ui/src/features/project/list/import-dataset-as-new-projects/import-dataset-buttons/import-dataset-buttons.component.tsx | Adds dialog footer buttons for the new-project import flow. |
| application/ui/src/features/project/list/import-dataset-as-new-projects/import-dataset-as-new-projects.module.scss | Adds layout styling for the new import dialog. |
| application/ui/src/features/project/list/import-dataset-as-new-projects/import-dataset-as-new-projects.component.tsx | Adds the new multi-step import dialog component. |
| application/ui/src/features/project/list/import-dataset-as-new-projects/ProgressStepper/progress-stepper.test.tsx | Adds tests for the new progress stepper. |
| application/ui/src/features/project/list/import-dataset-as-new-projects/ProgressStepper/progress-stepper.module.scss | Adds styles for the new progress stepper. |
| application/ui/src/features/project/list/import-dataset-as-new-projects/ProgressStepper/progress-stepper.component.tsx | Adds the new progress stepper component. |
| application/ui/src/features/project/list/Import-dataset-as-new-project/Import-dataset-as-new-project.component.tsx | Removes the previous single-step import dialog component. |
| application/ui/src/features/models/model-listing/model-listing.container.tsx | Updates jobs hook import path. |
| application/ui/src/features/models/model-listing/current-model-training/current-model-training.component.tsx | Updates jobs hook import path. |
| application/ui/src/features/models/hooks/api/use-train-model-mutation.ts | Updates jobs hook import path. |
| application/ui/src/features/dataset/import-export/util.ts | Removes old dataset import/export job utility module (moved to hooks/api/util). |
| application/ui/src/features/dataset/import-export/import-jobs-list/prepare-import-dataset.component.tsx | Switches to shared job utilities and the new import job status hook path. |
| application/ui/src/features/dataset/import-export/import-jobs-list/loading-import-dataset/loading-import-dataset.component.tsx | Switches to shared job utilities and the new import job status hook path. |
| application/ui/src/features/dataset/import-export/import-jobs-list/import-job-done/import-job-done.component.tsx | Updates staged dataset deletion hook usage to provide deleteEntry. |
| application/ui/src/features/dataset/import-export/import-jobs-list/import-failed-job/import-failed-job.component.tsx | Updates staged dataset deletion hook usage to provide deleteEntry. |
| application/ui/src/features/dataset/import-export/import-jobs-list/import-active-job/import-active-job.component.tsx | Uses shared job utilities and updates staged dataset deletion hook usage. |
| application/ui/src/features/dataset/import-export/import-dataset/label-mapping/label-mapping-buttons.component.tsx | Updates staged dataset deletion hook usage to provide deleteEntry. |
| application/ui/src/features/dataset/import-export/import-dataset/import-process/import-process.component.tsx | Refactors to use shared ImportJobProcess component. |
| application/ui/src/features/dataset/import-export/import-dataset/import-dataset-buttons/import-dataset-buttons.component.tsx | Uses shared ImportProcessButtons and wires deleteEntry. |
| application/ui/src/features/dataset/import-export/export-jobs-list/hooks/use-export-status.hook.tsx | Uses shared job utilities from hooks/api/util. |
| application/ui/src/features/dataset/import-export/export-jobs-list/export-job/export-job.component.tsx | Uses shared job utilities from hooks/api/util. |
| application/ui/src/features/dataset/import-export/export-jobs-list/export-job/export-completed-job/export-completed-job.component.tsx | Refactors to use useDeleteStagedDataset with deleteEntry callback. |
| application/ui/src/features/dataset/import-export/export-jobs-list/export-job/export-active-job.component.tsx | Uses shared job utilities from hooks/api/util. |
| application/ui/src/features/dataset/import-export/delete-staged-file-confirmation/delete-staged-file-confirmation.component.tsx | Updates staged dataset deletion hook usage to provide deleteEntry. |
| application/ui/src/features/dataset/import-export/cancel-job-confirmation/cancel-job-confirmation.component.tsx | Uses shared isInvalidJob from hooks/api/util. |
| application/ui/src/components/import-upload-file/import-upload-file.component.tsx | Adjusts empty-state illustration sizing. |
| application/ui/src/components/import-job-process/import-process-buttons.component.tsx | Updates to new jobs hook import path and wires staged deletion via deleteEntry. |
| application/ui/src/components/import-job-process/import-job-process.module.scss | Adds shared styling for the extracted job progress component. |
| application/ui/src/components/import-job-process/import-job-process.component.tsx | Adds reusable “job progress” UI component used by import flows. |
Comments suppressed due to low confidence (1)
application/ui/src/hooks/api/use-delete-staged-dataset.hook.ts:21
stagedDatasetIdis allowed to benull | undefined, but it’s used directly to build the path params. Ifmutate()is called without a valid id, this will likely hit/api/staged_datasets/null(or similar) and won’t clean up correctly. Consider makingstagedDatasetIdrequired, or guard inmutate/mutateAsync(e.g., throw/return early) until an id is available.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Test coverage report
|
Docker Image SizesCPU
GPU
XPU
|
jpggvilaca
reviewed
Mar 9, 2026
jpggvilaca
reviewed
Mar 9, 2026
jpggvilaca
reviewed
Mar 9, 2026
jpggvilaca
reviewed
Mar 9, 2026
jpggvilaca
reviewed
Mar 9, 2026
jpggvilaca
reviewed
Mar 9, 2026
jpggvilaca
reviewed
Mar 9, 2026
jpggvilaca
reviewed
Mar 9, 2026
jpggvilaca
reviewed
Mar 9, 2026
jpggvilaca
reviewed
Mar 9, 2026
jpggvilaca
reviewed
Mar 9, 2026
032a28a to
36d1f10
Compare
jpggvilaca
approved these changes
Mar 9, 2026
omkar-334
pushed a commit
to omkar-334/otx
that referenced
this pull request
Mar 28, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
How to test
Checklist