Skip to content

fix(utilization): hide usage when array is stopped - #2735

Open
Eli Bosley (elibosley) wants to merge 1 commit into
7.3from
fix/stopped-array-utilization-7-3
Open

fix(utilization): hide usage when array is stopped#2735
Eli Bosley (elibosley) wants to merge 1 commit into
7.3from
fix/stopped-array-utilization-7-3

Conversation

@elibosley

@elibosley Eli Bosley (elibosley) commented Aug 24, 2026

Copy link
Copy Markdown
Member

Summary

This backport prevents stopped arrays from reporting 100% utilization by hiding usage percentages until the array is started.

Why This Exists

When the array stops, filesystem size can remain available while free-space metrics are absent. The existing fallback converts the missing value to zero, which makes the used-space formula render 100%. This appears in the navigation usage bar and pool filesystem rows.

Resolution

Require the array state to be Started before rendering utilization. Stopped arrays now show offline or filesystem status text, while started arrays keep the current usage display.

Reviewer Considerations

  • This is the 7.3 backport of PR fix(utilization): hide usage when array is stopped #2734.
  • The guard is intentionally state-based because stopped-array metrics are incomplete even when a boot or pool filesystem remains mounted.
  • This change does not alter filesystem metrics or started-array calculations.

Behavior Changes

Stopped arrays no longer show a usage percentage in the navigation bar or filesystem rows. Started arrays behave as before.

Implementation Summary

  • Gate the navigation usage bar on fsState=Started.
  • Gate filesystem usage bars on fsState=Started.
  • Add a regression test for stopped and started rendering behavior.

Verification

  • php tests/stopped-array-utilization.php
  • php -l emhttp/plugins/dynamix/include/Helpers.php
  • php -l emhttp/plugins/dynamix/nchan/device_list
  • php -l tests/stopped-array-utilization.php
  • git diff --check

Risk

Low; the change only suppresses usage rendering while the array is stopped and preserves the existing status output.

Linear

Related to OS-803: https://linear.app/lime-technology/issue/OS-803/733-stopped-array-shows-100percent-utilization

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

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

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: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ab0df2c2-392c-46f5-a79f-ae95e56de924

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.

@github-actions

Copy link
Copy Markdown

🔧 PR Test Plugin Available

A test plugin has been generated for this PR that includes the modified files.

Version: 2026.08.24.1702
Build: View Workflow Run

📥 Installation Instructions:

Install via Unraid Web UI:

  1. Go to Plugins → Install Plugin
  2. Copy and paste this URL:
https://preview.dl.unraid.net/pr-plugins/pr-2735/webgui-pr-2735.plg
  1. Click Install

Alternative: Direct Download

⚠️ Important Notes:

  • Testing only: This plugin is for testing PR changes
  • Backup included: Original files are automatically backed up
  • Easy removal: Files are restored when plugin is removed
  • Conflicts: Remove this plugin before installing production updates
  • Post-merge behavior: This preview stays available after merge until preview storage expires or it is manually cleaned up

📝 Modified Files:

Click to expand file list
emhttp/plugins/dynamix/include/Helpers.php
emhttp/plugins/dynamix/nchan/device_list

🔄 To Remove:

Navigate to Plugins → Installed Plugins and remove webgui-pr-2735, or run:

plugin remove webgui-pr-2735

🤖 This comment is automatically generated and will be updated with each new push to this PR.

@elibosley
Eli Bosley (elibosley) marked this pull request as ready for review August 24, 2026 17:32
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.

1 participant