Introduce selective Folder Runs#8346
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThis PR adds selectable folder runs in the runner modal, makes configuration persistence optional for that panel, updates "Run Again" request selection for folder results, and adds Playwright helpers and tests for folder modal selection, disabling, execution, and count behavior. ChangesSelective folder run
Sequence Diagram(s)sequenceDiagram
participant User
participant RunCollectionItem
participant RunConfigurationPanel
participant runCollectionFolder
participant RunnerResults
User->>RunCollectionItem: Open folder Run modal
RunCollectionItem->>RunConfigurationPanel: Render folder request list and selection state
User->>RunConfigurationPanel: Select or deselect requests
RunConfigurationPanel-->>RunCollectionItem: selectedRequestItems
User->>RunCollectionItem: Click Run N Requests / Recursive Run
RunCollectionItem->>runCollectionFolder: Dispatch selectedRequestUids, delay, tags
RunnerResults->>runCollectionFolder: Run Again recomputes request UIDs via helper
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/runner/selective-folder-run.spec.ts`:
- Line 15: Remove the `.serial` modifier from the test.describe.serial call in
the selective-folder-run.spec.ts file to ensure the test suite remains
parallel-safe. Change test.describe.serial('Selective Folder Run', () => { to
test.describe('Selective Folder Run', () => { so that tests can run concurrently
without ordering or shared-state dependencies, aligning with E2E testing
requirements.
- Around line 87-91: Replace the class-based selectors in the
selective-folder-run.spec.ts test with stable data-testid or role-based
locators. Specifically, update the locator calls that use `.request-name >
span:first-child` and `.checkbox-container` selectors to instead use data-testid
attributes or Playwright role selectors. This should be done in the innerText()
call and the checkbox click() action around lines 87-91, as well as any similar
class-based selectors mentioned in lines 107-108. These stable locators will
make the tests resilient to UI refactors and follow E2E testing best practices.
- Around line 29-32: The closeRunnerModal helper function is suppressing all
errors from the Escape key press and modal visibility wait operations, which
hides real cleanup failures and can cause state to leak between tests. Remove
the .catch(() => {}) error handlers from both the page.keyboard.press('Escape')
call and the page.locator('.bruno-modal-backdrop').first().waitFor() call in the
closeRunnerModal function to allow errors to propagate naturally and fail the
test when cleanup actually fails, making test failures more actionable and
maintaining deterministic behavior.
In `@tests/utils/page/runner.ts`:
- Around line 157-158: In the `openFolderRunMenu` function, the current approach
using `hasText(folderName).filter().first()` on line 157 and the re-querying
pattern around line 172 creates ambiguity when folder names repeat across
different hierarchy levels. Replace the `hasText` filter pattern with a
deterministic, level-scoped locator that performs exact matching within the
current hierarchy node. Use a locator approach that targets the folder at the
current level specifically rather than filtering by text content, ensuring
stable and unambiguous folder selection even when identical folder names exist
in different branches of the tree.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a05190b6-d745-46f8-b50a-6d7e21d74378
📒 Files selected for processing (5)
packages/bruno-app/src/components/RunnerResults/RunConfigurationPanel/index.jsxpackages/bruno-app/src/components/RunnerResults/index.jsxpackages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RunCollectionItem/index.jstests/runner/selective-folder-run.spec.tstests/utils/page/runner.ts
There was a problem hiding this comment.
Pull request overview
This PR introduces selective Folder Runs by extending the existing folder run modal to include a request-picker panel (checkbox selection + drag/drop ordering) so users can run only a chosen subset of requests within a folder (recursively).
Changes:
- Adds a right-side
RunConfigurationPanelto the folder run modal and wires selection intorunCollectionFolderviaselectedRequestUids. - Extends
RunConfigurationPanelwith apersistConfigurationflag so folder-level selection can be non-persistent. - Adds Playwright E2E coverage and new runner-page helpers for opening the folder run modal and interacting with the request picker.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/utils/page/runner.ts | Adds runner helpers for parsing selection counters and opening/interacting with the folder-run modal UI. |
| tests/runner/selective-folder-run.spec.ts | Adds E2E coverage validating default selection, disabling on empty selection, subset execution, and run-count labeling. |
| packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/RunCollectionItem/index.js | Updates folder run modal layout and adds selective run button that passes selected request UIDs. |
| packages/bruno-app/src/components/RunnerResults/RunConfigurationPanel/index.jsx | Adds persistConfiguration option and refactors persistence calls through a helper callback. |
| packages/bruno-app/src/components/RunnerResults/index.jsx | Adjusts “Run Again” selection logic for folder vs collection runs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
As suggested by GitHub Copilot during AI PR review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Fetch all review comments from CodeRabbit on this PR
gh pr view 8346 --repo usebruno/bruno --json reviews,comments
# Also get review thread comments
gh api repos/usebruno/bruno/pulls/8346/comments --jq '[.[] | select(.user.login == "coderabbitai") | {id: .id, path: .path, line: .line, body: .body, resolved: .resolved}]'Length of output: 17725
Summary of open review itemsFile:
File:
Items 1 and 3 are single-line changes. Item 2 requires adding Tagging suggested reviewers from the walkthrough: (∧ owo∧) 🐇 |
|
Tip For best results, initiate chat on the files or code changes. The PR description image shows the Collection Runner modal with a dark theme. The left panel lists Run (4 requests) and Recursive Run (5 requests) modes with delay/tag configuration fields. The right panel shows a request picker with "3 of 5 selected" and five items (POST Offers ✓, POST Preorder ✓, POST Order ✗, GET Get the weather ✓, POST Commit ✗). Footer buttons are Cancel, Recursive Run (5), Run (4), and Run 3 Requests.
Single-line fixes (no app knowledge needed):
Locator fixes (test-only, no React knowledge needed):
Anyone comfortable with Playwright can handle items 1, 3, and 4 without touching app code at all. 🙏 (∧ owo∧) 🐇 |
|
Tip For best results, initiate chat on the files or code changes. The PR description image shows the Collection Runner modal: left panel has Run (4 requests) / Recursive Run (5 requests) modes with delay and tag fields; right panel has a request picker showing "3 of 5 selected" with POST Offers ✓, POST Preorder ✓, POST Order ✗, GET Get the weather ✓, POST Commit ✗. Footer buttons: Cancel, Recursive Run (5), Run (4), Run 3 Requests.
✅ Item 1 —
|
Description
This pull request introduces selective Folder Runs, which enhances the existing Folder Run modal with a second section to the right, giving users the same freedoms of request checkboxes & rearrangement on the Folder running level, too:
The added functionality comprises:
Run N Requests, while N is the number of checked requests)Recursive Run (9),Run (3))6 of 9 selectedThe following Playwright E2E-tests covering the new feature have been implemented (in
tests/runner/selective-folder-run.spec.ts):Helper Functions Added (in
tests/utils/page/runner.ts)Contribution Checklist:
Summary by CodeRabbit
Release Notes