Skip to content

Conversation

@Pragadesh-45
Copy link
Contributor

@Pragadesh-45 Pragadesh-45 commented Dec 5, 2025

Jira
fixes: #5645

Description

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

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.

Summary by CodeRabbit

  • New Features
    • Added support for running selected requests from a collection folder while preserving execution order.

✏️ Tip: You can customize this high-level summary in your review settings.

* 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.
@coderabbitai
Copy link

coderabbitai bot commented Dec 5, 2025

Walkthrough

The 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

Cohort / File(s) Summary
Request filtering responsibility shift
packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js
Removed in-memory folder item reordering/filtering logic; now passes selectedRequestUids to IPC handler instead of pre-filtering.
IPC handler request selection
packages/bruno-electron/src/ipc/network/index.js
Added selectedRequestUids parameter to 'renderer:run-collection-folder' handler; filters and sorts folderRequests based on selection before processing.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Data flow integrity: Verify selectedRequestUids propagates correctly through Redux → IPC boundary
  • Folder context preservation: Confirm folder-level variables, scripts, and headers remain accessible during IPC handler filtering
  • Edge cases: Test empty selection, non-existent UIDs, and nested folder scenarios
  • Request ordering: Validate filtered requests maintain the correct sequence per selectedRequestUids specification

Suggested reviewers

  • helloanoop
  • lohit-bruno
  • naman-bruno
  • bijin-bruno
  • sanish-bruno

Poem

🗂️ Folders once lost in the filtering haze,
Now pass their context through the right pathways,
Variables whisper to selected requests true,
From Redux to IPC—a cleaner debut! ✨

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main fix: enabling folder-level configuration when using 'Configure requests to run' feature.
Linked Issues check ✅ Passed Changes properly address issue #5645 by passing selectedRequestUids to IPC handler and filtering/ordering requests while preserving folder context.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the folder-level configuration issue when using 'Configure requests to run'; no unrelated modifications detected.
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.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Copy link

@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: 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 selectedRequestUids via 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 selectedRequestUids filters and reorders. This seems correct - tags provide broad filtering, while selectedRequestUids provides specific selection and ordering.

Note: Invalid UIDs in selectedRequestUids are silently ignored by the filter, which is appropriate behavior. Consider adding a JSDoc comment to document the selectedRequestUids parameter for future maintainers.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 80b017f and 54fce6c.

📒 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() not func ()
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.js
  • packages/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 selectedRequestUids parameter coordinates with the frontend change and enables the fix for folder-level configuration. The parameter is appropriately placed after related parameters like tags.

packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js (1)

685-686: LGTM - Responsibility correctly delegated to IPC handler.

The updated invocation passes selectedRequestUids to 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.

@bijin-bruno bijin-bruno merged commit a66be21 into usebruno:main Dec 8, 2025
8 checks passed
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.

"Configure requests to run" ignores folders

2 participants