Commit Graph
118 Commits
Author SHA1 Message Date
Tunglies d16c691c0f fix: can not filiter log level as expected 2025-08-03 09:52:27 +08:00
Tunglies 1f78d576a3 feat: migrate logs API from REST to IPC streaming (#4277)
* feat: migrate logs API from REST to IPC streaming

- Replace REST API `/logs` calls with IPC streaming implementation
- Add new `src-tauri/src/ipc/logs.rs` with `LogsMonitor` for real-time log streaming
- Implement duplicate stream prevention with level tracking
- Add frontend-backend communication via Tauri commands for log management
- Remove WebSocket compatibility, maintain IPC-only mode
- Fix duplicate monitoring task startup when toggling log service
- Add proper task lifecycle management with JoinHandle cleanup

* refactor: remove dead code from logs.rs to fix clippy warnings

- Remove unused `timestamp` field from LogItem struct
- Remove unused `client` field from LogsMonitor struct
- Remove unused methods: `is_fresh`, `get_current_monitoring_level`, `get_current_logs`
- Simplify LogsMonitor initialization by removing client dependency
- All clippy warnings with -D warnings now resolved

* refactor: extract duplicate fmt_bytes function to utils module

- Create new utils/format.rs module with fmt_bytes function
- Remove duplicate fmt_bytes implementations from traffic.rs and memory.rs
- Update imports to use shared utils::format::fmt_bytes
- Add comprehensive unit tests for fmt_bytes function
- Ensure DRY principle compliance and code maintainability
2025-07-30 23:11:21 +08:00
Tunglies 3048a2ae08 feat: Implement configuration caching mechanism and force-refresh feature**
✨ **New Features**:

* Added API and frontend support for forcibly refreshing Clash configuration cache
* Implemented a configuration cache TTL mechanism (60 seconds) to reduce redundant requests
* Introduced `ProxyRequestCache` system to manage backend data caching
* Automatically refresh frontend state after core operations to enhance user experience

🚀 **Performance Optimizations**:

* Increased Clash configuration refresh interval from 5 seconds to 60 seconds
* Force refresh cache after configuration updates to resolve data inconsistency
* Automatically trigger state refresh after core switch, start, stop, and restart actions

🔧 **Technical Improvements**:

* Removed unused dependencies: `ab_glyph`, `owned_ttf_parser`, `ttf-parser`
* Simplified WebSocket dependency management, unified `tungstenite` version
* Refactored configuration save validation process, improved merge file handling
* Improved error handling and overall user experience
2025-07-24 01:59:25 +08:00
wonfen 628de70e89 chore: remove unused imports 2025-06-23 00:09:17 +08:00
wonfen 034885d810 feat: introduce event-driven proxy manager and optimize proxy config updates 2025-06-21 21:56:15 +08:00
Tunglies 357b64e9a0 feat: enhance pre-push hook to include remote URL check and improve format check messaging 2025-06-18 18:56:03 +08:00
时雨andTunglies f5315fd737 fix: 修正Linux系统窗口下页面白边和顶部圆角白底 (#3778)
Co-authored-by: Tunglies <selenvow+github@gmail.com>
2025-06-18 08:28:40 +08:00
wonfen ac7307b1f7 feat: enhance profile management and proxy refresh with improved event listening and state updates 2025-06-17 11:38:53 +08:00
wonfen dd505e4d58 perf: optimize layout initialization and enhance backend notification mechanism 2025-06-15 19:35:12 +08:00
wonfen 5858f05c13 perf: async app startup loading to prevent UI freeze 2025-06-13 22:59:16 +08:00
Tunglies 09969d95de feat: add rustfmt configuration and CI workflow for code formatting
refactor: streamline formatting workflow by removing unused taplo steps and clarifying directory change

refactor: remove unnecessary directory change step in formatting workflow
2025-06-06 22:13:11 +08:00
Tunglies 1e3566ed7d fix: optimize asynchronous handling to prevent UI blocking in various components
fix: add missing showNotice error handling and improve async UI feedback

- Add showNotice error notifications to unlock page async error branches
- Restore showNotice for YAML serialization errors in rules/groups/proxies editor
- Ensure all user-facing async errors are surfaced via showNotice
- Add fade-in animation to layout for smoother theme transition and reduce white screen
- Use requestIdleCallback/setTimeout for heavy UI state updates to avoid UI blocking
- Minor: remove window.showNotice usage, use direct import instead
2025-05-30 17:53:40 +08:00
wonfen 4840e07da8 refactor: remove redundant logic 2025-05-25 21:56:04 +08:00
wonfen af1689ee07 refactor: add debounce to optimize config updates and provider refresh handling 2025-05-25 21:34:48 +08:00
Tunglies d60c3b4d64 feat: improve initialization logic to prevent duplicated initialization and improve logging in Layout component 2025-05-21 00:22:47 +08:00
wonfen b0a82bc7ad feat: remove custom window button 2025-05-14 22:15:02 +08:00
wonfen 1993e5dd51 chore: upgrade to react 19 2025-05-14 10:47:33 +08:00
wonfen 8cae9d4e0a refactor: use async approach to restructure UI startup logic and resolve various freeze issues during launch 2025-05-10 01:26:03 +08:00
wonfen 8296675574 refactor: notification system 2025-05-04 22:17:08 +08:00
wonfen 8d62c0d521 feat: auto-fallback to Clash proxy on scheduled subscription updates; refactor fallback logic and add request timeout 2025-04-24 22:51:45 +08:00
wonfen dc46eb9d21 fix: add recovery lock to prevent concurrency issues during lightweight mode exit 2025-04-21 12:20:55 +08:00
wonfen d05952e945 fix: resolve lightweight mode recovery failure caused by white screen prevention 2025-04-21 00:15:02 +08:00
Mozi 272a0c916d fix(layout): make app icon and name draggable (#3346)
The "the-newbtn" UpdateButton is still NOT draggable as expected.
2025-04-19 00:06:30 +08:00
wonfen 85d08fadd9 feat: check window render size and wait for completion to prevent white screen 2025-04-17 16:47:21 +08:00
wonfen 12065330e1 Release 2.2.2 2025-03-25 14:11:40 +08:00
wonfen 44ca513241 fix: sync system proxy status indicator with hotkey 2025-03-04 06:57:42 +08:00
wonfen 3ecf4bc238 feat: refactor logging system into a global service 2025-03-02 04:20:38 +08:00
wonfen a4dd4bcc8a feat: enhance merge config validation and error handling 2025-02-27 14:49:55 +08:00
wonfen 1a9b0a476b style: UI tweak 2025-02-27 13:04:46 +08:00
wonfen bb015506e7 Release - 2.1.1 臻fix 2025-02-27 03:18:23 +08:00
wonfen d54ba48c11 feat: enhance script validation and error handling 2025-02-26 05:21:14 +08:00
wonfen a5acdc04e3 perf: Improve config validation error messages and handling 2025-02-25 13:47:29 +08:00
wonfen bf374f2e85 fix: menu switching issue 2025-02-24 11:37:23 +08:00
wonfen 34f450fcdb feat: Improve core change configuration validation and error handling 2025-02-24 07:34:03 +08:00
wonfen 23f75598e5 feat: Enhance configuration validation and error handling during app startup 2025-02-24 06:21:32 +08:00
wonfen 1291c38d58 feat: Enhance configuration validation and error handling
- Improve config validation process with detailed logging and error tracking
- Add more robust error handling in profile updates and config patches
- Implement comprehensive config validation using clash core subprocess
2025-02-23 10:53:09 +08:00
wonfen 3b0635e8a1 feat: add lightweight mode 2025-02-13 02:18:17 +08:00
wonfen 75bb7a4dd7 fix: windows rounded corners 2025-01-19 09:47:43 +08:00
huzibaca 0eb5ee6ea8 chore: update 2024-11-30 07:04:09 +08:00
huzibaca 16c9c95e19 refactor: update_core_config, simplify logic and delete invalid notifications 2024-11-30 05:43:59 +08:00
huzibaca d7f033bd46 chore: update 2024-09-25 21:20:36 +08:00
huzibaca 1fb3b87697 chore: update 2024-09-25 21:07:01 +08:00
huzibaca 99ea6d5080 chore: unified hotkey registration 2024-09-25 15:45:12 +08:00
huzibaca a0b266fef8 fix: after importing a subscription, it cannot be automatically switched to the current subscription. 2024-09-13 18:17:14 +08:00
huzibaca 0c6d417d8c feat: Added web notification of successful subscription import 2024-09-13 11:24:49 +08:00
huzibaca 6cc81fe6b8 chore: update 2024-09-02 19:33:17 +08:00
Sukka 2725322fd5 refactor: replace recoil (#1137) 2024-06-07 12:27:37 +08:00
dongchengjie 224c65438f chore: logo svg 2024-05-14 16:53:39 +08:00
MystiPanda b0aa4402c2 chore: Change HomePage Logo 2024-05-12 21:17:21 +08:00
RikudouPatrickstar 2f7c3cf21e chore: update notification message and zh translation (#1011) 2024-05-12 14:40:18 +08:00