Skip to content

Commit dc23f2e

Browse files
aqua5230claude
andcommitted
feat: v0.11.14 — stale update badge fix + 4 community PRs
- fix(badge): clear update hint immediately after upgrade past cached latest - fix(reporter): bucket Codex usage by token_count deltas (aqua5230#11, @ericweichun) - fix(reports): tie All Time reports to project range selector (aqua5230#15, @ericweichun) - fix(refresh): queue manual refresh while busy (aqua5230#12, @ericweichun) - docs(setup): make setup guidance agent-neutral (aqua5230#16, @ericweichun) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c8aaff6 commit dc23f2e

4 files changed

Lines changed: 24 additions & 2 deletions

File tree

CHANGELOG.en.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ Format follows [Keep a Changelog](https://keepachangelog.com/).
77

88
## [Unreleased]
99

10+
## [0.11.14] - 2026-05-27
11+
12+
### Fixed
13+
- **Stale update badge clears immediately after upgrading**: `usage_statusline.py:_read_update_hint` only compared the cached `current_version` against `latest_version` without consulting the actual running version. The menubar app's 24h dismiss cooldown returned early before refreshing the cache, so a user already on v0.11.13 would keep seeing "v0.11.5 available" until cooldown expired. `_check_update_in_background` now refreshes `current_version` in the cache on startup (even during cooldown), and if the running version has caught up to `latest_version`, both fields are leveled so the badge disappears immediately.
14+
15+
### Changed (community contributions)
16+
- **Codex usage bucketed by token_count deltas (@ericweichun, #11)**: `analyzer/reporter.py`'s fast path previously parsed Codex `.jsonl` files to extract a cumulative snapshot keyed by session-start timestamp, which diverged from the popover (which uses `codex_loader.load_entries` with per-event delta logic). The reporter now shares the same loader, so today/week/month reports match the popover exactly. Added a reporter-layer test exercising a cross-day cumulative Codex session to verify only the current-day delta is counted.
17+
- **All-Time reports tied to the project range selector (@ericweichun, #15)**: v0.11.6's analyze-bridge refactor left out the All-Time period, so clicking All-Time showed 720h cached data instead of true all-time. The bridge now maps `projectRange === "all"` through `_analysis_period_from_project_range("all") → "all"`, and project history loads with `hours_back=0` for true all-time data. All 9 panels gained a `projectRange === "all"` branch; `project_range_all` i18n keys added across all 5 locales.
18+
- **Manual refresh button queues while busy (@ericweichun, #12)**: previously, pressing refresh while one was already running silently dropped the second request. Now a single follow-up is queued, and the completion `finally` block runs in order: `codex_model = result.get("codex_model", "unknown")`, web language injection, clear the busy flag, then drain one queued refresh.
19+
- **Setup guidance made agent-neutral (@ericweichun, #16)**: the setup button previously gated on `~/.claude/` existence, hiding it from Codex-only users. The check is now "any status-line target available" (`~/.claude/` or `~/.codex/config.toml`); the existing `setup_hook.setup()` flow already auto-detects which agent to configure. Both README variants (zh-TW + en) reworded to agent-neutral phrasing; ja/ko `hook_not_installed` translations filled in.
20+
1021
## [0.11.13] - 2026-05-27
1122

1223
### Changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@
66

77
## [Unreleased]
88

9+
## [0.11.14] - 2026-05-27
10+
11+
### 修正
12+
- **升級後底部狀態列不再殘留舊版本提示**`usage_statusline.py:_read_update_hint` 只比較快取裡的 `current_version``latest_version`,沒對照「現在實際在跑的版本」。menubar app 又會在 24 小時冷卻期間直接 return、不更新快取,導致使用者已經升到 v0.11.13 卻一直看到「v0.11.5 可更新」直到冷卻結束。現在 `_check_update_in_background` 啟動就先把目前版本寫回快取,若已追上 `latest_version` 就把它一起拉平,badge 立刻消失。
13+
14+
### 變更(社群 contributor 修補)
15+
- **Codex 用量改用 delta 桶計算(@ericweichun, #11**`analyzer/reporter.py` 的 fast path 之前自己 parse Codex `.jsonl` 拿 cumulative snapshot + session-start 時間戳,跟 popover 用的 `codex_loader.load_entries` 走兩條路、結果會分歧。現在 reporter 統一走 shared loader,token_count delta 按 event timestamp 入桶,今日/本週/本月報表跟 popover 完全一致。新增跨日 cumulative session 測試確保只計當日 delta。
16+
- **All Time 報表跟著 project range 一起切換(@ericweichun, #15**:v0.11.6 重整 analyze bridge 時漏掉 All Time 這個區段,使用者點 All Time 看到的是 720h 快取資料而非真正全期。現在 `_analysis_period_from_project_range("all") → "all"`,project 資料載入改 `hours_back=0` 真的拉全部。9 個 panel HTML 都加 `projectRange === "all"` 分支;五語 i18n 補齊 `project_range_all`
17+
- **手動重整按鈕在 busy 期間改成排隊(@ericweichun, #12**:之前 refresh 正在跑時再按一次會直接被丟掉。現在改成排隊一次,refresh 完成的 finally block 依序:先 `codex_model = result.get("codex_model", "unknown")`、再注入 web 語言、再清 busy 旗標、再 drain 一筆 queued refresh。
18+
- **setup 指引改為 agent-neutral(@ericweichun, #16**:之前 setup 按鈕只看 `~/.claude/` 存不存在當顯示條件,Codex-only 使用者看不到。現在改成「status-line target 任一存在即可」(`~/.claude/``~/.codex/config.toml`),既有 `setup_hook.setup()` 路徑已會自動偵測 agent。README(繁中 + 英文)同步改成 agent-neutral 措辭;補齊 ja/ko `hook_not_installed` 翻譯。
19+
920
## [0.11.13] - 2026-05-27
1021

1122
### 變更

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "usage"
3-
version = "0.11.13"
3+
version = "0.11.14"
44
description = "usage — 在 macOS menu bar 顯示 Claude Code 用量的繁中小工具(也提供終端機 TUI)"
55
readme = "README.md"
66
requires-python = ">=3.13"

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)