HTTP stream enhancements#6077
HTTP stream enhancements#6077sid-bruno merged 34 commits intousebruno:feature/http-stream-internalfrom
Conversation
…ormat_library fix: handle `escaped forward slashes` by `fast-json-format` library upgrade
…eadme docs: add farsi translation
…tting fix: update json request and response formatting logic
…-button-in-api-url-bar feat: add stop request button in api url bar
…rt-fails-for-custom-content-types bugfix(usebruno#5939): curl import fails for custom content-types
…fter streaming result
There was a problem hiding this comment.
Pull Request Overview
This pull request adds HTTP streaming support to Bruno, enabling real-time handling of Server-Sent Events (SSE) and other streaming HTTP responses. The implementation includes stream detection, data buffering, UI components for displaying streaming status and data, and proper lifecycle management for streaming connections.
- Stream detection via
text/event-streamcontent-type header and conditional response handling - Real-time stream data display with hexdump visualization and connection lifecycle tracking
- UI enhancements including a stopwatch timer for active streams and visual streaming indicators
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/bruno-electron/src/ipc/network/index.js | Core streaming logic: adds stream detection, promisification helper, response type handling, deferred post-script execution for streams, and collection runner stream support |
| packages/bruno-app/src/utils/network/index.js | Propagates stream information from backend to frontend response objects |
| packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js | Stream state management: handles stream data reception, cancellation with duration calculation, and prevents response clearing for active streams |
| packages/bruno-app/src/providers/App/useIpcEvents.js | Registers IPC event listeners for stream data updates and stream end events |
| packages/bruno-app/src/components/ResponsePane/index.js | Conditionally renders stream message list for streaming responses and adds stopwatch component |
| packages/bruno-app/src/components/ResponsePane/WsResponsePane/WSMessagesList/index.js | Adds proper key prop using timestamp to prevent React warnings |
| packages/bruno-app/src/components/ResponsePane/StatusCode/index.js | Displays "STREAMING" indicator for active stream responses |
| packages/bruno-app/src/components/ResponsePane/ResponseStopWatch/index.js | New component providing real-time duration display for active streams |
| packages/bruno-app/src/components/ResponsePane/ResponseStopWatch/StyledWrapper.js | Styled wrapper for stopwatch component |
| packages/bruno-app/src/components/ResponsePane/ResponseBookmark/index.js | Disables bookmark functionality for streaming responses |
| packages/bruno-app/src/components/RequestTabPanel/index.js | Enables request cancellation when stream is active |
| packages/bruno-app/src/components/RequestPane/QueryUrl/index.js | Shows cancel button for active streams |
| packages/bruno-app/package.json | Adds hexy dependency for hexdump visualization |
| package-lock.json | Lock file update for hexy dependency |
Comments suppressed due to low confidence (4)
packages/bruno-app/src/components/ResponsePane/ResponseBookmark/index.js:16
- Operands !isStreamingResponse and !isStreamingResponse are identical.
if (!isStreamingResponse && !isStreamingResponse) {
packages/bruno-app/src/components/RequestPane/QueryUrl/index.js:8
- Unused import IconX.
import { IconDeviceFloppy, IconArrowRight, IconCode, IconX, IconSquareRoundedX } from '@tabler/icons';
packages/bruno-app/src/components/ResponsePane/ResponseBookmark/index.js:16
- This negation always evaluates to true.
if (!isStreamingResponse && !isStreamingResponse) {
packages/bruno-app/src/components/ResponsePane/ResponseBookmark/index.js:19
- This use of variable 'isStreamingResponse' always evaluates to true.
if (isStreamingResponse) {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/bruno-app/src/components/ResponsePane/ResponseBookmark/index.js
Outdated
Show resolved
Hide resolved
packages/bruno-app/src/components/ResponsePane/ResponseBookmark/index.js
Outdated
Show resolved
Hide resolved
packages/bruno-app/src/components/ResponsePane/ResponseStopWatch/index.js
Outdated
Show resolved
Hide resolved
packages/bruno-app/src/components/RequestPane/QueryUrl/index.js
Outdated
Show resolved
Hide resolved
- Cleaned up formatting and improved readability of the post-response script execution logic. - Consolidated parameters in function calls for consistency.
efad149
into
usebruno:feature/http-stream-internal
Description
Extends the orginal PR with any needed improvements
Contribution Checklist:
Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.
Publishing to New Package Managers
Please see here for more information.