Commit Graph

21 Commits

Author SHA1 Message Date
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
lollipopkit🏳️‍⚧️
263d4eabb4 feat: store critical data in secure store (#821) 2025-07-17 18:26:34 +08:00
calvin
11b0806083 fix github action build linux 2025-02-03 15:48:19 +08:00
lollipopkit🏳️‍⚧️
16948c3e0f new: provide .deb & .rpm 2025-01-29 12:56:03 +08:00
lollipopkit
831efa833b fix: file_picker err 2024-12-14 16:21:25 +08:00
lollipopkit🏳️‍⚧️
479250c207 init 2024-08-28 13:44:54 +08:00
Noo6
f7ef8a3915 opt: hidden at launch on linux and macos 2024-08-16 16:19:58 +08:00
lollipopkit🏳️‍⚧️
c988dd88d7 fix: linux duplicated title bar (#462)
Fixes #459
2024-07-15 17:38:30 +08:00
lollipopkit
b06fddec07 new: windows release actions 2024-06-02 15:29:53 +08:00
lollipopkit
eb0100d432 opt. 2024-05-23 18:23:26 +08:00
lollipopkit
b2eb96ec16 new: no titlebar on desktop 2023-12-09 16:31:18 +08:00
lollipopkit
ac94b33ad4 init: nvdia-smi 2023-11-26 13:45:08 +08:00
lollipopkit
a9f9a1650e new: secure store 2023-11-03 10:23:57 +08:00
lollipopkit
02be466954 opt.: linux/win window size & server reconnect 2023-10-22 15:47:22 +08:00
lollipopkit
84e99048ab #158 new: follow system color 2023-09-08 19:47:43 +08:00
calvin
253ab40e5c FEAT:Remove headerbar for linux so it will look better 2023-08-11 13:48:31 +08:00
Galois
140a3de5ed Update: linux BINARY_NAME
Signed-off-by: Galois <fv10015@outlook.com>
2023-08-06 19:54:17 +08:00
lollipopkit
7f4dcc1357 opt.
- add help for ssh virt keys
- rm unused lib
2023-07-29 16:24:47 +08:00
lollipopkit
0022294ea4 #71 new & opt.
- ssh page virt key long press
- custom ssh virt keys
2023-06-27 00:41:56 +08:00
Junyuan Feng
282443a548 migrate flutter3.0 2022-05-12 15:06:48 +08:00
Junyuan Feng
a2ed889183 migrate to darssh2 2022-01-09 18:06:39 +08:00