refactor(tray): change menu text storage to use Arc<str> for improved performance
refactor(service): utilize SmartString for error messages to enhance memory management
* feat(config): enhance configuration initialization and validation process
* refactor(profile): streamline profile update logic and enhance error handling
* refactor(config): simplify profile item checks and streamline update flag processing
* refactor(disney_plus): add cognitive complexity allowance for check_disney_plus function
* refactor(enhance): restructure configuration and profile item handling for improved clarity and maintainability
* refactor(tray): add cognitive complexity allowance for create_tray_menu function
* refactor(config): add cognitive complexity allowance for patch_config function
* refactor(profiles): simplify item removal logic by introducing take_item_file_by_uid helper function
* refactor(profile): add new validation logic for profile configuration syntax
* refactor(profiles): improve formatting and readability of take_item_file_by_uid function
* refactor(cargo): change cognitive complexity level from warn to deny
* refactor(cargo): ensure cognitive complexity is denied in Cargo.toml
* refactor(i18n): clean up imports and improve code readability
refactor(proxy): simplify system proxy toggle logic
refactor(service): remove unnecessary `as_str()` conversion in error handling
refactor(tray): modularize tray menu creation for better maintainability
* refactor(tray): update menu item text handling to use references for improved performance
Prevent state resets while editing groups so deletions/restorations persist instead of being overwritten.
Ensure YAML is normalized and the latest visual state is saved.
- Add `normalizeDeleteSeq` to handle legacy `{name: ...}` entries and `buildGroupsYaml` for consistent serialization.
- Guard reassigning `deleteSeq` unless normalized value changes to avoid effect loops.
- Normalize proxy deletions and deduplicate policy names without extra backend writes.
- Split “on open” effect from proxy-policy refresh; toggling delete no longer triggers `fetchContent()`.
- Write composed YAML in `handleSave`, keep `currData`/`prevData` aligned, and provide accurate payloads to `onSave`.
* feat: add signal handling for graceful shutdown on Windows and Unix
Co-authored-by: oomeow <oomeow@outlook.com>
* chore: update Cargo.lock
* fix(windows): restore shutdown hook build by enabling missing Win32 APIs and removing stray tracing call
Includes the required windows-sys feature expansions and replaces a leftover tracing reference so the Windows shutdown hook builds successfully.
* fix: add deprecation warnings for encrypt_data and decrypt_data functions
---------
Co-authored-by: oomeow <oomeow@outlook.com>
Co-authored-by: Slinetrac <realakayuki@gmail.com>
* fix: hover options
* feat: add configurable hover jump navigator delay
- Added `hover_jump_navigator_delay` to Verge config defaults, patch flow, and response payload for persistent app-wide settings.
- Made proxy navigator respect configurable delay via `DEFAULT_HOVER_DELAY` and new `hoverDelay` prop.
- Threaded stored delay through proxy list so hover scrolling uses Verge-configured value.
- Added "Hover Jump Navigator Delay" control in Layout settings with clamped numeric input, tooltip, and toggle-aware disabling.
- Localized new labels in English, Simplified Chinese, and Traditional Chinese.
- Extended frontend Verge config type to include delay field for type-safe access.
* docs: UPDATELOG.md
In Rust, the `or` and `or_else` methods have distinct behavioral differences. The `or` method always eagerly evaluates its argument and executes any associated function calls. This can lead to unnecessary performance costs—especially in expensive operations like string processing or file handling—and may even trigger unintended side effects.
In contrast, `or_else` evaluates its closure lazily, only when necessary. Introducing a Clippy lint to disallow `or` sacrifices a bit of code simplicity but ensures predictable behavior and enforces lazy evaluation for better performance.
* perf: utilize smartstring for string handling
- Updated various modules to replace standard String with smartstring::alias::String for improved performance and memory efficiency.
- Adjusted string manipulations and conversions throughout the codebase to ensure compatibility with the new smartstring type.
- Enhanced readability and maintainability by using `.into()` for conversions where applicable.
- Ensured that all instances of string handling in configuration, logging, and network management leverage the benefits of smartstring.
* fix: replace wrap_err with stringify_err for better error handling in UWP tool invocation
* refactor: update import path for StringifyErr and adjust string handling in sysopt
* fix: correct import path for CmdResult in UWP module
* fix: update argument type for execute_sysproxy_command to use std::string::String
* fix: add missing CmdResult import in UWP platform module
* fix: improve string handling and error messaging across multiple files
* style: format code for improved readability and consistency across multiple files
* fix: remove unused file