Repository navigation
feat(ws): improve message panel UX #8465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
sid-bruno
merged 5 commits into
usebruno:main
from
pooja-bruno:feat/websocket-message-panel-enhancements
Jul 6, 2026
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
da96aa4
feat(ws): improve message panel UX
pooja-bruno 90cb493
Merge branch 'main' into feat/websocket-message-panel-enhancements
pooja-bruno d2b8b9f
Merge branch 'main' into feat/websocket-message-panel-enhancements
pooja-bruno 74ac313
add: ws active message color
pooja-bruno 7e02ba2
Merge branch 'main' into feat/websocket-message-panel-enhancements
pooja-bruno File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
tests/websockets/fixtures/collection/ws-default-body-request.bru
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| meta { | ||
| name: ws-default-body-request | ||
| type: ws | ||
| seq: 4 | ||
| } | ||
|
|
||
| ws { | ||
| url: ws://localhost:8081/ws | ||
| auth: inherit | ||
| } | ||
|
|
||
| body:ws { | ||
| name: message 1 | ||
| content: ''' | ||
| { | ||
| "foo":"bar" | ||
| } | ||
| ''' | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import { expect, test } from '../../playwright'; | ||
| import { closeAllCollections } from '../utils/page/actions'; | ||
|
|
||
| const REQ_NAME = /^ws-default-body-request$/; | ||
|
|
||
| test.describe('websocket message default body', () => { | ||
| test.afterAll(async ({ pageWithUserData: page }) => { | ||
| await closeAllCollections(page); | ||
| }); | ||
|
|
||
| test('a newly added message defaults to an empty body showing the placeholder', async ({ | ||
| pageWithUserData: page | ||
| }) => { | ||
| // Open the preloaded websocket request | ||
| await page.getByTestId('sidebar-collection-row').click(); | ||
| await page.getByTitle(REQ_NAME).click(); | ||
|
|
||
| const headers = page.getByTestId(/^ws-message-header-/); | ||
| const beforeCount = await headers.count(); | ||
|
|
||
| await page.getByTestId('ws-add-message').click(); | ||
| await expect(headers).toHaveCount(beforeCount + 1); | ||
|
|
||
| // The newly added message is the last one and auto-expands. | ||
| const newBody = page.getByTestId(`ws-message-body-${beforeCount}`); | ||
| await expect(newBody).toBeVisible(); | ||
|
|
||
| const editor = newBody.locator('.CodeMirror'); | ||
| // Body should be empty (previously defaulted to '{}'); the editor should | ||
| // surface the '...' placeholder instead of any '{}' content. | ||
| await expect(editor.locator('.CodeMirror-placeholder')).toHaveText('...'); | ||
| await expect(editor.locator('.CodeMirror-code')).not.toContainText('{}'); | ||
| }); | ||
| }); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.