Video source upload UI part#6981
Conversation
⏱️ Backend import time —
|
| Accelerator | Cumulative (s) | Self (s) |
|---|---|---|
cpu |
4.703 | 0.003 |
xpu |
4.373 | 0.003 |
cuda |
4.840 | 0.003 |
🐳 Docker image sizes
|
There was a problem hiding this comment.
Pull request overview
Updates the inference “Video file” source configuration UI to support uploading a video file (in addition to manually entering a file path), aligning behavior across Web and Tauri by removing the Tauri-specific component.
Changes:
- Add upload UX and status indicators (pending/success/error) to the Video File source form.
- Introduce a new
useUploadSourceMediamutation hook and add unit tests for the new upload flow. - Refactor dataset gallery upload button to use
FileTrigger, centralizing accepted extensions in shared utils.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| application/ui/src/features/inference/sources/video-file/video-file.module.scss | Adds styling for upload status icons and error alignment. |
| application/ui/src/features/inference/sources/video-file/video-file.component.tsx | Implements upload support + inline status UI for video sources. |
| application/ui/src/features/inference/sources/video-file/video-file.component.test.tsx | Adds unit tests covering path entry, upload success, and upload failure UI. |
| application/ui/src/features/inference/sources/video-file/video-file.component.tauri.tsx | Removes the Tauri-only implementation in favor of a unified component. |
| application/ui/src/features/inference/sources/hooks/use-source-mutation.hook.tsx | Adds useUploadSourceMedia mutation for uploading source media. |
| application/ui/src/features/dataset/gallery/utils.ts | Exposes accepted extensions strings for reuse by upload controls. |
| application/ui/src/features/dataset/gallery/toolbar/toolbar.component.test.tsx | Updates tests to target the new upload input test id. |
| application/ui/src/features/dataset/gallery/toolbar/add-media-button/add-media-button.component.tsx | Switches upload button implementation to FileTrigger. |
| application/ui/src/features/dataset/gallery/toolbar/add-media-button/add-media-button.component.test.tsx | Updates tests to align with the FileTrigger-based implementation. |
📊 Test coverage report
|
| it('awaits prepareFormData and lets bodyFormatter read its mutations to the FormData', async () => { | ||
| const prepareFormData = async (formData: FormData) => { | ||
| await Promise.resolve(); | ||
| formData.set('images_folder_path', '/mutated/by/prepare'); |
There was a problem hiding this comment.
doesnt matter here. Im just reusing the mockConfig which uses that sourceConfig. This just tests the mutations from this util, which should work for any source type
There was a problem hiding this comment.
yeah but we don't support images_folder_path at all now.
There was a problem hiding this comment.
that is true, ill update it on my next one to avoid running the CI again
Summary
Follow up scenarios to tackle (requires backend)
Closes #6931
How to test
Checklist