Commit Graph

4479 Commits

Author SHA1 Message Date
naman-bruno
d0863e2a43 feat(app): introduce Enable App setting (#8521) 2026-07-08 21:46:11 +05:30
Pooja
139d71a8f8 fix(ws): preserve message editor scroll when selecting another message (#8536) 2026-07-08 19:12:12 +05:30
ravindra-bruno
4dadd6c69f fix(ai-assist): prevent double border and gap shift on AI generate button hover (#8517) 2026-07-08 18:48:24 +05:30
naman-bruno
7a1ea5e381 style(app): app mode toggle button styling (#8523) 2026-07-08 14:57:30 +05:30
naman-bruno
2079c7a452 feat(ai): implement AI chat sidebar popout and sidebar resizing (#8509) 2026-07-08 14:56:44 +05:30
Chirag Chandrashekhar
da707ea0d5 fix(mount): survive large and corrupt files when mounting collections (#8514) 2026-07-08 13:08:55 +05:30
sachin-thakur-bruno
7af6150f42 fix(request-panel)/fixed overflow size column issue on first load (#8525)
* fix(request-panel)/fixed overflow size column issue on first load

* added tests

* refactor the total width calculation based on available space
2026-07-08 12:43:53 +05:30
Sid
86e4dc065b fix(ToggleSwitch): correct onChange handler for response pane (#8520)
* fix(ToggleSwitch): correct onChange handler to prevent unintended toggling

* fix(ToggleSwitch): update onChange handler to correctly trigger toggle action

* fix(tests): enhance clipboard handling and improve response pane interactions

* fix(ToggleSwitch): change event handler from onChange to onInput for better toggle interaction
fix(tests): update response pane click action to ensure proper interaction with dropdown

* fix(tests): remove clipboard initialization from test setup
2026-07-07 23:21:19 +05:30
adwait-bruno
ad14fdfba5 fix(openapi):validate API spec imports (#8322)
* fix(openapi):validate API spec imports and resolve preview to error state instead of hanging

* fix(openapi):allows opening of malformed files with correct extension

* fix(openapi):reject non-OpenAPI content in spec preview before timeout

* test(openapi): add unit + e2e coverage for spec import validation

* refactor(openapi):centralise spec error messages and fix dialog restore

* fix:removed nested try catch

* test:added common locators

* refactor:removed repeated lines

* refactor:removed redundant file reads

---------

Co-authored-by: Adwait Aayush <adwaitaayush@Adwaits-MacBook-Air.local>
2026-07-07 22:05:23 +05:30
Sid
0bba66a590 feat: variable descriptions (#8269)
* feat: add description column to various tables and enhance UI interactions
- Introduced a description column in Headers, VarsTable, and other components to allow multi-line descriptions.
- Added toggle buttons to show/hide the description column in relevant tables.
- Updated EditableTable component to support dynamic row addition with customizable labels.
- Enhanced UI for better user experience with consistent button styles and spacing adjustments.

* chore: resize fix handles

* fix: restrict column check for last index

* refactor: remove unwanted style and fix bottom padding of the last child in the table row

* tests: improve testability and fix impacted locators

* tests: fix locators for value fields

* fix: improve newline handling in description prefix

* fix: ts changes

* chore: remove redundant code and fix description roundtrip

* chore: remove redundant check

* tests(bru-lang): tests for description and annotation

* test: improve locators and tests

* tests: descriptions

* chore: re-add description setup

* fix: re-add description cols

* chore: fix the double click reset

* fix: account for hidden sidebar in request pane width calculation

* refactor: ui/ux fixes for data type toggle

* chore: inline common deps into bruno-lang and bruno-schema

* chore: tests

* chore: fix ux for descriptions

* fix: layout for environment vars table

* fix: ensure correct row selection for multipart file upload in tests

* feat: enhance UID assignment for request headers and variables in collections

* chore: simplify

* chore: update pkg

* chore: abstract the e2e utils

* chore: fix exports

* tests: fix locators for datatype vars

* fix: ux issue with secrets in environment table

* tests: update locators for collection headers and vars descriptions

* tests: update locators to use data attributes for datatype selectors

* chore: update default css width for actions column

* chore: remove tooltip for string type warnings

* fix: reduce name widths

* refactor: update annotation serialization to use single-quote delimiters for descriptions

* refactor(tests): simplify description formatting in jsonToEnv tests

* feat: add multiline description escaping and unescaping functions with tests

* refactor: clean up imports and improve multiline text block handling

* refactor: update locators to use new test IDs for environment variable editors

* refactor: streamline header input handling and improve environment variable row access

* refactor: update e2e-test job to support self-hosted runners

* refactor: update E2E test runner configuration to include e2e and macOS environments

---------

Co-authored-by: Pragadesh-45 <temporaryg7904@gmail.com>
2026-07-07 21:43:39 +05:30
Pooja
958ca49156 fix(ws): prevent message list from scrolling on request pane tab switch (#8448) 2026-07-07 20:42:34 +05:30
shubh-bruno
707489ef77 fix(tests): update openFolderRequest function for tests (#8506)
* fix(tests): update openFolderRequest function for tests

* fix: update imports for openFolderRequest

---------

Co-authored-by: shubh-bruno <shubh-bruno@shubh-bruno.local>
2026-07-07 19:52:12 +05:30
Sid
2cc382538d fix(e2e-test): update runner configuration to support self-hosted and e2e environments (#8524) 2026-07-07 19:43:26 +05:30
naman-bruno
337b962e66 feat(app): enhance EmptyAppState (#8522) 2026-07-07 19:24:55 +05:30
gopu-bruno
85e33c595a fix(ai): align AI preference tab with theme styling (#8518) 2026-07-07 17:32:58 +05:30
Pooja
4592d2c30e fix(app): scope env variable/secret search per tab (#8491) 2026-07-07 15:05:29 +05:30
sachin-thakur-bruno
6f8865e162 fix(request-panel)/changed request panel static width to percentage width of screen width (#8499) 2026-07-07 12:27:50 +05:30
Sid
cbed13a346 feat(snapshot): implement active workspace tab type tracking (#8487)
* feat(snapshot): implement active workspace tab type tracking and restoration

* feat(snapshot): introduce workspace tab types and update related logic
2026-07-07 00:09:38 +05:30
Utkarsh
4ddf65c0c1 fix: changelog test cases fail fixed (#8498) 2026-07-06 23:18:39 +05:30
naman-bruno
06ca9b9521 refactor(AI): update ToggleSwitch size to 'xs' (#8500) 2026-07-06 23:13:51 +05:30
ravindra-bruno
143cb5fe33 fix(ai): prevent AI preferences panel clipping and enforce min-height on Generate Tests textarea (#8495) 2026-07-06 19:18:59 +05:30
Abhisek M
440156d80e Fix icon ai (#8270)
* changing AI icon in Pref

* Fix final icon for AI

* delete unused file

* fix-merge-conflicts

---------

Co-authored-by: naman-bruno <naman@usebruno.com>
Co-authored-by: Utkarsh <utkarsh@usebruno.com>
2026-07-06 19:05:37 +05:30
ravindra-bruno
e9158123bd fix(migration): remaped snapshot tab paths and preserve uids on bru-t… (#8450)
* fix(migration): remaped snapshot tab paths and preserve uids on bru-to-yml migration

* ci: re-trigger checks

---------

Co-authored-by: Utkarsh <utkarsh@usebruno.com>
2026-07-06 18:47:26 +05:30
naman-bruno
153f0cd91f refactor(AI): remove platform modifier key mock (#8496) 2026-07-06 18:36:31 +05:30
naman-bruno
732356b7c0 refactor(AI): enhance active item retrieval logic and improve UI styling (#8477)
* refactor(AI): enhance active item retrieval logic and improve UI styling

* fix

---------

Co-authored-by: Utkarsh <utkarsh@usebruno.com>
2026-07-06 16:40:25 +05:30
ravindra-bruno
6b90e80c5d fix(ai): show platform-correct modifier key in AI shortcut hints (#8430)
* fix(ai): show platform-correct modifier key in AI shortcut hints

* test(ai): cover platform-correct modifier key in AI shortcut hint specs

* Added the import

* Added ai.enabled default to playwright default preferences

---------

Co-authored-by: Utkarsh <utkarsh@usebruno.com>
2026-07-06 15:35:44 +05:30
Pooja
0148ba6510 feat(ws): improve message panel UX (#8465) 2026-07-06 14:46:27 +05:30
Sid
b1f08b5131 fix(snapshot): active workspace restoration from snapshot (#8392)
* feat(workspaces): implement active workspace restoration from snapshot

- Added a new action to restore the active workspace from a snapshot.
- Integrated workspace restoration into IPC events for improved user experience.
- Refactored workspace loading logic to prioritize valid workspaces and handle invalid paths.
- Introduced utility functions for workspace path validation and normalization.
- Added tests to ensure correct functionality of workspace restoration and validation logic.

* feat(snapshot): refactor snapshot serialization and add environment preservation logic

- Moved snapshot serialization logic to a new file for better organization.
- Implemented environment preservation for collections during snapshot serialization.
- Added utility functions to handle collection environment checks and serialization.
- Introduced tests to validate the new serialization behavior and environment preservation.
- Enhanced existing tests to cover edge cases for unmounted collections and environment persistence.

* Add tests for missing and invalid environment files

* feat(snapshot): refactor devTools normalization and add saveToken to IPC handler

* refactor(snapshot): remove saveToken from IPC handler for renderer:snapshot:save

* feat(snapshot): implement collection deduplication logic in SnapshotManager and add corresponding tests

* feat(snapshot): enhance workspace-specific environment handling for shared collections

* feat(snapshot): remove sourceWorkspacePathname from snapshot serialization and related tests

* feat(snapshot): remove sourceWorkspacePathname from SnapshotManager and add tests for shared collection environment restoration

* feat(snapshot): refactor collection deduplication tests and enhance snapshot seeding utility

* feat(snapshot): enhance workspace path normalization and improve snapshot environment tests

---------

Co-authored-by: engineering-bruno <engineering@usebruno.com>
2026-07-04 17:38:41 +05:30
Bijin A B
b6187b40e1 chore: update coding conventions and best practices for this repo (#8482) 2026-07-04 16:55:52 +05:30
sachin-bruno
acc74745de (size/L)feat:Added the option for bruno version edit in the collection overview (#8424)
* feat:Added the option for bruno version edit

* Conflicts resolved

* Comments resolved

* Comments fixed

* Comments addressed

* Comments addressed

---------

Co-authored-by: bruno-sachin <bruno-sachin@brunos-MacBook-Air.local>
2026-07-03 22:34:33 +05:30
sanish chirayath
e7197d6363 fix(variables): correct scripted-variable persistence races and cross-request propagation (#8406)
* feat(collections): implement sliding window for script request UIDs to manage stale updates

- Introduced a bounded sliding window mechanism for tracking recent script request UIDs, allowing for better handling of stale updates from superseded or cancelled requests.
- Updated relevant functions to utilize the new `isStaleScriptRequest` utility for improved clarity and maintainability.
- Enhanced the persistence logic to ensure that updates from retired requests do not interfere with newer requests, improving data integrity during concurrent operations.
- Added comprehensive tests to validate the behavior of the new UID management system and its impact on variable propagation across requests.

* refactor(tests): remove outdated test for persistentEnvVariables in runtime tests

- Eliminated the test case that checked for the inclusion of persistentEnvVariables in the result, as it is no longer relevant.
- Cleaned up the test suite to enhance clarity and maintainability, focusing on relevant assertions for variable management.

* refactor(collections): simplify environment persistence logic and remove stale request handling

- Updated the `persistActiveEnvironment` and related functions to eliminate the requestUid parameter, streamlining the logic for environment persistence.
- Removed outdated checks for stale updates from superseded requests, enhancing clarity and maintainability.
- Deleted the `_scriptRequestUids` management code and associated tests, as they are no longer necessary for the current implementation.
- Improved the handling of environment updates to ensure accurate state management without stale data interference.

* refactor(filesystem): remove unused hasJsExtension function

- Deleted the `hasJsExtension` utility function from the filesystem module as it was no longer needed.
- Cleaned up the exports to enhance clarity and maintainability of the codebase.

* test(network): add unit tests for applyCollectionVarsToCollectionRoot

* refactor(ipc, environments): implement file locking for environment updates

- Updated the environment persistence logic in both `collection.js` and `workspace-environments.js` to utilize file locking during read and write operations.
- This change ensures that concurrent access to environment files is managed safely, preventing potential data corruption and enhancing reliability during updates.
2026-07-03 14:44:38 +05:30
adwait-bruno
b4e783d9e9 fix:Draft icon indicator on Workspace Environment tab (#8342) 2026-07-03 13:41:40 +05:30
shubh-bruno
efd61bf682 feat(auth): akamai auth integration (#8199) 2026-07-03 13:31:28 +05:30
Pooja
876a4c4cd3 fix(app): move env save-all icon to header actions (#8449) 2026-07-03 13:27:33 +05:30
Pooja
37aa720813 fix(ws): persist message name rename on cmd+s/ctrl+s while editing (#8447) 2026-07-03 13:25:54 +05:30
sachin-bruno
bf3abec50e CDN docs url changes (#8466)
Co-authored-by: bruno-sachin <bruno-sachin@brunos-MacBook-Air.local>
2026-07-03 00:34:11 +05:30
gopu-bruno
eca0939f31 fix(ai): render AI assist popup via portal to prevent clipping by devtools (#8463) 2026-07-02 16:07:42 +05:30
naman-bruno
408aef9eef feat(ai): add security preferences management to AI settings (#8453) 2026-07-02 14:42:48 +05:30
sharan-bruno
022426a3ab fix(import): linting issue in Import fails for gRPC request without URL in exported collection (#8462) 2026-07-02 14:33:44 +05:30
Utkarsh
bd271ffad8 feat(workspaces): dispatch closeAiSidebar action on workspace switch (#8451) 2026-07-02 13:43:56 +05:30
prateek-bruno
6f96dfd58c fix: remove the v4-migration legacy key from local storage (#8353) 2026-07-02 12:55:36 +05:30
naman-bruno
488c9f2444 feat(AI): add stop generation functionality and improve UI interactions (#8452) 2026-07-02 01:40:28 +05:30
Sid
99538283a3 chore: update lodash to version 4.18.1 across all packages (#8455) 2026-07-02 01:26:38 +05:30
sachin-bruno
9157eb4190 feat:Added collection name and minor UI changes to the generate doc modal (#8391)
* feat:Added collection name and minor UI changes to the generate doc modal

* feat:Removed the test file

* feat: updated the version number changes and test cases

* Comments fixed

---------

Co-authored-by: bruno-sachin <bruno-sachin@brunos-MacBook-Air.local>
2026-07-01 23:37:55 +05:30
adwait-bruno
7b155c0e0a fix:serialize object variable values before copying to clipboard (#8362)
* fix:serialize object variable values before copying to clipboard

* fix:guard JSON.stringify against circular and non-serializable object values

* refactor:added string helper function

* test:added playwright test

---------

Co-authored-by: Adwait Aayush <adwaitaayush@Adwaits-MacBook-Air.local>
2026-07-01 20:19:17 +05:30
sharan-bruno
4f31e9b073 fix(import): Import fails for gRPC request without URL in exported collection (#8367)
* fix(import): Import fails for gRPC request without URL in exported collection

* changed the approach for import request with missing url

* addressed review comment

* added a fixture for http example request

* added an assertion to check whether the request is being imported or not

* added an assertion to check whether the request is being imported or not

* refactored test scripts
2026-07-01 14:37:23 +05:30
Sid
ed468dba88 feat: enhance multipart-form file handling by filtering empty values in parser and stringifier (#8444) 2026-07-01 13:21:49 +05:30
sanish chirayath
4ab68fc71f feat(cli): persist env, global-env, and collection var changes from scripts (#8387)
* feat(variables): implement variable persistence and updates for environment and collection files

- Introduced new utility functions for applying and persisting variable updates, enhancing the management of environment and collection variables.
- Updated the run command to include descriptors for environment files, allowing for better tracking of variable changes.
- Enhanced the runSingleRequest function to synchronize variable updates and persist changes to the appropriate files.
- Added comprehensive tests to ensure the correct functionality of variable merging and persistence logic across different file formats.

* fix(variables): refine YAML handling and data type inference for environment variables

- Updated the run command to exclusively recognize '.yml' files, removing support for '.yaml' extensions.
- Enhanced the persistence logic to correctly handle data type inference for newly added environment and collection variables.
- Added comprehensive tests to validate the correct writing of variables to YAML and .bru files, ensuring accurate data type preservation and updates.
- Improved the handling of existing data types when variables are modified, ensuring consistency across different formats.

* feat(tests): add integration tests for typed variable persistence in CLI

- Introduced a new test suite to validate the persistence of typed environment and collection variables set via scripts in the CLI.
- Implemented a local server to facilitate HTTP requests during tests, ensuring accurate simulation of variable management.
- Enhanced the test logic to verify that the correct data type annotations are written to both .bru and YAML files after CLI execution.
- Added comprehensive assertions to confirm the expected disk state for both global and collection variables across different sandboxes.

* refactor(runSingleRequest): remove synchronization of variable updates after post response script execution

- Eliminated the syncVariableUpdates call from the runSingleRequest function, streamlining the variable handling process.
- Adjusted the logic to focus on executing post response variables without unnecessary synchronization, improving performance and clarity.

* feat(env-vars): implement transient environment variable handling and improve persistence resilience

- Added support for transient environment variable overrides via the `--env-var` CLI option, ensuring these values are not persisted to disk.
- Enhanced the `mergeScriptVarsIntoEnvList` function to prevent overridden variables from being written back, preserving existing entries.
- Updated the `persistVariableUpdates` function to handle potential disk write errors gracefully, logging warnings instead of failing the execution.
- Introduced comprehensive tests to validate the behavior of transient variables and ensure correct persistence logic under various scenarios.

* fix(persist-variables): enhance variable persistence logic and testing

- Improved the `persistEnvFile` function to preserve additional fields (uid, dataType, custom metadata) during JSON writes, ensuring no data loss for unrecognized entries.
- Updated the `persistVariableUpdates` function to respect `envVarOverrides` when writing to the global environment file, preventing transient values from being persisted.
- Added regression tests to validate the preservation of additional fields and the correct handling of environment variable overrides in persistence scenarios.

* refactor(tests): streamline fixture writing and enhance variable persistence tests

- Renamed the `writeFileSyncMkdirP` function to `writeFixtureFile` for clarity, emphasizing its role in writing fixture files with parent directory creation.
- Replaced multiple calls to `writeFileSyncMkdirP` with the new `writeFixtureFile` function to improve code readability and maintainability.
- Added tests to verify the deletion of environment variables from disk when removed from the environment map, ensuring accurate persistence behavior.
- Implemented checks to prevent runtime variables from being persisted, safeguarding against unintended data leaks.

* test(env-file): add integration test for JSON environment variable persistence

- Implemented a new test to verify that typed environment variables are correctly persisted to a JSON file using the --env-file option.
- Ensured that existing entries retain their uid and custom fields during the persistence process, validating the shape-preservation guarantee.
- Enhanced the test to check that new typed variables from the script are accurately written and that untouched entries remain unchanged.

* test(env-file): add integration tests for YAML and .bru variable persistence

- Implemented new tests to verify the persistence of typed environment variables to both YAML and .bru files using the --env-file option.
- Ensured that typed values are correctly serialized with appropriate annotations in the output files, validating the correct handling of different formats.
- Enhanced coverage for the persistence behavior of environment variables, confirming that existing entries remain unchanged while new variables are accurately written.

* test(env-file): enhance JSON environment variable persistence tests

- Added a new test to verify the preservation of native typed values in JSON environment files when unrelated keys are touched during script execution.
- Ensured that typed values maintain their original types and are auto-annotated with the correct dataType, validating the integrity of the environment variable persistence process.
- Expanded the typed-value inference tests to cover cross-type transitions, confirming that existing dataType annotations are ignored when new values are written.

* refactor(env-vars): transition env-var overrides to Map for improved persistence handling

- Changed the `envVarOverrides` from a Set to a Map to track injected values, enhancing the logic for distinguishing between transient and deliberate variable writes.
- Updated related functions to accommodate the new Map structure, ensuring that only matching overrides are filtered out during persistence.
- Enhanced documentation and tests to reflect the new behavior, confirming that deliberate script writes with different values are correctly persisted.

* test(integration): refine comments and enhance clarity in typed persistence tests

* test(integration): add tests for variable persistence in tests blocks and error handling

- Implemented new tests to verify that variables set within `tests {}` blocks are correctly persisted to the environment and collection files.
- Added a test to ensure that variables written before an error in a `tests {}` block are still saved, confirming the integrity of partial results during execution.
- Enhanced existing tests with detailed comments for clarity and understanding of the persistence behavior in various scenarios.

* test(integration): add collection variable persistence test for error handling

- Introduced a new test to verify that collection variables set before an error in a `tests {}` block are correctly persisted to the collection file.
- Enhanced existing tests to ensure that both environment and collection variables maintain their expected values during error scenarios, confirming the robustness of variable persistence.

* test(integration): add test for environment and collection variable persistence from post-response expressions

- Introduced a new test to verify that environment and collection variables mutated as a side effect of `vars:post-response` expressions are correctly persisted.
- Enhanced the `runSingleRequest` function to synchronize variable updates after executing post-response scripts, ensuring that changes are reflected in the environment and collection files.
- This change improves the robustness of variable handling in the CLI, aligning it with the expected behavior of the desktop application.

* refactor(persist-variables): streamline JSON parsing and enhance variable persistence tests

- Simplified the JSON parsing logic in the `persistEnvFile` function by removing unnecessary try-catch blocks, ensuring that malformed files are handled gracefully.
- Updated tests to verify the persistence of new collection variable types, including numbers, booleans, and objects, ensuring that typed variables are correctly serialized and maintained.
- Enhanced existing tests to confirm that plain string variables remain unchanged during persistence, improving the robustness of variable handling in the CLI.

* jsdoc change
2026-06-30 20:36:29 +05:30
sharan-bruno
2f0f2e1c79 feat(import): set yml as a default file format across all types of imports (#8363)
* feat(import): set yml as a default file formal accross all type of imports

* addressed review comments

* addressed review comments

* set DEFAULT_COLLECTION_FORMAT as the default for collection format options
2026-06-30 19:07:09 +05:30
prateek-bruno
bb21d4c1c9 fix: strip snapshot key for v4-migration tab (#8354) 2026-06-30 19:04:58 +05:30