* feat(proxy): implement sticky virtual list and group tools
- Add new StickyVirtualList component for better performance with sticky headers
- Create ProxyGroupTools component for filtering, sorting and testing proxy groups
- Enhance proxy groups with improved scrolling and group toggle functionality
- Integrate search box with click event handling
- Remove redundant ProxyHead component usage
* style: remove unused import and update TypeScript types
* refactor: convert function component to forwardRef component to fix biome lint error
* feat(proxy): extract proxy chain UI to separate component
* refactor: remove custom throttle implementation and simplify dependencies
* feat(proxy): improve proxy groups UI and scrolling behavior
- Add initialOffset prop to StickyVirtualList for better scroll position restoration
- Refactor ProxyGroups component to separate chain and normal modes
- Implement scroll position persistence for both chain and normal modes
- Add sticky shadow effect for expanded proxy groups
- Remove unnecessary ScrollTopButton component
- Optimize scroll event handling with throttling
- Improve code organization with custom hooks and component separation
* docs(proxy-groups): Add TODO comment for initial render position issue
* feat(proxy): improve scroll position handling and UI display
* refactor(proxy): simplify scroll handling logic and remove unused code
* fix(sticky-virtual-list): remove duplicate styles and add padding
* refactor(proxy): rename scroll offset variables and functions for clarity
* refactor: remove unnecessary refs and simplify onClick handlers
* fix(proxy-groups): handle initial scroll position state
* feat(zed): add biome formatter configuration
* refactor(proxy): remove unused headState import and type annotations
* style(proxy): improve type imports and conditional rendering
* .
* feat(proxy): add ProxyHead component to render in global mode
* chore: ignore .zed directory
* docs: update changelog
Wait longer for slow Windows service startup, then hand off from sidecar
to service when it becomes ready. Retry service core startup during the
handoff window, and clean up root-owned macOS service core/IPC leftovers
before uninstalling the service.
* fix: replace toSorted with slice().sort() for macOS 12 compatibility
Array.prototype.toSorted() is ES2023 and not supported in WebKit < 16
(bundled with macOS 12 Monterey). Using slice().sort() is functionally
identical and works on all platforms.
Fixes#7216
* chore: update Changelog
---------
Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
* fix(connections): stabilize table memory usage
Render the connections table and list from stable row view models, and replace the TanStack row/cell instantiation path with a lightweight virtualized table body.
The leak was isolated to the frontend table render path: websocket data without the table stayed flat, while the normal table path kept producing large per-snapshot object graphs under active/closed churn.
Introduced-by: bf06cbc87d (introduced the TanStack table path)
Related-hot-path: 068678135 (made default ordering/filtering hot enough for long-running /connections sessions to amplify retained heap/RSS)
Related-retention-path: 7fc238c27b (moved Home stats to the full connection websocket subscription, so Home could keep connection snapshots alive for totals/count)
Keep UI behavior intact: column visibility, column order, resizing, sorting, connection details, the closed-connection cap, and the 500ms refresh cadence remain.
* fix(connections): lazily release connection snapshots
Keep the full active/closed connection snapshot scoped to /connections by using a short React Query gcTime for the full subscription.
Home now subscribes to a lightweight connection summary for totals and active count, so leaving /connections no longer keeps the full active/closed arrays and closed history alive for the dashboard.
Only the selected Active or Closed mode feeds filtering, sorting, row-view derivation, and table/list rendering. Switching modes remounts the row subtree and closes detail/column-manager state without changing the capped closed-history behavior.
* fix(connections): decouple collection from rendering
Move the high-frequency connection websocket path out of React Query and into a module-level external store consumed with useSyncExternalStore.
The store keeps one normalized active snapshot plus the capped closed history, continues collecting across route changes, and only notifies mounted subscribers. Home reads the same store through a lightweight summary snapshot, so leaving /connections no longer renders the table/list while connection history is still preserved.
This replaces the short-gc release behavior that made Active/Closed history disappear after navigating away, and bounds retained data to current active connections plus the closed cap instead of React Query cache objects.
* fix(connections): keep collection store authoritative
Remove the temporary per-subscription gcTime override added for /connections. The connection monitor now owns active/closed retention outside React Query, so route changes should stop rendering without clearing collected history.
This leaves the shared Mihomo websocket hook on its original 30s cache behavior for logs, traffic, and memory while /connections uses the external store introduced in the previous commit.
* perf(connections): coalesce snapshots before parsing
Keep only the latest raw websocket message during the 500ms throttle window and parse it when the store flushes. High-churn connection bursts no longer allocate parsed object graphs for snapshots that will be overwritten before React can observe them.
Also compare incoming metadata through the same normalization used for retained records, so optional undefined fields do not prevent metadata reference reuse.
* perf(connections): trim render allocations
Reuse existing row view objects before formatting derived strings when the retained connection object reference is unchanged. Stable closed-history rows no longer allocate throwaway display strings on every snapshot.
Measure the table scroll viewport on mount and resize instead of assuming a 1200px body, so virtual rendering starts from the real visible row count. Keep table state across Active/Closed switches and share the relative-time cell between table and list rows.
* perf(connections): tighten shared time updates
Refresh the shared relative-time clock before the first subscriber render and switch the listener registry back to a Set, avoiding stale labels after returning to /connections and keeping subscriber churn O(1).
Also sort table time rows by the existing numeric startTime field, drop the redundant row-view startTime equality check, and remove one unnecessary table prop guard.
* perf(connections): skip table-wide row projection
Stop materializing ConnectionRowView objects for the whole filtered dataset in table layout. The page now keeps raw connection records for the table path and only formats visible cells inside the virtualized table body, while list layout keeps the cached row-view path.
This removes the steady 500ms allocation pass that was still walking every filtered connection before table rendering. Detail lookup now reads the current filtered raw record directly, and the table clamps scroll state when switching between datasets of different lengths.
* perf(connections): skip unnecessary filter clone when table not searching
In table mode, avoid creating a filtered copy when search is empty: only apply search/sort work for non-empty query while retaining the same default order behavior. Also replace parsing in order comparators with numeric startTime to avoid per-tick Date object churn and use SearchBox state to detect an empty search.
In table layout without search input, use upstream connection snapshot directly for rendering instead of cloning/sorting every interval tick. This removes a persistent per-update array allocation path while keeping list-mode sort/search behavior unchanged.
* perf(connections): bound closed merge without full transient arrays
Cap closed-history promotion while iterating previous active set without building a temporary large closed array. This preserves the 500-item limit while avoiding 100k-scale transient allocations when many connections close between snapshots.
* fix(changelog): address memory leak caused by frontend
* perf(connections): cache visible table cell snapshots
Add a bounded row snapshot cache for the virtualized table so repeated paints and optional column sorting reuse stable formatted strings instead of rebuilding host/source/rule/chains/traffic text on every refresh. The cache is capped to avoid retaining large active sets.
Also skip full connection-data snapshot merging when only summary listeners are mounted, keeping Home on the summary-only path without changing Connections history while the page is subscribed.
* chore: update Changelog
* chore: update Changelog
* fix(tun): restart core when tun mode is toggled to true on linux
* fix(changelog): add note for Linux TUN not taking effect immediately
---------
Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
* feat: show detailed results in hotkey notifications
* fix: Japanese locale appears to have a truncated translation key label
* fix: variable naming
* Update documentation to English
* Remove unnecessary mut
* feat: enhance system proxy notifications with toggle state
* chore: update changelog to include new shortcut notification feature
* fix: remove unnecessary quotes from system proxy toggle messages in localization files
* fix: tun mode toggled hotkey notifications
* fix: correct toggle_tun_mode logic to handle current state and errors
---------
Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
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.
* fix(proxy): resolve system proxy toggle stuck and state desync (#6614)
Backend: replace hand-rolled AtomicBool lock in update_sysproxy() with
tokio::sync::Mutex so concurrent calls wait instead of being silently
dropped, ensuring the latest config is always applied.
Move blocking OS calls (networksetup on macOS) to spawn_blocking so
they no longer stall the tokio worker thread pool.
Frontend: release SwitchRow pendingRef in .finally() so the UI always
re-syncs with the actual OS proxy state, and rollback checked on error.
Closes#6614
* fix(changelog): add note for macOS proxy toggle freeze issue