-
Notifications
You must be signed in to change notification settings - Fork 2k
Fix: Folder-level configuration not applied when using "Configure requests to run" #6320
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
* Refactor `runCollectionFolder` action to accept `selectedRequestUids` for filtering and ordering requests. * Update IPC handler to process `selectedRequestUids`, ensuring requests are executed in the specified order while preserving folder data.
WalkthroughThe PR relocates request filtering logic from the Redux store to the IPC handler layer. Instead of filtering folder items before passing to IPC, the frontend now sends selectedRequestUids alongside the full folder structure, allowing the backend to filter while maintaining folder context access. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/bruno-electron/src/ipc/network/index.js (1)
1137-1151: Excellent fix - filtering moved to backend preserves folder context.The implementation correctly:
- Creates a uid-to-index map for efficient lookup and ordering
- Filters requests to only those in
selectedRequestUids- Preserves the exact order specified in
selectedRequestUidsvia the sort- Runs after folder assignment (lines 1098-1100), ensuring folder-level variables, scripts, and headers remain accessible
The interaction with tags filtering (lines 1127-1135) means tags filter first, then
selectedRequestUidsfilters and reorders. This seems correct - tags provide broad filtering, whileselectedRequestUidsprovides specific selection and ordering.Note: Invalid UIDs in
selectedRequestUidsare silently ignored by the filter, which is appropriate behavior. Consider adding a JSDoc comment to document theselectedRequestUidsparameter for future maintainers.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js(1 hunks)packages/bruno-electron/src/ipc/network/index.js(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (CODING_STANDARDS.md)
**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation, never tabs
Use single quotes for strings instead of double quotes
Always add semicolons at the end of statements
No trailing commas in code
Always use parentheses around parameters in arrow functions, even for single parameters
For multiline constructs, put opening braces on the same line with a minimum of 2 elements for multiline formatting
No newlines inside function parentheses
Space before and after the arrow in arrow functions:() => {}
No space between function name and parentheses:func()notfunc ()
Semicolons should go at the end of the line, not on a new line
Function names should be concise and descriptive
Add JSDoc comments to provide details to abstractions
Avoid single-line abstractions where all that is being done is increasing the call stack with one additional function
Add meaningful comments to explain complex code flow instead of obvious comments
Files:
packages/bruno-electron/src/ipc/network/index.jspackages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js
🧬 Code graph analysis (1)
packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js (6)
packages/bruno-app/src/components/RequestPane/HttpRequestPane/index.js (1)
tags(104-104)packages/bruno-app/src/components/RunnerResults/index.jsx (1)
tags(101-101)packages/bruno-lang/v2/src/jsonToBru.js (1)
tags(24-24)packages/bruno-js/src/sandbox/quickjs/shims/bruno-request.js (1)
tags(12-12)packages/bruno-app/src/components/RunnerResults/RunnerTags/index.jsx (1)
tags(13-13)packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RunCollectionItem/index.js (1)
tags(21-21)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: CLI Tests
- GitHub Check: SSL Tests - Windows
- GitHub Check: Unit Tests
- GitHub Check: Playwright E2E Tests
- GitHub Check: SSL Tests - macOS
- GitHub Check: SSL Tests - Linux
🔇 Additional comments (2)
packages/bruno-electron/src/ipc/network/index.js (1)
1060-1060: LGTM - IPC signature updated correctly.The addition of
selectedRequestUidsparameter coordinates with the frontend change and enables the fix for folder-level configuration. The parameter is appropriately placed after related parameters liketags.packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js (1)
685-686: LGTM - Responsibility correctly delegated to IPC handler.The updated invocation passes
selectedRequestUidsto the IPC handler, completing the coordination between frontend and backend. By removing the in-memory filtering (per AI summary) and delegating to the IPC handler, folder context is now properly preserved during execution.
Jira
fixes: #5645
Description
runCollectionFolderaction to acceptselectedRequestUidsfor filtering and ordering requests.selectedRequestUids, ensuring requests are executed in the specified order while preserving folder data.Contribution Checklist:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.