Commit Graph

4312 Commits

Author SHA1 Message Date
sharan-bruno
4b214693c4 fix: 3093 - Fix pm.setNextRequest(null) not translating to bru.runner.stopExecution() (#8049)
* fix: 3093 - Fix pm.setNextRequest(null) not translating to bru.runner.stopExecution()

* addressed review comments

* addressed review comments
2026-05-20 19:22:55 +05:30
naman-bruno
023630338b fix: select overview tab when closing all tabs (#8026) 2026-05-20 16:32:57 +05:30
prateek-bruno
e0de7d5557 fix: relative path getting stored as absolute on windows (#7895) 2026-05-19 23:53:37 +05:30
Sid
e86a036fd6 fix: allow users to clear the cache, adds environment tests and re-serialization addition (#8035)
* internal emit chain for clearance

* fix: crash ui

* fix(ErrorBoundary): ensure cache clearing is awaited before force quitting

* test(e2e): environment persistence across collections

* test: migration test

* Update environment.spec.ts

* feat: add missing status assertions and .not negation support (#7660)

* feat: add new status assertions and negated variants for response checks

- Introduced new status assertions: `pm.response.to.be.info`, `pm.response.to.be.accepted`, `pm.response.to.be.badRequest`, `pm.response.to.be.unauthorized`, `pm.response.to.be.forbidden`, `pm.response.to.be.notFound`, `pm.response.to.be.rateLimited`, and `pm.response.to.be.withoutBody`.
- Implemented negated variants for existing assertions, allowing checks like `pm.response.to.not.be.ok` and `pm.response.to.not.be.success`.
- Enhanced test coverage to validate the translation of these new assertions and their negated forms in the Postman to Bruno conversion process.

* refactor: update response translation for body assertions

- Changed the translation logic for `pm.response.to.be.withoutBody` to `pm.response.to.be.withBody`, reflecting the actual body content checks.
- Updated corresponding test cases to validate the new assertions and ensure correct translation behavior for body presence checks.
- Enhanced negated variants for body assertions to align with the updated logic.

* feat: add header transformation methods for Postman to Bruno conversion

- Introduced new transformations for `pm.request.headers.prepend`, `pm.request.headers.insert`, and `pm.request.headers.insertAfter` to map to `req.headerList.add`, enhancing header management during the conversion process.
- Updated the transformation logic to ensure only the first argument is retained for these methods, aligning with the intended behavior of the header list operations.

* refactor: update header transformation logic for Postman to Bruno conversion

- Simplified the transformation for `pm.response.to.have.header` and `pm.response.to.not.have.header` to use `res.getHeader` instead of `res.getHeaders`, improving clarity and consistency in the assertions.
- Adjusted related test cases to validate the new transformation logic, ensuring accurate translation of header checks in the conversion process.

* refactor: update header transformation logic for Postman to Bruno conversion

- Enhanced the transformation for `pm.response.to.have.header` and `pm.response.to.not.have.header` to utilize `res.getHeaders()` with lowercased header names, improving consistency and accuracy in header assertions.
- Updated related test cases to reflect the new transformation logic, ensuring correct translation of header checks in the conversion process.

* feat: add data-driven status assertions for response checks

- Introduced a new utility to generate data-driven status assertion entries for `pm.response.to.be.*` checks, including positive and negated variants.
- Integrated the new status assertions into the Postman to Bruno translation logic, enhancing the capability to handle various response status checks.
- Updated tests to validate the translation of new assertions, ensuring accurate conversion of status checks in the response handling process.

* feat: enhance response assertion translations for negated variants

- Updated the transformation logic for `pm.response.to.have.*` assertions to include negated variants, allowing for patterns like `pm.response.to.have.not.status`, `pm.response.to.have.not.header`, and `pm.response.to.have.not.body`.
- Adjusted related test cases to validate the new translations, ensuring accurate conversion of negated assertions in the response handling process.

* refactor: convert status assertion utility to ES module syntax

- Changed the export of `buildStatusAssertionEntries` to ES module syntax for better compatibility with modern JavaScript practices.
- Updated the import statement in the Postman to Bruno translator to reflect the new export format, ensuring seamless integration of the status assertion utility.

* feat: update response body assertion translations to use undefined checks

- Modified the transformation logic for `pm.response.to.be.withBody`, `pm.response.to.not.be.withBody`, and `pm.response.to.be.not.withBody` to use an undefined check instead of truthiness, allowing for accurate handling of falsy body values.
- Updated related test cases to reflect these changes, ensuring correct translation of body presence assertions in the response handling process.

* feat: support newer Postman export format with collection envelope (#8038)

- Updated the Postman collection importer to handle collections wrapped in a { collection: { ... } } format.
- Enhanced the parsing logic to extract collection info correctly from both legacy and newer formats.
- Added a new test case for importing a Postman v2.1 collection with the wrapped format to ensure compatibility.

* fix: reduce padding for dark mode app errors

---------

Co-authored-by: sanish chirayath <sanish@usebruno.com>
2026-05-19 22:53:36 +05:30
sanish chirayath
454b43942c feat: support newer Postman export format with collection envelope (#8038)
- Updated the Postman collection importer to handle collections wrapped in a { collection: { ... } } format.
- Enhanced the parsing logic to extract collection info correctly from both legacy and newer formats.
- Added a new test case for importing a Postman v2.1 collection with the wrapped format to ensure compatibility.
2026-05-19 19:57:44 +05:30
sanish chirayath
8cc3a670c6 feat: add missing status assertions and .not negation support (#7660)
* feat: add new status assertions and negated variants for response checks

- Introduced new status assertions: `pm.response.to.be.info`, `pm.response.to.be.accepted`, `pm.response.to.be.badRequest`, `pm.response.to.be.unauthorized`, `pm.response.to.be.forbidden`, `pm.response.to.be.notFound`, `pm.response.to.be.rateLimited`, and `pm.response.to.be.withoutBody`.
- Implemented negated variants for existing assertions, allowing checks like `pm.response.to.not.be.ok` and `pm.response.to.not.be.success`.
- Enhanced test coverage to validate the translation of these new assertions and their negated forms in the Postman to Bruno conversion process.

* refactor: update response translation for body assertions

- Changed the translation logic for `pm.response.to.be.withoutBody` to `pm.response.to.be.withBody`, reflecting the actual body content checks.
- Updated corresponding test cases to validate the new assertions and ensure correct translation behavior for body presence checks.
- Enhanced negated variants for body assertions to align with the updated logic.

* feat: add header transformation methods for Postman to Bruno conversion

- Introduced new transformations for `pm.request.headers.prepend`, `pm.request.headers.insert`, and `pm.request.headers.insertAfter` to map to `req.headerList.add`, enhancing header management during the conversion process.
- Updated the transformation logic to ensure only the first argument is retained for these methods, aligning with the intended behavior of the header list operations.

* refactor: update header transformation logic for Postman to Bruno conversion

- Simplified the transformation for `pm.response.to.have.header` and `pm.response.to.not.have.header` to use `res.getHeader` instead of `res.getHeaders`, improving clarity and consistency in the assertions.
- Adjusted related test cases to validate the new transformation logic, ensuring accurate translation of header checks in the conversion process.

* refactor: update header transformation logic for Postman to Bruno conversion

- Enhanced the transformation for `pm.response.to.have.header` and `pm.response.to.not.have.header` to utilize `res.getHeaders()` with lowercased header names, improving consistency and accuracy in header assertions.
- Updated related test cases to reflect the new transformation logic, ensuring correct translation of header checks in the conversion process.

* feat: add data-driven status assertions for response checks

- Introduced a new utility to generate data-driven status assertion entries for `pm.response.to.be.*` checks, including positive and negated variants.
- Integrated the new status assertions into the Postman to Bruno translation logic, enhancing the capability to handle various response status checks.
- Updated tests to validate the translation of new assertions, ensuring accurate conversion of status checks in the response handling process.

* feat: enhance response assertion translations for negated variants

- Updated the transformation logic for `pm.response.to.have.*` assertions to include negated variants, allowing for patterns like `pm.response.to.have.not.status`, `pm.response.to.have.not.header`, and `pm.response.to.have.not.body`.
- Adjusted related test cases to validate the new translations, ensuring accurate conversion of negated assertions in the response handling process.

* refactor: convert status assertion utility to ES module syntax

- Changed the export of `buildStatusAssertionEntries` to ES module syntax for better compatibility with modern JavaScript practices.
- Updated the import statement in the Postman to Bruno translator to reflect the new export format, ensuring seamless integration of the status assertion utility.

* feat: update response body assertion translations to use undefined checks

- Modified the transformation logic for `pm.response.to.be.withBody`, `pm.response.to.not.be.withBody`, and `pm.response.to.be.not.withBody` to use an undefined check instead of truthiness, allowing for accurate handling of falsy body values.
- Updated related test cases to reflect these changes, ensuring correct translation of body presence assertions in the response handling process.
2026-05-19 18:04:51 +05:30
Sid
cea883eda2 fix(snapshot): normalize renderer:get-last-opened-workspaces output to avoid reactivating a deleted workspace (#8033)
* fix: normalize workspace paths during workspace switch to prevent stale state

* chore: test text

* tests(snapshot): more workspace coverage
2026-05-18 21:24:58 +05:30
Bijin A B
e8468ac9a5 Merge pull request #7939 from usebruno/fix/7642-stream-files-internal
fix: preserve stream-backed file bodies during request interpolation …
2026-05-18 14:36:20 +05:30
gopu-bruno
10da27dde8 fix: workspace home icon alignment in title bar when already fullscreen (#7967) 2026-05-18 12:54:07 +05:30
Pooja
55774a8258 fix: restore saved credentials when switching back to original auth mode (#7911) 2026-05-18 12:52:10 +05:30
Chirag Chandrashekhar
736c050dae feat: add benchmark framework for collection mount performance (#7915) 2026-05-18 12:19:23 +05:30
mehmet turac
b79349b052 fix: normalize select file labels (#8021) 2026-05-18 05:07:54 +05:30
Sid
da779883a6 chore: change loader (#8009) 2026-05-15 17:45:35 +05:30
Sid
48c88df3a8 fix: handle transient requests during app quit flow in SaveRequestsModal (#8003)
* fix: handle transient requests during app quit flow in SaveRequestsModal

* test: non serial

* chore: fix theme

* fix: ui polish

* chore: import

* chore: cr
2026-05-15 16:27:56 +05:30
Sundram
bdc5d1e017 chore(cli): point Docker maintainer label to support@usebruno.com (#8007) 2026-05-15 14:46:52 +05:30
prateek-bruno
a2ec2c6d56 fix: add resize listener for code mirror instances (#7889) 2026-05-15 14:40:19 +05:30
prateek-bruno
df06d1558b feature: open in terminal from manage workspace (#7877) 2026-05-15 14:29:59 +05:30
Sid
bd2b1ecb70 chore: fix eslint 2026-05-15 13:55:47 +05:30
shubh-bruno
1ab2368f0f fix: file streaming for multipart bodies (#7998) 2026-05-15 13:47:36 +05:30
gopu-bruno
351b294c3f fix: show "+ Add request" CTA in empty .bru collection sidebar (#8000)
* fix: show empty collection Add request CTA when only files exist

* test: add .bru parity to empty-state CTA spec
2026-05-14 21:46:33 +05:30
Sundram
c282a955f8 feat(cli): add Docker image with alpine and debian variants (#8001) 2026-05-14 18:45:17 +05:30
shubh-bruno
612b99460b fix: save dotenv cmd s (#8002) 2026-05-14 18:31:32 +05:30
Bijin A B
d79aabb9f5 tests: playwright tests for all OS environments 2026-05-14 17:38:55 +05:30
shubh-bruno
9190de53ad fix/send request shortcut issue (#7993) 2026-05-14 13:14:54 +05:30
Sid
31dedc3c95 feat: Stabilize variable info editor transition and popup lifecycle (#7912)
* feat: Stabilize variable info editor transition and popup lifecycle (#7458) (#7818)

* fix: prevent var-info split second UI flicker.

Co-authored-by: Mhammed Reda El Jirari <ridaeljirari@gmail.com>
Co-authored-by: Fred Rukundo <dukefred9@gmail.com>
Co-authored-by: El Mehdi Bennamrouche <bennamrouchex@gmail.com>
Co-authored-by: Ahmed Bouregba <medex0606@gmail.com>

* fix: variable-tooltip hover issues (#7907)

---------

Co-authored-by: Avictos <125824783+avictos@users.noreply.github.com>
Co-authored-by: Mhammed Reda El Jirari <ridaeljirari@gmail.com>
Co-authored-by: Fred Rukundo <dukefred9@gmail.com>
Co-authored-by: El Mehdi Bennamrouche <bennamrouchex@gmail.com>
Co-authored-by: Ahmed Bouregba <medex0606@gmail.com>
Co-authored-by: shubh-bruno <shubham@usebruno.com>
2026-05-13 21:49:14 +05:30
Sid
57d2fc7899 fix: example-request tab collision (#7989)
* fix: prevent response-example tabs from hijacking request sidebar selection

* fix: add selectors for examples with index

* test: better locator

* fix: duplicate name collision

* fix: refactor sidebar example handling functions for better clarity and reusability

* chore: cr comments
2026-05-13 21:47:39 +05:30
sharan-bruno
4fa882c67c fix: 3014 - Postman import ignores API Key "in" placement setting and defaults to header (#7968)
* fix: 3014 - Postman import ignores API Key "in" placement setting and defaults to header

* addressed review comments

* addressed review comment

* addressed review comment - added a test id

* addressed reveiew comment
2026-05-13 19:16:44 +05:30
Sid
2c9dc9dcf8 fix: correct the request type tabs in the snapshot (#7994) 2026-05-13 19:05:34 +05:30
Sid
9df06e152a fix: add tab error boundary (#7987) 2026-05-13 18:48:57 +05:30
prateek-bruno
9f75959452 handle empty mime type in insomnia importer (#7828) 2026-05-13 15:58:02 +05:30
prateek-bruno
dd922c7163 fix: show whitespace-only error on Create workspace and collection modal (#7883) 2026-05-13 09:59:42 +05:30
Sid
d8fb7c7e7e ai: coding standards for e2e tests (#7973)
* ai: coding standards for e2e tests

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-11 17:32:27 +05:30
phoval
4ad51186a1 fix(bruno-electron): interpolate auth headers for GraphQL introspection request (#5560) 2026-05-11 11:13:21 +05:30
Chirag Chandrashekhar
0c7bce3320 fix: Update SaveTransientRequestModal empty state when collections don't exist (#7955) 2026-05-08 16:14:07 +05:30
shubh-bruno
327861b353 fix: persist scroll for assertions (#7947) 2026-05-07 23:30:32 +05:30
Sid
8552b47ead feat: request restore (#7948) 2026-05-07 22:17:11 +05:30
shubh-bruno
2c27e016ef fix: persist codeeditor state json/undo/redo (#7946) 2026-05-07 22:05:38 +05:30
Sid
415b75decb feat: snapshot issues with global tabs (#7942)
* chore: fix for sidebar state

* fix: global and sidebar state sync

* fix: re-priroritise how tab uid is synced
2026-05-07 19:03:02 +05:30
Hritam Shrivastava
975c638f39 fix: preserve stream-backed file bodies during request interpolation (#7690) 2026-05-07 14:05:14 +05:30
sanish chirayath
f8bf1460bd refactor: revert HeaderList method names to PropertyList conventions (#7931)
* refactor: update headerList methods and translations for consistency

- Renamed methods in req.headerList and res.headerList from 'forEach' to 'each' for consistency with the new API.
- Updated method translations in the Postman converters to reflect the new method names: 'append' to 'add', 'set' to 'upsert', and 'delete' to 'remove'.
- Adjusted related tests to ensure they validate the new method names and functionality.
- Removed deprecated test cases for 'append' and 'set', replacing them with tests for 'add' and 'upsert'.
- Enhanced documentation to clarify the changes in method names and their usage.

* test: add new tests for HeaderList methods and behavior

- Introduced tests to verify that the 'idx' property is undefined in HeaderList, ensuring compliance with the updated API.
- Added tests to confirm that positional methods (prepend, insert, insertAfter) do not exist in HeaderList, reflecting the recent refactor.
- Implemented a test to check that the two-argument form of the 'add' method correctly overwrites existing headers, enhancing the robustness of header management tests.
2026-05-06 22:55:21 +05:30
sanish chirayath
d39d5ef575 refactor: remove idx from HeaderList, extend ReadOnlyPropertyList, add positional method translations (#7917)
* refactor: remove 'idx' method from headerList and update related tests

- Eliminated the 'idx' method from both req.headerList and res.headerList to streamline header management.
- Updated associated tests and documentation to reflect the removal, ensuring clarity in the API usage and maintaining consistency across the header management system.

* refactor: block unimplemented HeaderList methods with error messages

- Added error handling for unimplemented methods in HeaderList, including idx, add, upsert, remove, each, prepend, insert, and insertAfter.
- Each method now throws a descriptive error indicating the appropriate alternative methods to use, enhancing clarity in the API and guiding users towards correct usage.

* refactor: update error message in idx() method of HeaderList for clarity

- Modified the error message in the idx() method to guide users towards using all()[index] or get(name) instead of the unsupported idx() method, enhancing the clarity of the API documentation.

* refactor: update HeaderList to extend ReadOnlyPropertyList and remove unimplemented methods

- Changed HeaderList to extend ReadOnlyPropertyList instead of PropertyList, streamlining its functionality.
- Removed unimplemented methods (prepend, insert, insertAfter) from HeaderList, clarifying the API and guiding users towards using supported methods.
- Updated related tests to reflect these changes, ensuring consistency and accuracy in header management.

* test: add translations for pm.request.headers methods in request tests

- Introduced new tests to validate the translation of pm.request.headers methods (prepend, insert, insertAfter) to their corresponding req.headerList.append method.
- Enhanced existing tests to ensure accurate conversion and functionality of header management in the Bruno converters.

* feat: enhance header translation methods for pm.request.headers

- Added translations for additional pm.request.headers methods (get, has, one, all, count, indexOf, find, filter, each, map, reduce, toObject, clear) to their corresponding req.headerList methods.
- Updated tests to validate the new translations and ensure accurate header management functionality in the Bruno converters.
2026-05-06 18:54:54 +05:30
Pragadesh-45
50d3862ea3 fix: allow empty header names in CLI and gRPC request preparation (#7925) 2026-05-06 18:52:16 +05:30
naman-bruno
39f8c68124 fix: message in ConnectGitRemote and RemoveGitRemote (#7929) 2026-05-06 18:50:30 +05:30
shubh-bruno
ece742cac8 fix: scrollbar restoration (#7926)
* fix: restore scrollbar

* chore: remove comments

---------

Co-authored-by: shubh-bruno <shubh-bruno@shubh-bruno.local>
2026-05-06 17:43:31 +05:30
Sid
20f4e4263a feat: ui state snapshots (#7794)
* feat(snapshot): add session snapshot persistence and restoration

- Add snapshot middleware to persist UI state (tabs, workspaces, environments)
- Add SnapshotManager service in electron for atomic snapshot storage
- Add accessor-based tab serialization using pathname for reliable restoration
- Add loading states for tabs while collections are mounting
- Add hydrateTabs to restore tabs from snapshots on app load
- Add devTools state persistence (console open/height/tab)

* fix(snapshot): preserve unloaded collections and fix async serialization

Make serializeSnapshot async to fetch existing snapshot before saving,
ensuring collections not currently loaded in Redux are preserved. Fix
activeTab serialization to pass collection object instead of just UID.

* refactor(snapshot): rewrite storage to map-based schema with granular IPC

Replace array-based snapshot storage with key-value maps keyed by pathname
for O(1) lookups. Separate tabs into their own top-level map, decoupled
from collections.

- Rewrite SnapshotManager with map-based schema and granular read/write
  methods (getWorkspace, getTabs, setCollection, removeWorkspace, etc.)
- Add 12 granular IPC handlers (renderer:snapshot:*) replacing 4 coarse ones
- Update middleware serialization to produce maps; remove activeCollectionUidCache
  in favor of lastActiveCollectionPathname on workspace objects
- Fix mountCollection passing collectionUid instead of collection to restoreTabs
- Preserve non-active workspace state from existing snapshot on save

* wip

* refactor: allow migration of old snapshot

* refactor: trim down redundancy

* fix: for workspace state

* feat: fix for finalised schema

* fix: schema cleanup

* chore: simplify

* chore: wait on hydration to finish

* chore: snapshot changes to schema

* chore: fix typo

* fix: switch schema for saving and restoring extras

* chore: correctness changes

* chore: add active in the schema check

* chore: fix lint

* chore: comments

* chore: make writes async

* fix: sorting and cross workspace shared collection fixes

* chore: add version

* fix: wait on hydration

* chore: fix backward compat for ui-snapshots

* chore: dead code removal

* Fix optional chaining in snapshot lookup

---------

Co-authored-by: Chirag Chandrashekhar <cchirag85@gmail.com>
2026-05-06 17:42:46 +05:30
gopu-bruno
0ed2fc82b4 fix: remove dragbar z-index that was bleeding through modals (#7924) 2026-05-06 15:35:20 +05:30
Sid
973ca18e00 Revert "feat: ws multi message (#7719)" (#7921)
This reverts commit a305b41c93.
2026-05-06 13:59:29 +05:30
Pragadesh-45
e92131ff8a fix(cli): skip headers with empty name when building request (#7869) 2026-05-06 13:57:29 +05:30
Pragadesh-45
5cf807b770 feat: implement proxy-aware API fetching using axios instance (#7767) 2026-05-06 13:49:20 +05:30
gopu-bruno
ba42c22aad fix: response pane overflow on vertical split drag for grpc/ws requests (#7916) 2026-05-05 23:02:56 +05:30