-
Notifications
You must be signed in to change notification settings - Fork 78
feature(FR-1471): migrate the GitHub/GitLab importing feature to React with VFolder usage mode option #4600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 49.62% | 132/266 |
| 🔴 | Branches | 29.96% | 80/267 |
| 🔴 | Functions | 33.33% | 20/60 |
| 🔴 | Lines | 51.95% | 120/231 |
Test suite run success
55 tests passing in 3 suites.
Report generated by 🧪jest coverage report action from 42aaf48
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 4.74% | 547/11529 |
| 🔴 | Branches | 3.86% | 314/8133 |
| 🔴 | Functions | 2.93% | 104/3548 |
| 🔴 | Lines | 4.69% | 529/11271 |
Test suite run success
125 tests passing in 14 suites.
Report generated by 🧪jest coverage report action from 42aaf48
27fa091 to
492e90e
Compare
7b4c0c3 to
d6ecc7a
Compare
d6ecc7a to
83b6f17
Compare
492e90e to
b076bde
Compare
b076bde to
a500584
Compare
83b6f17 to
53cfb56
Compare
a500584 to
4589c0c
Compare
4589c0c to
215abba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates the GitHub and GitLab repository import functionality from the legacy web component (backend-ai-import-view.ts) to a modern React-based implementation. The feature enables users to import entire repositories from GitHub and GitLab into Backend.AI virtual folders, expanding beyond the previous notebook-only import capability.
- Removed legacy web component code for GitHub/GitLab importing (~400 lines)
- Created new React components (
ImportRepoForm) with separate UI cards for notebook, GitHub, and GitLab imports - Added
useGetAvailableFolderNamehook to generate unique folder names and prevent collisions - Added translation keys across 18 language files for new UI elements
Reviewed Changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 22 comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/backend-ai-import-view.ts | Removed legacy GitHub/GitLab import functionality and unused imports |
| react/src/pages/ImportAndRunPage.tsx | Added separate cards for notebook, GitHub, and GitLab imports with updated layout |
| react/src/components/ImportRepoForm.tsx | New component handling repository imports with URL parsing, validation, and batch session creation |
| react/src/components/ImportNotebook.tsx | Updated form layout from inline to vertical and improved navigation logic |
| react/src/hooks/index.tsx | Added vfolder.create method signature to BackendAIClient type |
| packages/backend.ai-ui/src/hooks/useGetAvailableFolderName.ts | New hook to check folder name availability and generate unique names with hash suffixes |
| packages/backend.ai-ui/src/hooks/index.ts | Exported new useGetAvailableFolderName hook |
| resources/i18n/*.json | Added NewVFolderName and NewVFolderNameHelp translation keys across 18 language files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
215abba to
1d4b0c8
Compare
0cb900c to
7ecf347
Compare
30c6e69 to
987cc03
Compare
2e961aa to
998cd9f
Compare
998cd9f to
adc4754
Compare
adc4754 to
16ef141
Compare
ironAiken2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
16ef141 to
95898aa
Compare
nowgnuesLee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Merge activity
|
…t with VFolder usage mode option (#4600) Resolves #4278 ([FR-1471](https://lablup.atlassian.net/browse/FR-1471)) This PR migrates the GitHub and GitLab repository import functionality from the legacy web components to the React UI. The implementation includes: - Added a new `useGetAvailableFolderName` hook to generate unique folder names for imported repositories - Created `ImportRepoForm` component to handle GitHub and GitLab repository imports - Enhanced the import page UI with separate cards for notebook, GitHub, and GitLab imports - Added badge generation functionality that creates HTML/Markdown code for notebooks - Improved the `CopyButton` component to support translations and proper disabled states - Updated translations for all import-related features across multiple languages The implementation ensures repositories are properly downloaded, extracted, and made available as folders that can be mounted in sessions. [FR-1471]: https://lablup.atlassian.net/browse/FR-1471?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
95898aa to
42aaf48
Compare

Resolves #4278 (FR-1471)
This PR migrates the GitHub and GitLab repository import functionality from the legacy web components to the React UI. The implementation includes:
useGetAvailableFolderNamehook to generate unique folder names for imported repositoriesImportRepoFormcomponent to handle GitHub and GitLab repository importsCopyButtoncomponent to support translations and proper disabled statesThe implementation ensures repositories are properly downloaded, extracted, and made available as folders that can be mounted in sessions.