繁體中文

問題修復

Windows 系統匣不再鬧雙胞或留白,面板卡片排序全同步

現在 Windows 的面板與系統匣(system tray,常駐在螢幕右下角的圖示選單)畫面變得更順眼了。當你拖曳額度卡(quota card)改變排列順序並重載主題時,系統會先重新讀取共用的已儲存排序(shared saved order),所以不管你打開哪個支援拖曳排序的面板,上面的 Claude、Codex 與 Antigravity 卡片順序都會是一致的。另外,以前系統匣在啟動時,會過早對還沒準備好的視窗定位,硬是把一個空白的白色或深色長方形拉到畫面上;如果重複啟動兩次,第二個實例還會與第一個爭奪共用的 WebView2(讓桌面程式內嵌顯示網頁畫面的元件)用來存放使用者資料的目錄而初始化失敗,留下一塊純白長方形殘留在螢幕上。現在系統改為顯示前一刻才定位視窗,而且面板顯示後如果又切換面板,視窗定位還是會照舊重新套用一次;系統匣會持有一個具名 mutex(named mutex,用來確保同時間只有一個程式運行的鎖定機制),點第二次只會顯示「已在執行中」的在地化提示然後關閉。就像一間店面,以前店員還沒把假人模特兒穿好衣服就把鐵捲門拉開,或者兩位店長在同一個地址搶著掛招牌;現在他們會在開門前把商品陳列整齊,而且知道這地址有人營業就會客氣地離開,不再鬧雙胞。

問題修復

狀態列額度同步更安全,Windows 不掉額度資料、macOS 不閃退

當你同時開好幾個 Claude Code 視窗時,你的額度資料(rate_limits)不再莫名其妙遺失,這波修復也順手解決了 macOS 使用者一開程式就閃退的災難。以前在 Windows 上,如果有兩個實例同時刷新狀態列,用來保護檔案不被同時修改的檔案鎖(file lock)是採用非阻塞式(non-blocking,搶不到鎖就直接放棄並拋出錯誤),而這個搶鎖失敗拋出的 OSError 錯誤又被系統吞掉,導致讀取並寫入 rate_limits(額度資料)的過程完全沒有同步保護,把資料給弄丟了。現在 Windows 會不斷輪詢(polling,定期重複嘗試)直到取得鎖,最多等 10 秒;若該檔案系統真的不支援鎖定,就會退回單靠原子寫入(atomic write,確保寫入動作一次完成中途不被打斷)。實測 200 組並行(concurrent)運作,資料遺失次數從 21 次降為完美的 0 次。而這次在修復 Windows 鎖定問題時,不小心用了一個 macOS 上不存在的 errno.EDEADLOCK 常數,導致所有 macOS 使用者一載入程式就直接崩潰;現在已經補上防護,當找不到該屬性時會自動退回使用 errno.EDEADLK。就像多個記帳員同時要寫同一本帳冊,以前在 Windows 上大家不排隊硬搶,搶不到筆就漏記而弄丟了原本的紀錄,而在 macOS 上則是記帳員看到新版的排隊規定看不懂就直接罷工;現在大家不僅學會耐心排隊等筆,看不懂新規定時也懂得變通,用自己熟悉的方式繼續工作。

English

BUGFIX

Windows system tray no longer blanks out or duplicates, and panel cards sync flawlessly

The Windows panels and system tray (the icon menu tucked in the corner of your taskbar) now look much cleaner. When you drag a quota card to change its order and then reload a theme, the system now rereads the shared saved order first, so your Claude, Codex, and Antigravity cards will line up exactly the same way across all draggable panels. Previously, the tray would prematurely position its hidden window before it finished rendering, dragging an empty white or dark rectangle onto your screen at launch; furthermore, if you accidentally launched the tray twice, the second instance would fight the first over the shared WebView2 (the component that renders web content within desktop apps) user-data directory, fail to initialize, and linger as a bare white rectangle. Now, the window is positioned right before it becomes visible, and after a visible panel switch the placement is re-applied as before; moreover, the tray holds a named mutex (a lock mechanism ensuring only one copy runs at a time) during its lifetime, so a second launch simply shows a localized "already running" notice and exits. It's like a storefront where employees used to roll up the shutters before dressing the mannequins, or two managers trying to open a shop at the same address; now they perfectly arrange the display before opening the doors, and the second manager politely leaves upon seeing the "Open" sign.

BUGFIX

Safer quota sync prevents quota data drops on Windows and startup crashes on macOS

Your quota data will no longer vanish when you run multiple Claude Code windows at the same time, and a related fix resolves a disastrous startup crash for macOS users. Previously on Windows, if two instances refreshed the status line simultaneously, the file lock (a mechanism preventing simultaneous file edits) operated in a non-blocking manner (immediately giving up if the lock wasn't available). The resulting OSError was silently swallowed, leaving the read-modify-write cycle for rate_limits (quota data) completely unsynchronized, causing data drops. Windows now polls (repeatedly checks) for the lock until acquired, with a 10-second deadline; if the file system genuinely doesn't support locking, it safely falls back to an atomic write (saving the entire change in one uninterruptible motion). In a test of 200 concurrent runs, data loss plummeted from 21 incidents to zero. Furthermore, the initial fix for this Windows lock issue introduced an errno.EDEADLOCK constant that simply doesn't exist on macOS, causing every macOS user's app to crash instantly upon loading. It now falls back to the supported errno.EDEADLK when the former is undefined. It's like multiple accountants trying to write in the same ledger: previously on Windows they'd just grab at the book, fail to get a pen, and lose track of the records, while on macOS the accountants saw the new queuing rules, got confused, and walked off the job entirely; now they patiently wait in line for the pen, and know how to adapt when the rulebook uses unfamiliar terms.

原始 CHANGELOG

Original changelogWindows 系統匣不再鬧雙胞或留白,面板卡片排序全同步
**Windows panel card order now follows across themes**: reloading a theme after dragging a quota card now rereads the shared saved order before state injection, so every draggable panel opens with the same Claude, Codex, and Antigravity card order.
**The tray panel no longer appears as an empty white/dark rectangle at launch**: pywebview's `resize()` and `move()` call `SetWindowPos` with `SWP_SHOWWINDOW`, and the tray placed its still-hidden window as soon as the panel document loaded — dragging the unrendered panel onto the screen on every start. The window is now placed right before it is shown; after a visible panel switch the placement is re-applied as before.
**Launching the Windows tray twice no longer leaves a blank white window**: a second instance fought the first over the shared WebView2 user-data directory, so its panel failed to initialize and lingered on screen as a bare white rectangle. The tray now holds a named mutex for its lifetime; a second launch shows an "already running" notice (localized) and exits instead.
Original changelog狀態列額度同步更安全,Windows 不掉額度資料、macOS 不閃退
**The status line no longer drops quota data when two Claude Code instances refresh at once on Windows**: the hook's file lock was blocking on POSIX (`fcntl.flock(LOCK_EX)`) but non-blocking on Windows (`msvcrt.locking(LK_NBLCK)`), and a contended lock raised `OSError` that was swallowed — leaving the `rate_limits` carry-forward read-modify-write in `save()` completely unsynchronized. Windows now polls the lock until it is acquired (10s deadline), matching POSIX semantics; genuinely unsupported locking still falls back to the atomic write alone. Measured over 200 concurrent hook pairs: `rate_limits` were lost 21 times before, 0 times after.
**The Claude Code hook no longer crashes on macOS**: a constant introduced by the Windows lock fix above referenced `errno.EDEADLOCK`, which doesn't exist on macOS — importing `usage_statusline.py` failed immediately for every macOS user. Now falls back to `errno.EDEADLK` when `EDEADLOCK` isn't defined.