- Updated logging macros to eliminate the boolean parameter for print control, simplifying the logging calls throughout the codebase.
- Adjusted all logging calls in various modules (lib.rs, lightweight.rs, help.rs, init.rs, logging.rs, resolve/mod.rs, resolve/scheme.rs, resolve/ui.rs, resolve/window.rs, server.rs, singleton.rs, window_manager.rs) to reflect the new macro structure.
- Ensured consistent logging behavior across the application by standardizing the logging format.
- Build Record inline so fmt::Arguments temporary only lives through writer.write, avoiding dropped-temporary borrow.
- Add explicit 'static annotation on leaked string before reboxing for clarity.
Introduced `write_sidecar_log` to prevent temporary `format_args!` values
from dropping early.
- src-tauri/src/core/core.rs:60 — adds `write_sidecar_log`, which temporarily
leaks the message into a `Box<str>`, builds the `Record`, writes it, then
immediately reclaims the boxed string. The `unsafe` block is limited to
`Box::from_raw` needed to undo `Box::leak`.
- src-tauri/src/core/core.rs:794, 802, 806 — all three sidecar events now route
through this helper, reusing the returned string for the in-memory log and
avoiding extra UTF-8 decoding.
- Added WindowControls component for managing window actions (minimize, maximize, close) based on the operating system.
- Integrated window decoration toggle functionality to allow users to prefer system titlebar.
- Updated layout styles to accommodate new titlebar and window controls.
- Refactored layout components to utilize new window management hooks.
- Enhanced layout viewer to include a switch for enabling/disabling window decorations.
- Improved overall window management by introducing useWindow and useWindowDecorations hooks for better state handling.
* fix: main thread block by sidecar launching.
#4791
* Refactor async runtime spawn to use AsyncHandler::spawn
for unify debugging.
* Fix compile error on non-windows platform
by remove Windows-specific configuration import.
* refactor: clash-verge-service management
* fix: correct service state checks in ProxyControlSwitches component
refactor: improve logging in service state update functions
* fix: add missing async handler for Windows and adjust logging import for macOS
* fix: streamline logging imports and add missing async handler for Windows
* refactor: remove unused useServiceStateSync hook and update imports in _layout
* refactor: remove unused useServiceStateSync import and clean up code in ProxyControlSwitches and _layout
* refactor: simplify service status checks and reduce wait time in useServiceInstaller hook
* refactor: remove unnecessary logging statements in service checks and IPC connection
* refactor: extract SwitchRow component for better code organization and readability
* refactor: enhance service state management and update related mutations in layout
* refactor: streamline core stopping logic and improve IPC connection logging
* refactor: consolidate service uninstallation logic and improve error handling
* fix: simplify conditional statements in CoreManager and service functions
* feat: add backoff dependency and implement retry strategy for IPC requests
* refactor: remove redundant Windows conditional and improve error handling in IPC tests
* test: improve error handling in IPC tests for message signing and verification
* fix: adjust IPC backoff retry parameters
* refactor: Remove service state tracking and related logic from service management
* feat: Enhance service status handling with logging and running mode updates
* fix: Improve service status handling with enhanced error logging
* fix: Ensure proper handling of service operations with error propagation
* refactor: Simplify service operation execution and enhance service status handling
* fix: Improve error message formatting in service operation execution and simplify service status retrieval
* refactor: Replace Cache with CacheProxy in multiple modules and update CacheEntry to be generic
* fix: Remove unnecessary success message from config validation
* refactor: Comment out logging statements in service version check and IPC request handling
* feat: update Cargo.toml for 2024 edition and optimize release profiles
* feat: refactor environment variable settings for Linux and improve code organization
* Refactor conditional statements to use `&&` for improved readability
- Updated multiple files to combine nested `if let` statements using `&&` for better clarity and conciseness.
- This change enhances the readability of the code by reducing indentation levels and making the conditions more straightforward.
- Affected files include: media_unlock_checker.rs, profile.rs, clash.rs, profiles.rs, async_proxy_query.rs, core.rs, handle.rs, hotkey.rs, service.rs, timer.rs, tray/mod.rs, merge.rs, seq.rs, config.rs, proxy.rs, window.rs, general.rs, dirs.rs, i18n.rs, init.rs, network.rs, and window.rs in the resolve module.
* refactor: streamline conditional checks using `&&` for improved readability
* fix: update release profile settings for panic behavior and optimization
* fix: adjust optimization level in Cargo.toml and reorder imports in lightweight.rs