* 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>
* feat(snapshot): implement active workspace tab type tracking and restoration
* feat(snapshot): introduce workspace tab types and update related logic
* 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>
* 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>
* 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>
* 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.
* 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>
* 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
* 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
* 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