lollipopkit🏳️‍⚧️ 3a615449e3 feat: Windows compatibility (#836)
* feat: win compatibility

* fix

* fix: uptime parse

* opt.: linux uptime accuracy

* fix: windows temperature fetching

* opt.

* opt.: powershell exec

* refactor: address PR review feedback and improve code quality

### Major Improvements:
- **Refactored Windows status parsing**: Broke down large `_getWindowsStatus` method into 13 smaller, focused helper methods for better maintainability and readability
- **Extracted system detection logic**: Created dedicated `SystemDetector` helper class to separate OS detection concerns from ServerProvider
- **Improved concurrency handling**: Implemented proper synchronization for server updates using Future-based locks to prevent race conditions

### Bug Fixes:
- **Fixed CPU percentage parsing**: Removed incorrect '*100' multiplication in BSD CPU parsing (values were already percentages)
- **Enhanced memory parsing**: Added validation and error handling to BSD memory fallback parsing with proper logging
- **Improved uptime parsing**: Added support for multiple Windows date formats and robust error handling with validation
- **Fixed division by zero**: Added safety checks in Swap.usedPercent getter

### Code Quality Enhancements:
- **Added comprehensive documentation**: Documented Windows CPU counter limitations and approach
- **Strengthened error handling**: Added detailed logging and validation throughout parsing methods
- **Improved robustness**: Enhanced BSD CPU parsing with percentage validation and warnings
- **Better separation of concerns**: Each parsing method now has single responsibility

### Files Changed:
- `lib/data/helper/system_detector.dart` (new): System detection helper
- `lib/data/model/server/cpu.dart`: Fixed percentage parsing and added validation
- `lib/data/model/server/memory.dart`: Enhanced fallback parsing and division-by-zero protection
- `lib/data/model/server/server_status_update_req.dart`: Refactored into 13 focused parsing methods
- `lib/data/provider/server.dart`: Improved synchronization and extracted system detection

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: parse & shell fn struct

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-08 16:56:36 +08:00
2025-06-10 14:27:27 +08:00
2024-07-10 15:12:05 +08:00
2023-06-05 16:50:22 +08:00
2025-07-28 22:27:56 +08:00
2025-08-08 16:56:36 +08:00
2025-08-08 16:56:36 +08:00
2025-07-28 22:27:56 +08:00
2025-08-08 16:56:36 +08:00
2025-03-22 01:27:17 +08:00
2024-01-14 18:50:25 +08:00
2024-06-01 22:36:02 +08:00
2024-12-02 21:06:44 +08:00
2023-10-12 11:27:02 +08:00
2025-06-09 16:01:39 +08:00
2025-07-25 16:38:28 +08:00
2025-07-28 22:27:56 +08:00
2025-08-08 16:56:36 +08:00

English | 简体中文

Flutter Server Box

donate lang license Ask DeepWiki

A Flutter project which provides charts to display Linux, Unix and Windows server status and tools to manage servers.
Especially thanks to dartssh2 & xterm.dart.

🏙️ Screenshots

📥 Installation

Platform From
iOS / macOS AppStore
Android GitHub / CDN / F-Droid / OpenAPK
Linux / Windows GitHub / CDN

Please only download pkgs from the source that you trust!

🔖 Features

  • Status chart (CPU, Sensors, GPU...), SSH Term, SFTP, Docker & Process & Systemd, S.M.A.R.T...
  • Platform specific: Bio authMsg pushHome widgetwatchOS App...
  • English, 简体中文; Deutsch @its-tom, 繁體中文 @kalashnikov, Indonesian @azkadev, Français @FrancXPT, Dutch @QazCetelic, Türkçe @mikropsoft, Українська мова @CakesTwix; Español, Русский язык, Português, 日本語 (Generated by GPT)

🆘 Help

qq donate discord
  • In order to push server status to your portable device without opening ServerBox app (Such as message push and home widget), you need to install ServerBoxMonitor on your servers, and config it correctly. See wiki for more details.
  • Common issues can be found in app wiki.

Before you open an issue, please read the following:

  1. Paste the entire log (click the top right of the home page) in the issue template.
  2. Make sure whether the issue is caused by ServerBox app.
  3. Welcome all valid and positive feedback, subjective feedback (such as you think other UI is better) may not be accepted.

After you read the above, you can open an issue.

🧱 Contributions

Any positive contribution is welcome.

Development

  1. Setup Flutter environment.
  2. Clone this repo, run flutter run to start the app.
  3. Run dart run fl_build -p PLATFORM to build the app.

Translation

  • Guide can be found in my blog.
  • We need your help! Just feel free to open a PR.

💡 My other apps

  • GPT Box - A third-party GPT Client for OpenAI API on all platforms.
  • More - Tools & etc.

📝 License

GPL v3 lollipopkit

Description
No description provided
Readme AGPL-3.0 22 MiB
Languages
Dart 91%
Swift 4%
Kotlin 2.1%
C++ 1.5%
CMake 1.1%
Other 0.2%