Skip to content

fix(windows): isolate status output and correct disk I/O - #1488

Merged
GT-610 merged 2 commits into
mainfrom
fix/windows-status-output-and-disk-io
Sep 14, 2026
Merged

GT-610 merged 2 commits into
mainfrom
fix/windows-status-output-and-disk-io

Conversation

@GT-610

@GT-610 GT-610 commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • parse only stdout from SSH status commands so PowerShell CLIXML on stderr cannot corrupt status fields
  • collect cumulative Windows logical-disk counters keyed by drive letter
  • compute disk throughput exactly once between app refreshes
  • aggregate disk devices according to the remote platform
  • render the initial no-baseline disk rate as --

Testing

  • cargo test -p sbm_parser
  • cargo test -p sbm_native
  • cargo clippy -p sbm_parser -p sbm_native --all-targets -- -D warnings
  • flutter test --no-pub test/disk_test.dart test/windows_test.dart test/script_version_test.dart
  • flutter analyze --no-pub lib test
  • manually reproduced Windows PowerShell 5.1 CLIXML separation and verified logical-disk WMI keys locally

Closes #1478

Summary by CodeRabbit

  • Bug Fixes

    • Improved Windows disk I/O monitoring by using logical drives and consistent cumulative counters.
    • Corrected disk aggregation across Windows, Linux, and BSD systems, including filtering of irrelevant devices.
    • Prevented PowerShell diagnostic output from interfering with Windows status updates.
    • Disk speed now displays -- when read or write data is unavailable.
  • Compatibility

    • Improved compatibility between native and script-based disk I/O monitoring across platforms.

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Essentials

Run ID: dba60c73-c4fa-4748-8aff-e21d51f228ee

📥 Commits

Reviewing files that changed from the base of the PR and between 11b1c64 and 15c5dde.

📒 Files selected for processing (14)
  • crates/sbm_native/src/sysinfo_backend.rs
  • crates/sbm_parser/src/commands.rs
  • crates/sbm_parser/src/types.rs
  • crates/sbm_parser/src/windows.rs
  • crates/sbm_parser/tests/dart_compat.rs
  • crates/sbm_parser/tests/script_compat.rs
  • lib/data/model/app/scripts/script_consts.dart
  • lib/data/model/server/disk.dart
  • lib/data/model/server/monitor_metrics_mapper.dart
  • lib/data/model/server/server_status_update_req.dart
  • lib/data/provider/server/single.dart
  • lib/view/page/server/tab/content.dart
  • monitor/CLAUDE.md
  • test/disk_test.dart

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Windows disk I/O now uses one cumulative logical-disk sample. The parser filters logical drives, converts byte counters to 512-byte sectors, normalizes drive names, and rejects invalid values. Dart disk aggregation now receives the active system and applies Linux-only device filtering. Windows status execution suppresses stderr. Tests, script versioning, display fallback, and cross-platform documentation were updated.

Suggested reviewers: lollipopkit

Priority: ➖ Normal

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 15c5d

The Windows disk I/O and status-output changes are ready to merge; no current behavior issue requiring correction was identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: isolating Windows status output and correcting Windows disk I/O handling.
Linked Issues check ✅ Passed Issue #1478 has no textual coding acceptance criteria beyond incorrect Windows display output. The PR fixes Windows status parsing by suppressing stderr, parses cumulative logical-disk counters, aggre…
Out of Scope Changes check ✅ Passed The changes remain connected to issue #1478. Parser changes, the script version update, system-aware disk aggregation, UI rendering, tests, and related documentation support the Windows status and dis…
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 6 files. (8 skipped: 8 u…
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/windows-status-output-and-disk-io

Comment @coderabbitai help to get the list of available commands.

@coderabbitai
coderabbitai Bot requested a review from lollipopkit September 14, 2026 03:13
@GT-610
GT-610 merged commit a552973 into main Sep 14, 2026
15 checks passed
@GT-610
GT-610 deleted the fix/windows-status-output-and-disk-io branch September 14, 2026 04:18
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.

Windows显示依旧错误

1 participant