* fix: tab type resolution for non request types
* Remove console log from snapshot test
Removed console log statement from folder.spec.ts
* test(snapshot): deserializeTab test addition for the removed guard
* 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>
* 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>