Skip to content

feat: import from git select all#7405

Open
ntsd wants to merge 1 commit intousebruno:mainfrom
ntsd:feat/import-git-select-all
Open

feat: import from git select all#7405
ntsd wants to merge 1 commit intousebruno:mainfrom
ntsd:feat/import-git-select-all

Conversation

@ntsd
Copy link

@ntsd ntsd commented Mar 9, 2026

Description

Add the select all collection checkbox on the git clone import feature.
Instead of selecting the collection one by one.

Screenshot 2026-03-09 at 16 55 26

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

Summary by CodeRabbit

  • New Features
    • Introduced "Select all" checkbox in the Clone Git Repository modal, enabling users to quickly select or deselect all collections at once. The checkbox reflects partial selection states for improved usability during repository import.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 9, 2026

Walkthrough

Introduces a "Select all" checkbox feature for the Clone Git Repository modal, enabling users to toggle collection selection states. The feature includes UI element, state management with derived flags, and comprehensive end-to-end test coverage.

Changes

Cohort / File(s) Summary
Select All Checkbox Feature
packages/bruno-app/src/components/Sidebar/CloneGitRespository/index.js
Added selectAllRef, derived state flags (areAllCollectionsSelected, areSomeCollectionsSelected), effect hook for indeterminate state management, and handleToggleSelectAllCollections handler to manage bulk collection selection/deselection.
End-to-End Test
tests/import/url-import/github-repository-import.spec.ts
New test case "Clone Git Repository collection selection supports Select all" validating checkbox interactions: selecting all, clearing all, and partial selection resulting in indeterminate state.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

size/S

Suggested reviewers

  • helloanoop
  • lohit-bruno
  • bijin-bruno

Poem

🎯 A checkbox reigns o'er all the rest,
With one swift click, collections blessed,
Indeterminate states spin with delight,
Tests prove the feature shines so bright! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a 'select all' checkbox feature to the Git import dialog for collection selection.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can use oxc to improve the quality of JavaScript and TypeScript code reviews.

Add a configuration file to your project to customize how CodeRabbit runs oxc.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tests/import/url-import/github-repository-import.spec.ts`:
- Around line 57-62: The test constructs mocked collection paths by
concatenating cloneTargetPath with hardcoded '/' separators which breaks on
Windows; update the mockedCollectionPaths to build each path with path.join(...)
using cloneTargetPath (and subfolders like 'mock-repo', 'collection-one',
'folder', etc.), ensure the test file imports Node's path module if not already,
and keep variable names cloneTargetPath and mockedCollectionPaths unchanged so
the replacement is straightforward.
- Around line 64-79: The test currently mutates the DOM input
'#collection-location' but does not update Formik's collectionLocation
(initialized from preferences.defaultLocation), so on submit the value is
unchanged; fix by either mocking the browseDirectory flow so the component's
handler updates Formik (e.g., mock the renderer IPC or function that triggers
browseDirectory to return the desired path) or seed the test
preferences/defaultLocation with cloneTargetPath before opening the clone modal
so Formik starts with the correct value; target symbols to change are the test
setup that configures preferences.defaultLocation, the browseDirectory IPC mock
or handler used by the clone modal, and the Formik field key collectionLocation
(input '#collection-location').

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0a0b608f-5940-47aa-81bf-606844bd5a05

📥 Commits

Reviewing files that changed from the base of the PR and between facfe32 and bffee23.

📒 Files selected for processing (2)
  • packages/bruno-app/src/components/Sidebar/CloneGitRespository/index.js
  • tests/import/url-import/github-repository-import.spec.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant