Conversation
WalkthroughIntroduces 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment 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. |
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
packages/bruno-app/src/components/Sidebar/CloneGitRespository/index.jstests/import/url-import/github-repository-import.spec.ts
Description
Add the select all collection checkbox on the git clone import feature.
Instead of selecting the collection one by one.
Contribution Checklist:
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