* feat: add response data type selector in response viewer
* chore: fixed lint issue
* test: add test for resonse format change and preview.
* refactor: streamline response format tests with utility functions for navigation and format switching
* refactor: simplify ButtonDropdown component and enhance QueryResultTypeSelector with header and toggle switch
* feat: enhance ButtonDropdown with prefix and suffix props; implement content type detection and update QueryResult for improved format handling
* fix: lint errors resolved
* fix: remove unnecessary blank line to resolve lint issues
* fix: update response format tests
* refactor: remove preview tab locator from response format tests
* fix: update dependency in useEffect to include previewFormatOptions for accurate format handling
* refactor: reorganize imports and enhance QueryResult component for improved format handling and error display
* fix: update error messages in response format preview tests and adjust version in JSON fixture
* feat: add drag detection to HtmlPreview component and update structure for improved user interaction
* refactor: update ResponsePane components for improved structure and functionality;
replace QueryResult with QueryResponse, enhance layout handling, and streamline response actions
* refactor: remove ButtonDropdown component and associated styles;
* refactor: moved ErrorAlert to ui folder
* fix: lint error
* feat: add data-testid attributes to Collection and CollectionItem components for improved testability
* feat: hide dropdown on select in response selector
* fix: update QueryResult component to use detectedContentType for format handling
* test: update ResponseLayoutToggle tests to use data-testid for button selection
* feat: add data-testid attribute to ResponseClear component for improved testability
* refactor: implement clickResponseAction utility for streamlined response action handling in tests
* feat: add data-testid attribute to ResponseCopy component for enhanced testability
* fix: unwanted code in test
* feat: add dropdown for quick request creation in tab bar
- Create reusable CreateUntitledRequest component with customizable trigger
- Add generateUniqueRequestName utility for unique request naming
- Replace modal-based request creation with dropdown in tab bar
- Support HTTP, GraphQL, WebSocket, and gRPC request types
- Generate unique names (Untitled, Untitled1, etc.) automatically
- Create requests at collection root level
* Update request creation and collection components
* Fix dropdown positioning and styling when appended to document.body
- Change appendTo from 'parent' to document.body for absolute positioning
- Add comprehensive styling via onShow handler to ensure proper width, padding, text color, and opacity
- Add global styles as fallback for dropdown elements
- Ensure dropdown overlaps parent without expanding it
* Update RequestTabs and Collection components
* Add curl paste detection and parsing for HTTP requests
* Fix generateUniqueRequestName to check filesystem for existing files
* feat: add placeholder text to HTTP request URL input
Add helpful placeholder text 'Enter URL or paste a cURL request' to the HTTP request URL input field. This guides users on how to use the input field, indicating they can either enter a URL directly or paste a cURL command which will be automatically parsed.
* Simplify request creation in collection menu
* fix: fixed issues with cURL paste for GraphQL requests in the URL input bar
* fix: added icons to create request dropdown
* fix: fixed the icon | text gap in dropdown
* fix: removed unnecessary updates on the Dropdown Component
* added onCreate to Dropdown to remove unwanted diffs
* fix: simplified the generateUniqueRequestName function. ai writes complex code
* chore: formatting and removed unnecessary diffs
* Update packages/bruno-app/src/components/RequestPane/QueryUrl/index.js
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* chore: format
* Fix failing E2E tests by updating to new request creation flow
- Replace #create-new-tab selector with new dropdown flow using createUntitledRequest helper
- Update generateUniqueRequestName to handle .bru, .yml, and .yaml file extensions
- Add createUntitledRequest helper function with optional URL and tag parameters
- Update all failing tests to use the new helper function
- Fix selectors from .collection-item-name to .item-name where needed
- All 13 previously failing tests now pass
* chore: removed unused import
---------
Co-authored-by: Sid <siddharth@usebruno.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* refactor: update AppTitleBar and SidebarHeader components to use MenuDropdown and ActionIcon for improved UI consistency
* refactor: update button locators in tests to use data-testid for consistency and improved readability
* refactor: update sidebar components and styles, replace TitleBar with SidebarHeader, and enhance collections search functionality
* refactor: improve event listener management in AppTitleBar and clean up SidebarHeader styles
* fix: ensure safe access to layout preferences in AppTitleBar and set default order in SidebarHeader
* refactor: centralize toTitleCase utility and remove redundant implementations in AppTitleBar and WorkspaceSelector
* feat: enhance accessibility and testing for sidebar and devtools toggle buttons in AppTitleBar
* chore: quick fix on a flaky test
---------
Co-authored-by: Bijin A B <bijin@usebruno.com>
* Partial Revert "remove: presets and response var (#6195)"
This reverts commit 786a3414b8 while keeping code related to presets deleted
* revert: remove global environment variables assignment
* feat: add variable interpolation support for WebSocket requests
- Add WebSocket body interpolation in interpolateVars function
- Interpolate URL, headers, and all messages in request.body.ws array with full variable context
- Refactor sendWsRequest to use main process preparation (removes duplication)
- Add mode property to wsRequest object for proper request type detection
- Ensure consistent variable precedence matching HTTP/gRPC requests
- Centralize all interpolation logic in main process via prepareWsRequest
* Add Playwright tests for WebSocket variable interpolation
- Add tests for URL interpolation (wss://echo.{{url}}.org)
- Add tests for message content interpolation ({"test": "{{data}}"})
- Update test fixtures to use wss://echo.websocket.org echo server
- Add WEBSOCKET_FLOWS.md documentation
- Refactor queueWsMessage to handle variable interpolation in main process
* removed ws flow documentation
* chore: updated the network/index.js file to reduce merge conflicts by moving around code
* fix: added collection and item to WsQueryUrl Editor to fix available variable highlight
* chore: remove unnecessary whitespace in WebSocket event handlers
* feat: add automatic WebSocket reconnection on URL variable changes
- Detect changes to interpolated URL (including variable changes)
- Automatically disconnect and reconnect when interpolated URL changes
- Add debouncing (400ms) to prevent excessive reconnections
- Track previous interpolated URL to avoid unnecessary reconnects
- Store interpolated URL when connection becomes active
- Improve error handling and cleanup
* chore: removing diff
* Add WebSocket connection status IPC method
- Add connectionStatus() method to WsClient that returns detailed status
('disconnected', 'connecting', 'connected') instead of boolean
- Add renderer:ws:connection-status IPC handler in electron layer
- Add getWsConnectionStatus() utility function in network utils
- Provides more granular connection state information for UI components
* refactor: improve WebSocket connection status tracking in WsQueryUrl
- Replace boolean isConnectionActive with connectionStatus state ('disconnected', 'connecting', 'connected')
- Add useWsConnectionStatus hook to poll connection status every 2 seconds
- Refactor connection handlers: handleConnect, handleDisconnect, handleReconnect
- Update to use getWsConnectionStatus instead of isWsConnectionActive for more granular status
- Improve reconnect logic to handle URL variable interpolation changes
- Add proper connection status indicators in UI (connecting state with pulse animation)
* fix: improve WebSocket URL handling and request initialization
- Fix WebSocket URL state management by reading directly from item instead of local state
- Add handleUrlChange function to properly dispatch URL changes
- Fix interpolated URL change detection logic in useEffect
- Initialize params array for new WebSocket requests to prevent undefined errors
- Ensure params array is initialized when URL changes in draft/request
- Remove console.log statements and unused imports
- Update persistence test replacement URL to avoid port conflicts
These changes ensure WebSocket requests properly handle URL changes and
maintain consistent state between draft and saved requests.
* feat: refactor WebSocket connection status handling
---------
Co-authored-by: Sid <siddharth@usebruno.com>
* feat: support newlines in headers, params, and variables
* add: collectin unit test
* fix: assertion and additional header multiline
* fix: assert
* rm: useEffect for header validation
* rm: comments
* fix: already encoded url
* rm: new line changes
* handle new line in url
* fix: lint error
* add: unit test for multi line test
* change: unit test
* mv: functions in util
* fix: drag icon position
* improve: arrow height
* improvements
* rm: getKeyString from assert
* fix: single line editor
* fix: import MultiLineEditor
* import getKeyString and getValueUrl
* add: getTableCell in utils
* rm: multiline key logic
* fix
* mv: getTableCell in locators.ts
* feat: add variable interpolation support for WebSocket requests
- Add WebSocket body interpolation in interpolateVars function
- Interpolate URL, headers, and all messages in request.body.ws array with full variable context
- Refactor sendWsRequest to use main process preparation (removes duplication)
- Add mode property to wsRequest object for proper request type detection
- Ensure consistent variable precedence matching HTTP/gRPC requests
- Centralize all interpolation logic in main process via prepareWsRequest
* Add Playwright tests for WebSocket variable interpolation
- Add tests for URL interpolation (wss://echo.{{url}}.org)
- Add tests for message content interpolation ({"test": "{{data}}"})
- Update test fixtures to use wss://echo.websocket.org echo server
- Add WEBSOCKET_FLOWS.md documentation
- Refactor queueWsMessage to handle variable interpolation in main process
* removed ws flow documentation
* chore: updated the network/index.js file to reduce merge conflicts by moving around code
* fix: added collection and item to WsQueryUrl Editor to fix available variable highlight
* chore: remove unnecessary whitespace in WebSocket event handlers
---------
Co-authored-by: Sid <siddharth@usebruno.com>
* fix: standardize URL formatting in insomnia test files
* feat: add mix router for handling custom redirects and cookies
* fix: add validation for redirect count to prevent infinite loops
* fix: update test URLs to use local server and add query parameters for improved testing