Skip to content

feat(ui): add import git to workbench setup#3756

Merged
michaeljguarino merged 2 commits into
masterfrom
sebastian/prod-5000-adding-import-git-to-workbench-setup
Jun 23, 2026
Merged

feat(ui): add import git to workbench setup#3756
michaeljguarino merged 2 commits into
masterfrom
sebastian/prod-5000-adding-import-git-to-workbench-setup

Conversation

@floreks

@floreks floreks commented Jun 23, 2026

Copy link
Copy Markdown
Member
  • 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
localhost_3000_workbenches_create (1) localhost_3000_workbenches_create localhost_3000_workbenches_create (2)

Test Plan

Test environment: https://console.plrl-dev-aws.onplural.sh/

Checklist

  • I have added a meaningful title and summary to convey the impact of this PR to a user.
  • If required, I have updated the Plural documentation accordingly.
  • I have added tests to cover my changes.
  • I have deployed the agent to a test environment and verified that it works as expected (required only when changing agent code).

Plural Flow: console

- 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
@linear

linear Bot commented Jun 23, 2026

Copy link
Copy Markdown

PROD-5000

@floreks floreks self-assigned this Jun 23, 2026
@soffi-ai

soffi-ai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Soffi AI Summary

This 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 ImportGitModal component was refactored: its internal form logic was extracted into a new useGitRepositoryImport hook, and the form UI was separated into a GitRepositoryImportFields component. This decoupling makes both pieces independently composable. The hook now also accepts an onCompleted callback that receives the newly created repository, enabling the workbench form to react to a successful import (e.g., auto-selecting the imported repo).

The workbench creation form (WorkbenchFormSteps.tsx) was then updated to embed a GitRepositoryImportSubStep that surfaces this import workflow inline, giving users a seamless experience without leaving the workbench setup wizard. The ImportedGitRepository type was also exported for type-safe consumption across both contexts.

Commits

Commit Summary
8eb6fa6 Refactored ImportGitModal to extract reusable useGitRepositoryImport hook and GitRepositoryImportFields component, then integrated them into the workbench creation form as an inline Git import sub-step, allowing users to import a Git repository without leaving the workbench setup wizard.

Deploy in Soffi


Updated: 2026-06-23 12:25 UTC

@greptile-apps

greptile-apps Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR extracts the Git import form logic out of ImportGitModal into a reusable useGitRepositoryImport hook and a standalone GitRepositoryImportFields component, then plugs them into the workbench setup wizard as a new GitRepositoryImportSubStep.

  • useGitRepositoryImport centralises all form state (URL, auth, advanced settings) and exposes an onImported callback that receives the created repository object, enabling callers to react to a successful import without coupling to the modal lifecycle.
  • GitRepositoryImportSubStep renders the import form inline inside GitSkillsSubStep, registers its own footer actions (Back / Advanced toggle / Import) via the existing setFooterActions context pattern used elsewhere in the workbench wizard, and updates formState.repositoryId on success before navigating back to the select view.

Confidence Score: 5/5

Clean 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.

Important Files Changed

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

Comment thread assets/src/components/cd/repos/GitRepositoriesImportGit.tsx
@floreks floreks added the enhancement New feature or request label Jun 23, 2026
- Added `onImported` callback in `useGitRepositoryImport` for handling repository-specific logic
- Updated `WorkbenchFormSteps.tsx` to use new `onBack` callback for completion handling
@floreks

floreks commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

@greptileai

@michaeljguarino michaeljguarino merged commit 7f6ce85 into master Jun 23, 2026
14 checks passed
@michaeljguarino michaeljguarino deleted the sebastian/prod-5000-adding-import-git-to-workbench-setup branch June 23, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants