Skip to content

fix(response): elapsed time resets issue while streaming - #8989

Merged
vijayh-bruno merged 8 commits into
usebruno:bugfix/streaming-elapsed-time-internalfrom
sharan-bruno:fix/elapsed-time-resets-issue-while-streaming
Aug 26, 2026
Merged

vijayh-bruno merged 8 commits into
usebruno:bugfix/streaming-elapsed-time-internalfrom
sharan-bruno:fix/elapsed-time-resets-issue-while-streaming

Conversation

@sharan-bruno

@sharan-bruno sharan-bruno commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

BRU-4095

Description

Fixes an issue where the elapsed-time counter reset to zero when navigating away from and then back to an active streaming request

Problem

Previously, we relied on response.duration, which only reflects the actual duration after the request or stream finishes. While streaming, it still contains the previous value. On top of that, the stopwatch tracked elapsed time in component state, so navigating between tabs unmounted the response pane and caused the counter to reset.

Fix

Now, we calculate elapsed time from item.requestSent.timestamp and the current time. This makes the counter derived from the actual request start time, so it stays accurate even after the component remounts. Future timestamps are also clamped to zero to prevent negative elapsed times.

Screenshots

Before After
Screen.Recording.2026-08-14.at.4.37.08.PM.mov
Screen.Recording.2026-08-14.at.4.47.54.PM.mov

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.
  • I've run the claude code review skill locally.

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.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • main
  • release/*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4bd3d2ec-09e2-4e68-bd0e-410b0f58c208

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@sharan-bruno sharan-bruno changed the title Fix/elapsed time resets issue while streaming fix(response) - elapsed time resets issue while streaming Aug 17, 2026
@sharan-bruno sharan-bruno changed the title fix(response) - elapsed time resets issue while streaming fix(response) elapsed time resets issue while streaming Aug 17, 2026
@sharan-bruno sharan-bruno changed the title fix(response) elapsed time resets issue while streaming fix(response): elapsed time resets issue while streaming Aug 17, 2026
@vijayh-bruno
vijayh-bruno merged commit 887806b into usebruno:bugfix/streaming-elapsed-time-internal Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants