Skip to content

feat(overview): show human-readable size for unloaded requests - #8580

Merged
bijin-bruno merged 1 commit into
usebruno:mainfrom
chirag-bruno:fix/non-loaded-files-size-display
Jul 13, 2026
Merged

bijin-bruno merged 1 commit into
usebruno:mainfrom
chirag-bruno:fix/non-loaded-files-size-display

Conversation

@chirag-bruno

@chirag-bruno chirag-bruno commented Jul 13, 2026 •

Copy link
Copy Markdown
Collaborator

Description

In the Collection Overview's "Requests not loaded" table, file sizes were always rendered in MB (e.g. 0.00 MB for small files, unreadable for large ones). This formats the size into the most appropriate unit.

Changes

  • Add getSizeAndUnit which converts the request's size (stored in MB) to KB, MB, or GB based on magnitude, rounded to 2 decimals.
  • Render ${size} ${unit} in the Size column.

Behavior

  • < 1 MB → KB
  • 1 MB – 1 GB → MB
  • ≥ 1 GB → GB

Summary by CodeRabbit

  • Bug Fixes
    • Improved display of failed request sizes in Collection Settings.
    • Sizes are now shown in appropriate units (KB, MB, or GB) with clearer rounding.
    • Missing size values now display as 0 instead of an empty placeholder.

Format the size of requests that failed to load as KB/MB/GB instead of
always rendering MB.
@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

An error occurred during the review process. Please try again later.

Walkthrough

The failed-request overview now converts sizes into rounded KB, MB, or GB values and renders missing sizes as zero using the new formatting helper.

Changes

Failed-request size formatting

Layer / File(s) Summary
Adaptive size formatting
packages/bruno-app/src/components/CollectionSettings/Overview/RequestsNotLoaded/index.js
Adds a memoized size conversion helper and uses it to render failed-request sizes with dynamic units, defaulting missing values to zero.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

Sizes shift and units glide,
KB and MB stand side by side.
Gigabytes join the flow,
Missing numbers start at zero.
A tidy table, row by row.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@bijin-bruno
bijin-bruno merged commit 0adaca3 into usebruno:main Jul 13, 2026
9 of 16 checks passed

@bijin-bruno bijin-bruno left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@chirag-bruno Tests required

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.

4 participants