Skip to content

Format memory sizes in human-readable units on diagnostics page#16535

Merged
nwmac merged 4 commits intomasterfrom
copilot/update-memory-sizes-display
Feb 3, 2026
Merged

Format memory sizes in human-readable units on diagnostics page#16535
nwmac merged 4 commits intomasterfrom
copilot/update-memory-sizes-display

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 2, 2026

Fixes #16534

Summary

Memory metrics on the diagnostics page (About → Diagnostic) displayed raw byte values making them difficult to parse at a glance.

Occurred changes and/or fixed issues

  • shell/pages/diagnostic.vue: Applied formatSi utility to format jsHeapSizeLimit, totalJSHeapSize, and usedJSHeapSize using binary increment (1024)
  • Extracted memoryFormatOptions config object to eliminate duplication

Before:

Javascript Memory: Heap Size limit: 4294705152, Total Heap Size: 2147483648, Used Heap Size: 1073741824

After:

Javascript Memory: Heap Size limit: 4 GB, Total Heap Size: 2 GB, Used Heap Size: 1 GB

Technical notes summary

  • Uses existing formatSi from shell/utils/units.js with binary (1024-based) increment
  • Format config: { increment: 1024, suffix: 'B', firstSuffix: 'B', maxPrecision: 2 }
  • Added unit test in shell/pages/__tests__/diagnostic.test.ts

Areas or cases that should be tested

  • Navigate to About → Diagnostic
  • Verify Javascript Memory row displays formatted values (e.g., "4 GB" not "4294705152")
  • Test with browsers having varying heap sizes
  • Verify formatting works across different magnitude values (MB, GB)

Areas which could experience regressions

  • Diagnostics download JSON (unchanged - still contains raw values as expected)
  • Other memory displays in the application (unchanged - isolated to diagnostic page)

Screenshot/Video

N/A - Text formatting change only. Example output shown in "Occurred changes" section.

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes
  • The PR has been reviewed in terms of Accessibility
  • The PR has considered, and if applicable tested with, the three Global Roles Admin, Standard User and User Base

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • download.cypress.io
    • Triggering command: /usr/local/bin/node /usr/local/bin/node index.js --exec install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Diagnostics page should present memory sizes in a human format</issue_title>
<issue_description>Internal Reference: SURE-10548

Go to About → Diagnostic.

We should display those memory sizes in a human-friendly way.

Currently just displayed as bytes which is hard to parse.</issue_description>

<agent_instructions>Instead of showing raw byte count, we should show size in GB, MB, KB as appropriate.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits February 2, 2026 09:29
Co-authored-by: nwmac <1955897+nwmac@users.noreply.github.com>
Co-authored-by: nwmac <1955897+nwmac@users.noreply.github.com>
Co-authored-by: nwmac <1955897+nwmac@users.noreply.github.com>
Copilot AI changed the title [WIP] Update diagnostics page to present memory sizes in human format Format memory sizes in human-readable units on diagnostics page Feb 2, 2026
Copilot AI requested a review from nwmac February 2, 2026 09:42
@nwmac nwmac marked this pull request as ready for review February 2, 2026 15:16
Copy link
Copy Markdown
Member

@nwmac nwmac left a comment

Choose a reason for hiding this comment

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

LGTM. Checkout out locally and looks good.

@nwmac nwmac added this to the v2.14.0 milestone Feb 2, 2026
@nwmac nwmac requested a review from aalves08 February 2, 2026 17:33
Copy link
Copy Markdown
Member

@aalves08 aalves08 left a comment

Choose a reason for hiding this comment

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

LGTM

@nwmac nwmac merged commit a3dfeac into master Feb 3, 2026
37 of 51 checks passed
@nwmac nwmac deleted the copilot/update-memory-sizes-display branch February 3, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Diagnostics page should present memory sizes in a human format

3 participants