feat(ui): add import git to workbench setup#3756
Conversation
- Introduced `useGitRepositoryImport` hook for managing Git import form state - Added `GitRepositoryImportSubStep` component to handle repository import workflows - Updated `WorkbenchFormSteps.tsx` to integrate new Git import UI - Refactored import fields to support advanced configuration settings - Improved user feedback during repository import operations
Soffi AI SummaryThis PR integrates Git repository import functionality into the workbench setup flow. The core motivation is to allow users to import a Git repository directly while creating/editing a workbench, rather than having to navigate away to a separate Git repositories page. To enable this reuse, the existing The workbench creation form ( Commits
Updated: 2026-06-23 12:25 UTC |
Greptile SummaryThis PR extracts the Git import form logic out of
Confidence Score: 5/5Clean refactor with no changes to the underlying GraphQL mutation or auth flow — safe to merge. Both changed files follow the existing codebase patterns (useEffect-based footer registration, immer produce for form state). No data loss paths, no broken contracts, and the dual-callback design (onCompleted / onImported) is safe under React 18's automatic batching. No files require special attention.
|
| Filename | Overview |
|---|---|
| assets/src/components/cd/repos/GitRepositoriesImportGit.tsx | Refactored ImportGitModal into a reusable useGitRepositoryImport hook and GitRepositoryImportFields component; added ImportedGitRepository type export and an optional onImported callback |
| assets/src/components/workbenches/workbench/create-edit/WorkbenchFormSteps.tsx | Added GitRepositoryImportSubStep as an inline sub-view inside GitSkillsSubStep, using the extracted hook; registers custom footer actions (Back, Advanced toggle, Import) via the existing setFooterActions context pattern |
Reviews (2): Last reviewed commit: "refactor: split onCompleted into separat..." | Re-trigger Greptile
- Added `onImported` callback in `useGitRepositoryImport` for handling repository-specific logic - Updated `WorkbenchFormSteps.tsx` to use new `onBack` callback for completion handling
useGitRepositoryImporthook for managing Git import form stateGitRepositoryImportSubStepcomponent to handle repository import workflowsWorkbenchFormSteps.tsxto integrate new Git import UITest Plan
Test environment: https://console.plrl-dev-aws.onplural.sh/
Checklist
Plural Flow: console