Skip to content

Revert "feat: ws multi message" - #7921

Merged
bijin-bruno merged 1 commit into
mainfrom
revert-7719-feat/ws-multi-message
May 6, 2026
Merged

bijin-bruno merged 1 commit into
mainfrom
revert-7719-feat/ws-multi-message

Conversation

@sid-bruno

@sid-bruno sid-bruno commented May 6, 2026 •

Copy link
Copy Markdown
Collaborator

Reverts #7719

Summary by CodeRabbit

  • Refactor
    • WebSocket request handling has been streamlined and simplified. Multi-message management features have been removed, including batch message operations and related UI controls. Message editing, formatting, and addition workflows have been refined. The overall experience now focuses on a simplified, single-message-oriented workflow with updated controls.

Copilot AI review requested due to automatic review settings May 6, 2026 05:12
@coderabbitai

coderabbitai Bot commented May 6, 2026 •

Copy link
Copy Markdown
Contributor

Walkthrough

This PR refactors WebSocket request handling from a multi-message, selected-message paradigm to a single-message, simpler flow. UI components, state management, serialization, and network queueing are updated to remove the selected flag, eliminate per-message expansion controls, and queue all messages by default rather than a single selected message.

Changes

WebSocket Request UI and Message Handling Simplification

Layer / File(s) Summary
UI Component API & Layout
packages/bruno-app/src/components/RequestPane/WSRequestPane/index.js, packages/bruno-app/src/components/RequestPane/WsBody/index.js
WSRequestPane imports simplified; selectTab callback replaces inline message/prettify logic; WsBody signature drops onAddMessage prop; internal addNewMessage appends messages; rendering constrained to single visible message by default.
Message Component Refactor
packages/bruno-app/src/components/RequestPane/WsBody/SingleWSMessage/index.js, packages/bruno-app/src/components/RequestPane/WsBody/SingleWSMessage/StyledWrapper.js, packages/bruno-app/src/components/RequestPane/WsBody/StyledWrapper.js
New TYPE_BY_DECODER and DECODER_BY_TYPE mappings introduced; SingleWSMessage API redesigned with methodType, handleRun, canClientSendMultipleMessages, isLast; removed isExpanded, onToggle, UI toggle state; internal messageFormat state replaces external prop control; prettify button added; CSS layout switched to flex-based columns with .single / .multi modes and fixed header sizing.
Redux State & Request Handling
packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js, packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js
sendRequest WS branch simplified to omit selectedMessageIndex calculation; newWsRequest payload removes uid field from messages; REQUEST_UID_PATHS no longer preserves UIDs for body.ws.
Network & IPC Layer
packages/bruno-app/src/utils/network/index.js, packages/bruno-electron/src/ipc/network/ws-event-handlers.js
sendWsRequest signature drops selectedMessageIndex; now queues all messages via queueWsMessage(messageContent: null). queueWsMessage signature replaces selectedMessageIndex with messageContent parameter; IPC handler locates message by content or queues all when content is null.
Serialization & Schema
packages/bruno-app/src/utils/collections/index.js, packages/bruno-converters/src/opencollection/items/websocket.ts, packages/bruno-filestore/src/formats/yml/items/parseWebsocketRequest.ts, packages/bruno-filestore/src/formats/yml/items/stringifyWebsocketRequest.ts, packages/bruno-lang/v2/src/bruToJson.js, packages/bruno-lang/v2/src/jsonToBru.js, packages/bruno-schema-types/src/requests/websocket.ts
selected property removed from all message serialization paths (BRU, YAML, JSON converters, schema types); file storage and filesystem write paths omit selected flag; single-message handling with TODO comments for future multi-message support in YAML serializers; WebSocketMessage interface removes selected?: boolean \| null.
Electron Collection Hydration
packages/bruno-electron/src/utils/collection.js
UID assignment block for WebSocket messages removed from hydrateRequestWithUuid.
Tests & Fixtures
packages/bruno-lang/v2/tests/bruToJson.spec.js, tests/websockets/multi-message-bru/*, tests/websockets/multi-message-yml/*
Multi-message BRU and YAML test suites deleted; new BRU-to-JSON tests added for selected message semantics verification; multi-line value parsing tests expanded; test fixture files and preferences emptied/removed.

Sequence Diagram

sequenceDiagram
    participant UI as WsBody UI
    participant State as Redux Store
    participant Queue as Network Queue
    participant IPC as Electron IPC
    participant WS as WebSocket Client

    UI->>UI: Render single message (first in array)
    UI->>UI: User edits content + selects format
    UI->>State: dispatch updateRequestBody<br/>(all messages, no selection)
    State->>State: Store all messages (no selected flag)
    UI->>State: User clicks Run
    State->>Queue: Call queueWsMessage<br/>(messageContent: null)
    Note over Queue: Locate message by content<br/>or queue all if null
    Queue->>IPC: Send queue-message IPC<br/>(messageContent)
    IPC->>WS: Queue interpolated message<br/>from body.ws array
    WS->>WS: Send all queued messages
Loading

Estimated Code Review Effort

🎯 4 (Complex) | ⏱️ ~45 minutes

The PR spans heterogeneous changes across UI components, Redux state management, multiple serialization formats (BRU, YAML, JSON, OpenCollection), schema types, network/IPC layers, and test cleanup. While many changes are repetitive removal of the selected flag, the control-flow refactor from selected-message to all-message paradigm requires understanding the intent across each layer. Significant file count and variety demand careful verification of consistency.

Possibly Related PRs

  • usebruno/bruno#7719: Implements the opposing multi-message UI expansion state, UIDs, and selection tracking that this PR removes; affects overlapping components (WsBody, SingleWSMessage, serializers, network queue).
  • usebruno/bruno#6650: Related refactor of WSRequestPane to adopt ResponsiveTabs-driven UI and right-side content layout that this PR extends.

Suggested Labels

size/XXL

Suggested Reviewers

  • helloanoop
  • lohit-bruno
  • naman-bruno
  • bijin-bruno

Poem

📨 One message, neat and clean,
No selection clutter in between,
Flex layouts dance, UIDs take flight,
All messages queued—simplicity's might! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately describes the main change: reverting a previous WebSocket multi-message feature commit.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert-7719-feat/ws-multi-message

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown

CLI Test Results

  1 files  ±0  211 suites  ±0   1m 3s ⏱️ -10s
594 tests ±0  594 ✅ ±0  0 💤 ±0  0 ❌ ±0 
707 runs  ±0  700 ✅ ±0  7 💤 ±0  0 ❌ ±0 

Results for commit 8258552. ± Comparison against base commit ba42c22.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reverts the previously introduced “WebSocket multi-message” feature (#7719), removing multi-message support and related UI/schema/format handling so the app returns to a single-message WebSocket workflow.

Changes:

  • Removes Playwright test suites and fixtures that validated WebSocket multi-message behavior (BRU and YML).
  • Drops the selected flag from WebSocket message schema and all associated parsing/serialization logic across BRU/YML/OpenCollection converters.
  • Simplifies the WebSocket request UI to a single message editor and updates send/queue plumbing accordingly.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/websockets/multi-message-yml/multi-message.spec.ts Removes YML-based multi-message WebSocket E2E coverage.
tests/websockets/multi-message-yml/init-user-data/preferences.json Removes user-data setup used by the deleted YML E2E tests.
tests/websockets/multi-message-yml/fixtures/collection/ws-single-msg.yml Removes YML fixture used for WebSocket single/migration scenarios in deleted tests.
tests/websockets/multi-message-yml/fixtures/collection/ws-multi-msg.yml Removes YML fixture used for multi-message scenarios in deleted tests.
tests/websockets/multi-message-yml/fixtures/collection/opencollection.yml Removes OpenCollection metadata fixture for deleted YML test collection.
tests/websockets/multi-message-bru/multi-message.spec.ts Removes BRU-based multi-message WebSocket E2E coverage.
tests/websockets/multi-message-bru/init-user-data/preferences.json Removes user-data setup used by the deleted BRU E2E tests.
tests/websockets/multi-message-bru/fixtures/collection/ws-single-msg.bru Removes BRU fixture used by deleted multi-message tests.
tests/websockets/multi-message-bru/fixtures/collection/ws-multi-msg.bru Removes BRU multi-message fixture used by deleted tests.
tests/websockets/multi-message-bru/fixtures/collection/collection.bru Removes BRU collection fixture used by deleted tests.
tests/websockets/multi-message-bru/fixtures/collection/bruno.json Removes collection metadata fixture used by deleted tests.
packages/bruno-schema-types/src/requests/websocket.ts Removes selected from WebSocketMessage schema type.
packages/bruno-lang/v2/tests/bruToJson.spec.js Updates BRU parser tests to stop asserting selected and adjusts fixtures.
packages/bruno-lang/v2/src/jsonToBru.js Stops emitting selected: true in BRU serialization.
packages/bruno-lang/v2/src/bruToJson.js Stops parsing selected in BRU → JSON conversion for ws bodies.
packages/bruno-filestore/src/formats/yml/items/stringifyWebsocketRequest.ts Reverts YML serialization to single WebSocket message output.
packages/bruno-filestore/src/formats/yml/items/parseWebsocketRequest.ts Reverts YML parsing to single WebSocket message input handling.
packages/bruno-electron/src/utils/collection.js Stops assigning per-message uid for ws messages during hydration.
packages/bruno-electron/src/ipc/network/ws-event-handlers.js Updates IPC handler for ws message queuing (signature + queuing behavior).
packages/bruno-converters/src/opencollection/items/websocket.ts Removes selected mapping when converting WebSocket messages to/from OpenCollection.
packages/bruno-app/src/utils/network/index.js Simplifies sendWsRequest / queueWsMessage API to queue messages without selected-index.
packages/bruno-app/src/utils/collections/index.js Removes selected from ws body persistence transformation and stops refreshing ws message uids.
packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js Stops treating body.ws as requiring uid refresh paths.
packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js Removes selected-message logic when sending WS requests and removes ws message uid on creation.
packages/bruno-app/src/components/RequestPane/WSRequestPane/index.js Removes “Add Message” / “Prettify All” toolbar actions; passes hide props to WsBody.
packages/bruno-app/src/components/RequestPane/WsBody/StyledWrapper.js Adjusts ws body layout (single vs multi container behavior + footer styling).
packages/bruno-app/src/components/RequestPane/WsBody/SingleWSMessage/StyledWrapper.js Replaces accordion layout with a simplified toolbar + editor layout.
packages/bruno-app/src/components/RequestPane/WsBody/SingleWSMessage/index.js Refactors message editor UI/behavior to match single-message approach (format + prettify + delete).
packages/bruno-app/src/components/RequestPane/WsBody/index.js Restricts rendered ws messages to the first message and updates empty-state/add-message behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/bruno-app/src/components/RequestPane/WsBody/SingleWSMessage/index.js (1)

41-59: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Derive messageFormat from the current message's type prop instead of using stale local state.

useState(autoDetectLang(content)) only runs on first mount. Since this component is keyed by index in WsBody, switching to another request with the same index reuses the previous component instance, leaving messageFormat stale and potentially causing the new message to be saved with the wrong editor format.

♻️ Suggested fix
-import React, { useState } from 'react';
+import React from 'react';
@@
-  const [messageFormat, setMessageFormat] = useState(autoDetectLang(content));
+  const messageFormat = TYPE_BY_DECODER[type] ?? autoDetectLang(content);
@@
-  const onUpdateMessageType = (type) => {
-    setMessageFormat(type);
-
+  const onUpdateMessageType = (nextFormat) => {
     const currentMessages = [...(body.ws || [])];
 
     currentMessages[index] = {
       ...currentMessages[index],
-      type: DECODER_BY_TYPE[type]
+      type: DECODER_BY_TYPE[nextFormat]
     };
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/bruno-app/src/components/RequestPane/WsBody/SingleWSMessage/index.js`
around lines 41 - 59, The component currently initializes messageFormat with
useState(autoDetectLang(content)) which becomes stale when the component
instance is reused; instead derive the editor format from the incoming message
props (message.type or content) so it always reflects the current message:
replace the persistent local initialization with a computed value (or
synchronise state via useEffect) that maps message.type through DECODER_BY_TYPE
(or runs autoDetectLang(content) if type is missing), and update
onUpdateMessageType to both dispatch and ensure the derived messageFormat
follows message.type; update references to messageFormat/setMessageFormat,
autoDetectLang, onUpdateMessageType and DECODER_BY_TYPE accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/bruno-app/src/components/RequestPane/WsBody/index.js`:
- Around line 41-58: The guard currently skips empty arrays so requests with
body.ws = [] render no editor or footer; update the conditional in WsBody (where
body.ws and addNewMessage are used) to treat empty arrays as empty state by
changing the check to also test for body.ws.length === 0 (e.g., if (!body?.ws ||
!Array.isArray(body.ws) || body.ws.length === 0) ) and ensure the
footer/add-message UI (and any canClientSendMultipleMessages logic) shows the
"Add Message" control when ws is an empty array so users can create the first
message.

In `@packages/bruno-app/src/utils/network/index.js`:
- Around line 237-238: sendWsRequest currently calls queueWsMessage(item,
collection, environment, runtimeVariables, null) which causes every stored
body.ws entry to be enqueued; since WsBody only exposes the first (visible)
message in single-message mode, change the call so queueWsMessage receives the
visible-message selector instead of null (e.g., pass the visible index or a
single-message flag). Locate sendWsRequest and modify the last argument to
convey "only the visible message" (for example pass 0 or a { single: true } flag
or the visibleIndex obtained from WsBody) so queueWsMessage enqueues only the
displayed payload; ensure queueWsMessage's signature is used consistently and
update any callers if needed.

In `@packages/bruno-filestore/src/formats/yml/items/parseWebsocketRequest.ts`:
- Around line 38-45: The parse is incorrectly assuming websocket.message is a
single WebSocketMessage so array-form messages are dropped; update
parseWebsocketRequest to detect when websocket.message is an array
(Array.isArray(websocket.message)) and normalize it into the
brunoRequest.body.ws array by mapping each entry to { name: '', type: entry.type
|| 'text', content: ensureString(entry.data) } (and for single-message cases
keep the existing branch), ensuring you handle empty/whitespace-only content the
same way as the current trim() check; adjust references to websocket.message,
WebSocketMessage, and brunoRequest.body.ws accordingly.

In `@packages/bruno-filestore/src/formats/yml/items/stringifyWebsocketRequest.ts`:
- Around line 44-59: The code in stringifyWebsocketRequest.ts silently drops
extra brunoRequest.body.ws entries by only taking messages[0]; don't truncate
user data—either preserve all messages or fail explicitly. Update the logic
around brunoRequest.body?.mode === 'ws' / brunoRequest.body.ws to handle
multiple messages: if the target schema supports multiple messages, map each msg
to a WebSocketMessage and assign to a plural field (e.g., websocket.messages)
instead of websocket.message; otherwise, detect messages.length > 1 and throw or
return an explicit migration/error so the caller knows data would be lost
(include the count and details), and remove the misleading todo comment. Ensure
you reference and update the WebSocketMessage mapping (type/data) and the
websocket.message assignment accordingly.

---

Outside diff comments:
In
`@packages/bruno-app/src/components/RequestPane/WsBody/SingleWSMessage/index.js`:
- Around line 41-59: The component currently initializes messageFormat with
useState(autoDetectLang(content)) which becomes stale when the component
instance is reused; instead derive the editor format from the incoming message
props (message.type or content) so it always reflects the current message:
replace the persistent local initialization with a computed value (or
synchronise state via useEffect) that maps message.type through DECODER_BY_TYPE
(or runs autoDetectLang(content) if type is missing), and update
onUpdateMessageType to both dispatch and ensure the derived messageFormat
follows message.type; update references to messageFormat/setMessageFormat,
autoDetectLang, onUpdateMessageType and DECODER_BY_TYPE accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1f1e4881-1dbd-4bdb-b91f-9e5a09be6b7f

📥 Commits

Reviewing files that changed from the base of the PR and between ba42c22 and 8258552.

📒 Files selected for processing (29)
  • packages/bruno-app/src/components/RequestPane/WSRequestPane/index.js
  • packages/bruno-app/src/components/RequestPane/WsBody/SingleWSMessage/StyledWrapper.js
  • packages/bruno-app/src/components/RequestPane/WsBody/SingleWSMessage/index.js
  • packages/bruno-app/src/components/RequestPane/WsBody/StyledWrapper.js
  • packages/bruno-app/src/components/RequestPane/WsBody/index.js
  • packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js
  • packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js
  • packages/bruno-app/src/utils/collections/index.js
  • packages/bruno-app/src/utils/network/index.js
  • packages/bruno-converters/src/opencollection/items/websocket.ts
  • packages/bruno-electron/src/ipc/network/ws-event-handlers.js
  • packages/bruno-electron/src/utils/collection.js
  • packages/bruno-filestore/src/formats/yml/items/parseWebsocketRequest.ts
  • packages/bruno-filestore/src/formats/yml/items/stringifyWebsocketRequest.ts
  • packages/bruno-lang/v2/src/bruToJson.js
  • packages/bruno-lang/v2/src/jsonToBru.js
  • packages/bruno-lang/v2/tests/bruToJson.spec.js
  • packages/bruno-schema-types/src/requests/websocket.ts
  • tests/websockets/multi-message-bru/fixtures/collection/bruno.json
  • tests/websockets/multi-message-bru/fixtures/collection/collection.bru
  • tests/websockets/multi-message-bru/fixtures/collection/ws-multi-msg.bru
  • tests/websockets/multi-message-bru/fixtures/collection/ws-single-msg.bru
  • tests/websockets/multi-message-bru/init-user-data/preferences.json
  • tests/websockets/multi-message-bru/multi-message.spec.ts
  • tests/websockets/multi-message-yml/fixtures/collection/opencollection.yml
  • tests/websockets/multi-message-yml/fixtures/collection/ws-multi-msg.yml
  • tests/websockets/multi-message-yml/fixtures/collection/ws-single-msg.yml
  • tests/websockets/multi-message-yml/init-user-data/preferences.json
  • tests/websockets/multi-message-yml/multi-message.spec.ts
💤 Files with no reviewable changes (13)
  • tests/websockets/multi-message-bru/fixtures/collection/collection.bru
  • packages/bruno-schema-types/src/requests/websocket.ts
  • tests/websockets/multi-message-yml/multi-message.spec.ts
  • tests/websockets/multi-message-yml/fixtures/collection/ws-single-msg.yml
  • tests/websockets/multi-message-bru/multi-message.spec.ts
  • tests/websockets/multi-message-yml/fixtures/collection/opencollection.yml
  • tests/websockets/multi-message-bru/fixtures/collection/ws-single-msg.bru
  • tests/websockets/multi-message-bru/init-user-data/preferences.json
  • tests/websockets/multi-message-bru/fixtures/collection/bruno.json
  • tests/websockets/multi-message-yml/init-user-data/preferences.json
  • packages/bruno-electron/src/utils/collection.js
  • tests/websockets/multi-message-bru/fixtures/collection/ws-multi-msg.bru
  • tests/websockets/multi-message-yml/fixtures/collection/ws-multi-msg.yml

@bijin-bruno
bijin-bruno merged commit 973ca18 into main May 6, 2026
16 checks passed
sharan-bruno pushed a commit to sharan-bruno/bruno that referenced this pull request Jun 4, 2026
sid-bruno added a commit to sid-bruno/bruno that referenced this pull request Aug 21, 2026
* feat: implement proxy-aware API fetching using axios instance (usebruno#7767)

* fix(cli): skip headers with empty name when building request (usebruno#7869)

* Revert "feat: ws multi message (usebruno#7719)" (usebruno#7921)

This reverts commit a305b41.

* fix: remove dragbar z-index that was bleeding through modals (usebruno#7924)

* feat: ui state snapshots (usebruno#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 <[email protected]>

* fix: scrollbar restoration (usebruno#7926)

* fix: restore scrollbar

* chore: remove comments

---------

Co-authored-by: shubh-bruno <[email protected]>

* fix: message in ConnectGitRemote and RemoveGitRemote (usebruno#7929)

* fix: allow empty header names in CLI and gRPC request preparation (usebruno#7925)

* refactor: remove idx from HeaderList, extend ReadOnlyPropertyList, add positional method translations (usebruno#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.

---------

Co-authored-by: Pragadesh-45 <[email protected]>
Co-authored-by: Sid <[email protected]>
Co-authored-by: gopu-bruno <[email protected]>
Co-authored-by: Chirag Chandrashekhar <[email protected]>
Co-authored-by: shubh-bruno <[email protected]>
Co-authored-by: shubh-bruno <[email protected]>
Co-authored-by: naman-bruno <[email protected]>
Co-authored-by: sanish chirayath <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants