* fix(window): hover effect of the minimize and close button does not disappear
* docs: add necessary comments
---------
Co-authored-by: Sline <realakayuki@gmail.com>
- Unified handler to IEC standard.
- Change handler to parse number in a unified style, even with number less than 1000.
Signed-off-by: Dragon1573 <49941141+Dragon1573@users.noreply.github.com>
* fix(ui): prevent light flash on dark startup
* fix(window): apply initial dark/light theme to prevent white flash
* refactor(boot): optimize config fetch and theme fallback
* fix: system theme detection
* fix(window): remove black flash before loader by aligning initial paint with theme
* refactor(traffic-monitor): Move traffic sampling/compression to a dedicated Web Worker
* refactor(traffic-monitor): introduce shared sampler, safe fallback, and decoupled range handling
* refactor(traffic-monitor): add optional subscribe flag and fix range handling
* fix(traffic-monitor): age out idle samples and prevent ref-count updates after unmount
Fixed race condition where button state and background color would desync
during rapid toggles or slow backend responses.
Root causes:
- Button used actualState while background used configState
- toggleSystemProxy returned immediately via setTimeout(0), releasing lock
before backend operation completed
- 100ms delay in updateProxyStatus caused visual flash
Changes:
- Unified state source: both button and background now use actualState
- Made toggleSystemProxy truly async with proper await chain
- Wrapped toggle function with useLockFn to serialize operations
- Reduced state refresh delay from 100ms to 50ms
- Fixed GuardState lock release timing for async operations
- Added proper error rollback with state refresh on failure
Resolves issue where proxy toggle button would show as off while
background remained green, or vice versa.
Separated dnd-kit drag handlers (attributes/listeners) from ListItemButton
to ListItemIcon only. Previously, long-press or rapid clicks on nav items
would trigger drag detection and cancel the click event, causing the item
to visually highlight but fail to navigate.
Changes:
- Moved sortable attributes/listeners to icon elements only
- ListItemButton now handles pure navigation clicks without interference
- Drag handle cursor ('grab') remains on icons when sortable is enabled
Fixes issue where sidebar tabs would "go dark" without actual route change.