* fix(ssh): Modify the return type of execWithPwd to include the output content
Adjust the return type of the `execWithPwd` method to `(int?, String)` so that it can simultaneously return the exit code and output content
Fix the issue in ContainerNotifier where the return result of execWithPwd is not handled correctly
Ensure that server operations (shutdown/restart/suspend) are correctly pending until the command execution is completed
* refactor(container): Change single error handling to multiple error lists
Support the simultaneous display of multiple container operation errors, enhancing error handling capabilities
* fix(container): Adjust the layout width and optimize the handling of text overflow
Adjust the width calculation for the container page layout, changing from subtracting a fixed value to subtracting a smaller value to improve the layout
Add overflow ellipsis processing to the text to prevent anomalies when the text is too long
* Revert "refactor(container): Change single error handling to multiple error lists"
This reverts commit 72aaa173f5.
* feat(container): Add Podman Docker emulation detection function
Add detection for Podman Docker emulation in the container module. When detected, a prompt message will be displayed and users will be advised to switch to Podman settings.
Updated the multilingual translation files to support the new features.
* fix: Fix error handling in SSH client and container operations
Fix the issue where the SSH client does not handle stderr when executing commands
Error handling for an empty client in the container addition operation
Fix the issue where null may be returned during server page operations
* fix(container): Check if client is empty before running the command
When the client is null, directly return an error to avoid null pointer exception
* fix: Revert `stderr` ignore
* fix(container): Detect Podman simulation in advance and optimize error handling
Move the Podman simulation detection to the initial parsing stage to avoid redundant checks
Remove duplicated error handling code and simplify the logic
* fix(container): Fix the error handling logic during container command execution
Increase the inspection of error outputs, including handling situations such as sudo password prompts and Podman not being installed
* refactor(macOS): Remove unused path_provider_foundation plugin
* refactor(server): Replace Future.wait with an explicit list of futures to enhance readability
Refactor the nested map and async functions into explicit for loops and future lists to make the code logic clearer
* fix(server): Fixed the auto-refresh logic and concurrency control issues
- Add `_refreshCompleter` to prevent concurrent refreshes
- Fixed the issue where the status was not updated after the automatic refresh timer was canceled
- Remove the invalid check for `duration == 1`
* refactor(server): Optimize the server refresh logic by filtering out servers that do not need to be refreshed in advance
Move the server filtering logic outside the loop and use the `where` method to filter the servers that need to be refreshed, avoiding repeated condition checks within the loop. This improves code readability and reduces redundant condition checks.
* refactor: Optimize server refresh logic to enhance readability
Break down complex conditional checks into clearer steps, separating the logic for server refresh and rate limiter reset. Replace chained calls with explicit loops to make the code easier to maintain and understand.
* refactor(server): Remove `updateFuture` from `ServerState` and use the `_isRefreshing` flag instead
Simplify the server refresh logic, replace Future state tracking with a boolean flag, and avoid unnecessary state updates
* refactor(server_detail): Extract the setting items as local variables to improve performance
Extract the globally set items that are accessed repeatedly as local variables, reduce unnecessary state retrieval operations, and optimize page performance
* refactor: Rename `_displayCpuIndexSetting` to `_displayCpuIndex` for consistency
* refactor(server): Fix the issue of parallel blocking in server refresh
The original code uses Future.wait to wait for all refresh operations to complete, but in fact, there is no need to wait for the results of these operations. Instead, directly calling ignore() to ignore the results can avoid blocking caused by the slowest server
* fix: Adjust the order of logging and default value settings
Ensure to set the default value after recording the invalid duration warning
* refactor(server): Rename _refreshCompleter to _refreshInProgress to enhance readability
Change the variable name from `_refreshCompleter` to `_refreshInProgress`, so that it more accurately reflects the actual purpose of the variable, which is to indicate whether the refresh operation is in progress
* refactor(server): Remove unnecessary refresh progress status management
Simplify the server refresh logic, remove the unused _refreshInProgress state variable and related Completer handling, making the code more concise and straightforward
* chore: Update dependent package versions
Update the following dependent package versions:
- camera_web has been upgraded from 0.3.5 to 0.3.5+3
- ffi has been upgraded from 2.1.4 to 2.1.5
- hive_ce_flutter is upgraded from 2.3.3 to 2.3.4
- watcher is upgraded from 1.1.4 to 1.2.1
* opt.
---------
Co-authored-by: lollipopkit🏳️⚧️ <10864310+lollipopkit@users.noreply.github.com>
* feat(local file page): Display server names for server folders
In the local file list, server folders will display their corresponding server names, enhancing the user experience.
* fix(storage page): Use ref.read instead of ref.watch to fetch the server list
Avoid unnecessary watch operations during construction, reducing potential performance overhead
* fix: Added logging to exception handling
Added detailed error logging to exception handling across multiple files, including exception information and stack traces, to facilitate troubleshooting.
* refactor(logging): Standardize logging output methods
Replace existing debugPrint and lprint with Loggers.app.warning to enhance logging consistency and maintainability.
* refactor: Remove redundant debug log prints
Clean up unnecessary log print statements in debug code
* feat(i18n): Added internationalization support for the logging feature
* 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>