Skip to content

Backup/main - #7663

Merged
lohit-bruno merged 4 commits into
usebruno:mainfrom
sanish-bruno:backup/main
Apr 2, 2026
Merged

lohit-bruno merged 4 commits into
usebruno:mainfrom
sanish-bruno:backup/main

Conversation

@sanish-bruno

@sanish-bruno sanish-bruno commented Apr 2, 2026 •

Copy link
Copy Markdown
Collaborator

Description

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

    • CLI now includes response duration and size metrics.
  • Bug Fixes

    • Multipart form file selection now updates existing file entries instead of duplicating them.
    • Folder paste operations now correctly target the focused folder when applicable.
  • Style

    • Enhanced upload and clear-file button styling with improved visual feedback and alignment.
  • Tests

    • Added test coverage for multipart form file selection and keyboard shortcuts.

sid-bruno and others added 4 commits April 1, 2026 23:23
* fix: update system proxy fetching to use finally for improved reliability

* Update packages/bruno-electron/src/index.js

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
…sebruno#7429)

* fix: add size and duration fields to CLI bru.runRequest() response

Add `size` and `duration` fields to the response object in CLI to match
GUI behavior, ensuring consistent API for bru.runRequest() across both
environments.

- `duration` is an alias for `responseTime` for GUI compatibility
- `size` is the byte length of the response buffer (0 for errors/skipped)

Fixes usebruno#7352

* fix: address PR review feedback for CLI response consistency

- Coerce responseTime header to number (was string from headers.get())
- Add comment explaining duration vs responseTime difference between
  GUI (wall-clock) and CLI (approximation using responseTime)
- Add integration tests for duration/size fields across skipped,
  success, and network error response paths

* fix: add missing setupProxyAgents mock in response-fields test

The success path calls setupProxyAgents which was missing from the
proxy-util mock, causing CI failure.

---------

Co-authored-by: Chirag Chandrashekhar <[email protected]>
@coderabbitai

coderabbitai Bot commented Apr 2, 2026 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b30e2799-5b7c-4285-a3b1-499cd4fb4179

📥 Commits

Reviewing files that changed from the base of the PR and between c7ebe25 and 5cd3e7a.

📒 Files selected for processing (11)
  • packages/bruno-app/src/components/RequestPane/MultipartFormParams/StyledWrapper.js
  • packages/bruno-app/src/components/RequestPane/MultipartFormParams/index.js
  • packages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/ResponseExampleMultipartFormParams/StyledWrapper.js
  • packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js
  • packages/bruno-app/src/components/Sidebar/Collections/CollectionSearch/index.js
  • packages/bruno-cli/src/runner/run-single-request.js
  • packages/bruno-cli/tests/runner/response-fields.spec.js
  • packages/bruno-electron/src/index.js
  • packages/bruno-electron/src/store/shell-env-state.js
  • tests/request/multipart-form/multipart-form-file-select.spec.ts
  • tests/shortcuts/bound-actions.spec.ts

Walkthrough

This PR enhances multipart form file handling with add-or-update semantics, improves collection paste behavior to be folder-aware, adds response metrics (duration and size) across CLI execution paths, refactors Electron system proxy initialization control flow, and expands test coverage for these features.

Changes

Cohort / File(s) Summary
Multipart Form Styling & Behavior
packages/bruno-app/src/components/RequestPane/MultipartFormParams/StyledWrapper.js, packages/bruno-app/src/components/RequestPane/MultipartFormParams/index.js, packages/bruno-app/src/components/ResponseExample/ResponseExampleRequestPane/ResponseExampleMultipartFormParams/StyledWrapper.js
Enhanced hover styling for file upload/clear buttons; updated handleBrowseFiles to add-or-update file entries by UID; reordered clear button in file cell render.
Collection Paste Behavior
packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js
Modified handlePasteItem to paste into focused folders directly, falling back to parent folder only for non-folder items.
Sidebar Search Testing
packages/bruno-app/src/components/Sidebar/Collections/CollectionSearch/index.js
Added data-testid attribute to sidebar search input for improved test selectors.
CLI Response Metrics
packages/bruno-cli/src/runner/run-single-request.js, packages/bruno-cli/tests/runner/response-fields.spec.js
Added duration and size fields to response objects across all execution paths (skipped, error, success); new comprehensive test suite validating these metrics.
Electron Proxy Initialization
packages/bruno-electron/src/index.js, packages/bruno-electron/src/store/shell-env-state.js
Refactored system proxy initialization to use .finally() ensuring fetch runs regardless of shell env readiness; added type annotation for promise state.
Test Coverage Expansion
tests/request/multipart-form/multipart-form-file-select.spec.ts, tests/shortcuts/bound-actions.spec.ts
Added multipart file selection test with real file dialog mocking; updated sidebar search and folder copy/paste assertions to use new selectors and stricter verification logic.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

  • #7429: Directly related—both PRs add duration/size response fields to CLI responses and include corresponding tests.
  • #7640: Directly related—identical multipart form UI changes (hover styling, clear-button reordering, handleBrowseFiles add-or-update logic).
  • #7656: Related—both PRs implement folder-aware paste semantics in handlePasteItem.

Suggested reviewers

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

Poem

📁 Files now paste where they belong,
🚀 Metrics flow strong through the CLI,
🎨 Buttons styled, workflows refined,
✨ Each test a promise kept,
🔧 Electron's path now smooth and sure.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

This branch was successfully deployed

1 active deployment
Production — 5cd3e7ab Deployed Apr 2, 2026 by vercel[bot]
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.

6 participants