Commit Graph
100 Commits
Author SHA1 Message Date
Tunglies 69c75e92f4 Release 2.5.0 2026-05-19 13:07:20 +08:00
Tunglies 977783e39c refactor: simplify media unlock results 2026-05-18 23:14:27 +08:00
Tunglies d95e9ffab9 chore: bump version mihomo to 1.19.25 2026-05-18 22:03:26 +08:00
Tunglies 513b4cf6b2 chore: automate mihomo changelog sync 2026-05-18 21:52:53 +08:00
Tunglies 09e491885f fix: stop disabled system proxy guard
close #7004
2026-05-18 21:31:19 +08:00
Tunglies ae7915c66f chore: update tauri-plugin-mihomo to 0.1.9 2026-05-17 18:13:25 +08:00
Tunglies edf5246e7f fix: mask subscription URLs in backend logs 2026-05-17 13:13:16 +08:00
Tunglies 4ade3a840f refactor: run exit cleanup on exit request 2026-05-17 00:47:25 +08:00
Tunglies 07cbecb01d fix: prevent lightweight mode exit cleanup (#6973)
close #6973
2026-05-17 00:28:11 +08:00
Tunglies fc2ff69bdb fix(proxy): stabilize proxy group sticky scroll #6982
Close #6982
2026-05-16 02:48:51 +08:00
Tunglies bd10ef8ec9 fix: improve youtube premium unlock check 2026-05-16 01:11:34 +08:00
Tunglies 662dd20be1 fix(linux): show window after page load #7002 2026-05-14 21:52:03 +08:00
Tunglies a60ef75061 perf: lazy load monaco editor 2026-05-14 02:31:20 +08:00
Tunglies d79ad8976a chore: bump tauri-plugin-mihomo to 0.1.8 2026-05-13 02:18:29 +08:00
Tunglies e538fa0573 fix: comment out useless exit handling 2026-05-11 00:11:02 +08:00
Tunglies 165cc685bb chore: flag report-style PR bodies in AI review 2026-05-10 17:17:43 +08:00
Tunglies 243594c5d1 fix: isolate titlebar drag region #6968 2026-05-10 16:16:11 +08:00
Tunglies 753dad7c40 fix: move connection columns control 2026-05-10 13:21:06 +08:00
Tunglies 3956b0d034 fix(tray): include macOS speed text in click target 2026-05-09 02:32:27 +08:00
Tunglies 1d28cf7b5a style: improve update notes readability 2026-05-07 14:03:37 +08:00
Tunglies 8c1c143b5e fix: render GitHub alert syntax in update notes 2026-05-07 13:44:07 +08:00
Tunglies d0198a92e8 fix: publish existing draft release by id 2026-05-06 21:17:42 +08:00
Tunglies 7e6c2f48fa fix: keep intermediate release uploads as draft 2026-05-06 19:25:58 +08:00
Tunglies 178b33beef Release 2.5.0-rc 2026-05-06 16:25:23 +08:00
Tunglies 51c1ccec0a chore: fix renovate cargo workspace updates 2026-05-01 12:48:44 +08:00
Tunglies 20808c0c11 fix(sysproxy): preserve global proxy apply order #6760, #6832, #6790, #6793, #6801 2026-04-30 19:17:50 +08:00
Tunglies f7c21c2e60 chore: update renovate lockfile maintenance 2026-04-29 12:04:42 +08:00
Tunglies 6e0647f7b2 perf: narrow app data subscriptions 2026-04-29 10:18:03 +08:00
Tunglies 5b738a9d7a fix(logs): preserve logs when pausing (#6902) 2026-04-26 18:53:16 +08:00
Tunglies b85b435e00 refactor: structure config validation outcomes
- Replace boolean/string validation results with structured ValidationOutcome values across config validation, profile switching, DNS validation, and script validation. Callers can now distinguish valid, invalid, skipped, and busy states, with invalid results carrying an error kind and message.

- Route core config updates through structured outcomes and checked forced updates. Generation and validation failures now discard runtime drafts and surface validation failures instead of relying on empty success messages.

- Preserve existing frontend ergonomics by keeping boolean service wrappers where callers only need success, while direct DNS and script validation consumers receive ValidationOutcome. Failed profile editor saves reload the backend-restored file content and synchronize Monaco models so reopened editors show the restored state.
2026-04-25 13:31:08 +08:00
Tunglies 5882722031 chore: update changelog for front-end performance optimizations 2026-04-25 01:38:54 +08:00
Tunglies 549f21961c perf: reduce frontend subscription and raf churn 2026-04-25 01:12:45 +08:00
Tunglies d9ae7578ce perf: reduce traffic update allocations 2026-04-25 00:17:47 +08:00
Tunglies e0b9f8a48b perf(frontend): optimize traffic graph rendering 2026-04-24 22:27:05 +08:00
Tunglies 762f9a96fd refactor media unlock task collection 2026-04-24 20:20:50 +08:00
Tunglies 4e62bcf7b8 chore: migrate service to 2.3.0
- Bump clash_verge_service_ipc to 2.3.0 and refresh the lockfile for its updated dependency graph.

- Re-check the running service version after install/start so a stopped old 2.2.0 service is reinstalled before use.
2026-04-24 18:59:42 +08:00
Tunglies ddb52c8b5a fix(build): support service IPC release archives
- Resolve the latest clash-verge-service-ipc release tag with the existing version cache.

- Download the per-target service archive and extract service, install, and uninstall binaries to their existing platform-specific destinations.

- Preserve mihomo/resource download behavior and allow scripts/*.mjs through ESLint project service for hook linting.
2026-04-24 18:47:05 +08:00
Tunglies 1eb194d0f9 fix(core): streamline core change process and ensure version mutation after upgrade 2026-04-22 00:55:16 +08:00
Tunglies ff4204a1a4 fix(workflow): enhance AI slop review criteria and clarify assessment focus 2026-04-22 00:11:44 +08:00
Tunglies f03a56dc42 chore: cargo-audit workflow 2026-04-21 23:50:59 +08:00
Tunglies 711deccfcc fix(security): upgrade rustls-webpki to 0.103.13
Mitigates RUSTSEC-2026-0098: Incorrect URI name constraint validation.

- Update rustls-webpki from 0.103.11 to 0.103.13.
- Fixes a flaw where URI name constraints in certificates were
  incorrectly accepted, potentially allowing unauthorized names.

See: https://rustsec.org/advisories/RUSTSEC-2026-0098
2026-04-21 23:32:26 +08:00
Tunglies bcece774ce fix(deps): security update thin-vec to 0.2.16
Address RUSTSEC-2026-0103: Use-After-Free and Double Free in
IntoIter::drop when element drop panics.

- Upgrade thin-vec from 0.2.15 to 0.2.16.
- Mitigate potential memory corruption during panic unwinding.

See: https://rustsec.org/advisories/RUSTSEC-2026-0103
2026-04-21 23:30:50 +08:00
Tunglies bf2fccac1f fix(ui): prevent proxy update when disabled #6849 2026-04-19 23:11:07 +08:00
Tunglies 72394eb9b7 feat(ui): add QR code sharing for remote profiles
Add "Share QR Code" context menu item to remote profile cards.
2026-04-19 22:20:17 +08:00
Tunglies d203121abe perf(ui): reduce CPU and memory pressure on hot frontend paths
WebSocket hooks (use-connection-data, use-log-data)
- Single-pass merge for connection snapshots; reuse previous row reference
  when upload/download are unchanged so downstream memos can bail out
- Single-allocation cap on closedConnections (no double concat+slice)
- Single-allocation clamp in appendLogs
- Cache dayjs().format result within each 50ms log flush window

Connection table (connection-table.tsx)
- Decouple 5s relative-time tick from columnDefs via shared module-level
  tickStore + memoised RelativeTimeCell so the tick no longer rebuilds
  the table
- RowComponent memo with custom comparator (relies on stable row reference)
- Lift sx objects to module scope
- Stable onShowDetail via ref

App data provider (app-data-provider, app-data-context)
- Split monolithic context into six sub-contexts (Proxies/Rules/ClashConfig/
  System/Uptime/Refreshers); 3s uptime ticks no longer invalidate unrelated
  consumers
- useAppData adapter aggregates sub-contexts; consumer files unchanged
- useStableFn helper stabilises all refresh* callback identities
- Extract useCtx helper to remove repeated null-check boilerplate

Canvas traffic graph (enhanced-canvas-traffic-graph, use-traffic-monitor)
- Lift Y-axis scale (max/min) to drawGraph layer; calculateY allocations
  per frame: ~600 -> 1
- Document visibility gate stops RAF and the setNow interval when the
  window is hidden; appendData unaffected
- Reuse the existing visibilitychange listener instead of adding a second
  one; isDocumentVisibleRef guards animate() inside the frame
- Convert forEach arrow shorthands to block bodies
- Drop unnecessary state-setter deps from a useCallback

Proxy groups (proxy-groups, proxy-render, use-render-list)
- Narrow proxyColItemsMemo dep: headState -> headState.showType
- Per-group fingerprint cache + prevListRef in use-render-list; steady-state
  refetch ticks become O(0) and the list reference stays stable when nothing
  changed
- useStableCallback wraps handleCheckAll / handleLocation
2026-04-19 19:33:23 +08:00
Tunglies b1eb011050 refactor(ui): extract useProxyDelayState hook and tighten types
- Extract shared delay state logic from ProxyItem and ProxyItemMini
  into `useProxyDelayState` hook (src/hooks/use-proxy-delay-state.ts);
  JSX display thresholds preserved per-component.
- Deduplicate rAF/setTimeout/Promise scheduling in DelayManager via
  a private `scheduleOnNextFrame` helper.
- Drop no-op `useMemo(() => MODES, [])` in proxies page.
- Replace `any` on `setClashLog` prev params and layout-traffic sx
  objects with proper types (`pre!`, `Pick<BoxProps|...>`).
2026-04-19 17:25:57 +08:00
Tunglies 0e6d1d2476 fix(ui): unify delay color handling in ProxyItem and TestItem components #6829 2026-04-17 21:29:35 +08:00
Tunglies 4718c80498 chore(windows): bump sysproxy-rs to 0.5.4 2026-04-16 13:38:46 +08:00
Tunglies 3ff53ab975 fix(ui): restore memory usage centering in sidebar after MUI v9 migration
The MUI v9 migration moved boxStyle layout props into sx, but the memory
usage Box had a separate sx that overwrote it. Merge boxStyle.sx like the
upload/download rows already do.
2026-04-16 10:35:10 +08:00
Tunglies 6b904a6b14 chore: bump pnpm to v10.33.0 2026-04-15 19:02:46 +08:00
Tunglies 2e505f26ae feat(proxy-groups): integrate useQuery for fetching proxies data 2026-04-15 15:07:04 +08:00
Tunglies 409e59dfc8 chore: bump aw-action version 2026-04-14 01:42:56 +08:00
Tunglies 97bfed0606 chore: update pnpm-lock.yaml 2026-04-13 21:57:14 +08:00
Tunglies 749b6c9e30 feat(script): convert script execution to async and add timeout handling 2026-04-12 11:20:28 +08:00
Tunglies e6a88cf9c9 refactor: improve service manager initialization by reducing lock duration 2026-04-12 11:15:34 +08:00
Tunglies 0f41f1bc8d refactor: optimize deep_merge function using iterative stack approach 2026-04-12 11:13:17 +08:00
Tunglies a6687a3839 feat(tls): refactor TLS configuration to use static Lazy instance 2026-04-12 03:28:24 +08:00
Tunglies 20fddc5cff feat: add bytes dependency and optimize buffer handling in test_delay function 2026-04-12 03:26:48 +08:00
Tunglies 6fea76f7e3 feat(core): enable enhanced panic diagnostics and observability
Transitioned panic strategy from 'abort' to 'unwind' and integrated a
global panic hook into the logging framework.

This change allows the application to capture critical failure metadata—
including specific file locations, line numbers, and panic payloads—
persisting them to local logs before exit.

Note: We prioritize troubleshooting capability and long-term stability
at this stage. Reverting to 'panic = abort', `debug = false`,
`strip = true`, `remove split-debuginfo` for peak performance and
minimal binary size will only be considered once the project reaches
a mature state with near-zero community-reported crashes.
2026-04-12 03:26:48 +08:00
Tunglies 0e38ccbb9d fix: clippy error on macOS 2026-04-10 21:40:29 +08:00
Tunglies e63e3aa63f chore: update changelog for Mihomo(Meta) kernel upgrade to v1.19.23 2026-04-08 21:30:36 +08:00
Tunglies f70da6b292 fix: call enhanceProfiles after drag-drop import to reload core config #6744 2026-04-07 22:02:46 +08:00
Tunglies c2aa9d79ff Revert "feat: add babel-plugin-react-compiler and configure Vite for optimized chunking"
This reverts commit 1005baabe6.
2026-04-07 11:10:45 +08:00
Tunglies bff78d96b4 chore: migrate formatter from prettier to biome 2026-04-07 01:32:14 +08:00
Tunglies 1005baabe6 feat: add babel-plugin-react-compiler and configure Vite for optimized chunking 2026-04-07 01:11:46 +08:00
Tunglies 3aa39bff94 refactor: fix startup init chain — resolve_done semantics, dedupe events, cleanup
Backend:
- Move resolve_done() from sync setup() to async task after futures::join!
  so Timer waits for actual init completion instead of firing immediately
- Replace std::thread::sleep(50ms) with tokio::time::sleep in async context
- Remove duplicate refresh_tray_menu in tray_init (keep post-join call only)
- Delete dead code reset_resolve_done (process restarts, static is destroyed)
- Rename create_window(is_show) → create_window(should_create) for clarity

Frontend:
- Remove duplicate verge://refresh-clash-config listener from AppDataProvider
  (useLayoutEvents handles it via invalidateQueries — single consumer path)
- Stabilize useEffect deps with useRef for TQ refetch references
- Simplify AppDataProvider event listener setup (profile-changed + proxy only)
2026-04-06 12:20:16 +08:00
Tunglies 437fef1c30 fix: eliminate error flash on startup by distinguishing loading from error state
- Change TQ_MIHOMO retryDelay from fixed 2000ms to exponential backoff
  (200ms → 400ms → 800ms, cap 3s) so core-dependent queries retry faster
- Expose isCoreDataPending from AppDataProvider to distinguish between
  data still loading vs actual errors
- ClashModeCard: show placeholder instead of "communication error" while
  core data is pending
- CurrentProxyCard: show empty space instead of "no active node" while
  core data is pending
2026-04-06 02:14:33 +08:00
Tunglies ec82b69786 refactor: eliminate startup flicker — defer window show until overlay renders
- Remove Rust-side `eval(INITIAL_LOADING_OVERLAY)` that prematurely
  dismissed the overlay before React/MUI theme was ready
- Defer `window.show()` from Rust `activate_window` to an inline
  `<script>` in index.html, executed after the themed overlay is in DOM
- Remove `useAppInitialization` hook (duplicate of `useLoadingOverlay`
  with no themeReady gate)
- Simplify overlay to pure theme-colored background — no spinner or
  loading text — so fast startup feels instant
- Simplify `hideInitialOverlay` API and reduce overlay fade to 0.2s
- Clean up unused CSS variables (spinner-track, spinner-top, etc.)
2026-04-06 01:53:40 +08:00
Tunglies 04ce3d1772 refactor: remove unused UI notification functions and streamline initialization logic 2026-04-06 01:14:42 +08:00
Tunglies b8fbabae04 fix: frontend memory leaks — Monaco dispose, TQ cache eviction, useEffect cleanup
- Dispose Monaco editor instances on dialog close to prevent cycle leak
- Replace gcTime: Infinity with finite TTLs and evict orphaned subscription queryKeys
- Add missing useEffect cleanup for timers, move setTimeout out of useMemo
2026-04-05 23:10:45 +08:00
Tunglies 5da9f99698 fix: prevent TUN from being falsely disabled during startup
- Add 10s startup grace period before TUN auto-disable logic activates;
  service IPC may not be ready when the frontend first queries, causing
  a transient isServiceOk=false that incorrectly persists
- Replace placeholderData (which set isLoading=false with stale data)
  with a proper isStartingUp guard; query now polls every 2s during
  startup to catch service readiness quickly
- Add 'getSystemState' to refresh-verge-config invalidation keys to
  fix key mismatch that prevented event-driven refetches from working
2026-04-03 21:20:37 +08:00
Tunglies fa4557337b fix: adjust axios dependency to devDependency 2026-04-03 17:35:05 +08:00
Tunglies d6d15652ca refactor: migrate react-virtuoso to @tanstack/react-virtual 2026-04-03 17:13:13 +08:00
Tunglies 6f4ddb6db3 chore: update aw file 2026-04-03 15:15:26 +08:00
Tunglies 36624aff49 fix(logs): preserve log data and eliminate blank flash on page navigation
Preserve SWR cache in onConnected to avoid replacing accumulated logs
with kernel buffer on reconnect. Add KeepAlive for the logs page so
its DOM stays mounted across route changes, removing the visible blank
window when navigating back.
2026-04-03 13:13:57 +08:00
Tunglies 3714f0c4c8 feat: update clash_verge_service_ipc version to 2.2.0 2026-04-01 00:40:35 +08:00
Tunglies 9bcb79465c fix: resolve frontend data race conditions in hooks
- use-system-state: convert module-level `disablingTunMode` to useRef
  to isolate state per hook instance, fix no-op clearTimeout, add
  proper effect cleanup
- use-profiles: convert forEach to for..of so selectNodeForGroup is
  properly awaited, remove fire-and-forget setTimeout around mutate
- use-clash: add useLockFn to patchInfo for concurrency safety
2026-03-31 20:26:34 +08:00
Tunglies 7a06a5a069 fix: remove dead localStorage writes and hardcoded key
- Remove unused `dns_settings_enabled` localStorage writes in
  setting-clash.tsx — state is sourced from verge config, these
  writes were never read anywhere.
- Replace hardcoded `'last_check_update'` localStorage read in
  system-info-card.tsx with exported `readLastCheckTime()` from
  the useUpdate hook, keeping the key in a single source of truth.
2026-03-29 02:06:08 +08:00
Tunglies 99bbd7ee5a fix(home): unify last check update timestamp across settings and home page (#6605)
The settings page "Check for updates" did not update the homepage
"last check update time" because each page managed the timestamp
independently. Centralizes the timestamp in the useUpdate hook
via SWR + localStorage so both pages share a single data source.

Closes https://github.com/clash-verge-rev/clash-verge-rev/issues/6605#issuecomment-4147144987
2026-03-29 01:56:34 +08:00
Tunglies c3aba3fc79 fix(profile): refresh profile data after timer auto-update completes
The profile-update-completed event handler was missing a mutate('getProfiles')
call, causing the "X time ago" display to show stale timestamps after
backend timer auto-updates.
2026-03-28 02:37:59 +08:00
Tunglies 857392de8a fix(merge): optimize key handling in deep_merge function 2026-03-28 02:37:59 +08:00
Tunglies 4ee6402e29 fix(timer): improve delay timer handling during task execution 2026-03-28 01:45:02 +08:00
Tunglies add2c1036b fix(profile): refresh timer after profile deletion to ensure state consistency 2026-03-28 01:40:39 +08:00
Tunglies c8f737d44e chore!(deps): update sysproxy dependency to version 0.5.3 2026-03-28 01:03:56 +08:00
Tunglies 607ef5a8a9 fix(home): update last check timestamp on manual update check (#6605)
The onCheckUpdate handler never persisted the timestamp to localStorage
or dispatched it to component state, so clicking "Last Check Update"
would report the result but leave the displayed time stale.
2026-03-27 22:10:20 +08:00
Tunglies 961113b0db chore(workflows): remove alpha build workflow 2026-03-27 21:33:59 +08:00
Tunglies 20aa773339 fix: allow pr ai review on unapproved PRs 2026-03-24 00:19:59 +08:00
Tunglies 670d7bae3b refactor(tray): deduplicate icon getters, update_icon, and menu+icon combo
- Consolidate 3 near-identical icon getter functions into load_icon/default_icon with IconKind enum
- Merge two platform-gated update_icon implementations into one
- Extract update_menu_and_icon to eliminate duplicate combo in feat/config.rs and feat/clash.rs
2026-03-23 22:37:09 +08:00
Tunglies 0932de9f6c fix(tray): sync tray state after all init tasks complete
Tray refresh ran in parallel with core init, so the tray could display
stale state when the core hadn't fully started yet.
2026-03-23 21:24:27 +08:00
Tunglies 1e59bb0863 chore: bump tao version to 0.34.8 to avoid window freeze on macOS 2026-03-22 22:22:07 +08:00
Tunglies fa868295d8 fix: update script paths in PR AI Slop Review workflow 2026-03-21 19:28:01 +08:00
Tunglies 70a86b05c5 fix: align draft commit/save semantics
- use committed profiles snapshot for lifecycle saves (avoid persisting uncommitted drafts)
- remove apply/discard calls after profiles with_data_modify helpers
- persist profiles metadata explicitly in create_profile
- apply clash draft before saving mode changes
- surface deep-link profile save failures via logging
2026-03-21 18:54:47 +08:00
Tunglies 85eb3b48c2 chore: bump version to 2.4.8 2026-03-21 17:03:15 +08:00
Tunglies 8b99bb5150 fix: improve window close and focus listener management 2026-03-18 10:58:51 +08:00
Tunglies 0e89afb01f fix(window-provider): maximize avoiding loop detection 2026-03-09 06:46:36 +08:00
Tunglies 8d9d256423 revert: downgrade tauri-plugin-mihomo to 0.1.7 2026-03-08 13:17:07 +08:00
Tunglies c429632d80 refactor: update PointerSensor activation constraint to improve responsiveness 2026-03-07 13:58:50 +08:00
Tunglies b177a1e192 chore: update tauri-plugin-mihomo to 0.1.8 2026-03-07 12:52:15 +08:00
Tunglies 39d8a0ee35 fix: optimize UI proxies refresh handling when first boot 2026-03-04 01:07:20 +08:00
Tunglies 262b6f8adf fix: unexpected latency when switching nodes #6363 2026-02-26 15:47:02 +08:00