50 Commits

Author SHA1 Message Date
Craig Constable
c333fdfa14 v1.4.5 2026-06-20 10:35:08 +10:00
Craig Constable
4c59e836f0 fix: make relaunch mutex wait effective 2026-06-20 10:01:52 +10:00
amorel
adbfaf1107 fix: survive explorer.exe restarts (tray icon no longer disappears)
When explorer.exe restarts it destroys the taskbar, which destroys our embedded child window outright (IsWindow returns false) and leaves the UI thread parked in GetMessage with no window to recreate in place. The tray icon and widget vanish until the app is manually relaunched (see issue #34).

A dedicated watchdog thread (independent of the now-dead message loop) polls the Shell_TrayWnd handle and, when it changes, relaunches the widget as a fresh process that re-embeds into the new taskbar. The relaunched child is flagged via an environment variable so it waits on the single-instance mutex until the previous instance exits, and a throttle backs off if explorer is crash-looping.
2026-06-17 16:27:36 +02:00
Craig Constable
c1056a4bd3 feat: wire up Brazilian Portuguese language support
The PR added the translation file only; register it in the
localization module (enum, codes, native name, string lookups,
pt locale detection) and add the context menu entry and command
handler. Also trim trailing whitespace and align field order
with the other language files.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 19:53:19 +10:00
Craig Constable
c4b2c18b78 Merge main into pr-29 2026-06-12 19:48:39 +10:00
Craig Constable
374d94fac2 fix: wire up Russian in language menu command handler
The PR added IDM_LANG_RUSSIAN to the context menu but not to the
WM_COMMAND handler, so selecting it did nothing. Also reorder
second_suffix to match the Strings field order used by the other
language files.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 19:37:31 +10:00
caduaraxa
cf5b6c0741 Add new translation file for PT-BR (Brazilian Portuguese) 2026-06-10 17:10:37 -03:00
st7105
e88ea07245 add Russian language 2026-06-10 12:53:45 +03:00
Craig Constable
b5f038dd39 v1.4.1
fix: correct widget drag state
2026-05-13 08:25:13 +10:00
Craig Constable
4676f6f72e feat: Codex usage now available through the model menu
- Option to have both or a single model visible

- Tray icon for each visible model

- Coloured text in duel mode to assist in identifying which model
2026-05-09 08:06:27 +10:00
Craig Constable
d54588bf6e v1.3.9
feat: check for other credential sources on permanent credential failure.
2026-05-05 18:46:57 +10:00
Craig Constable
f2b378462d v1.3.8
fix: stop focus steal by ignoring tray location events from our own icon updates
2026-05-05 09:38:36 +10:00
Craig Constable
ae9be6704a v1.3.7
feat: add Dutch localisation
2026-05-04 16:39:11 +10:00
Craig Constable
35f945daa9 v1.3.5
fix: align usage percentage and tray icon numbers
2026-04-20 09:18:01 +10:00
Craig Constable
17c63517ca v1.3.4
fix: pause usage polling on auth errors

- Show the same auth warning state for expired, invalid, or missing credentials

- Replace the widget auth text with a warning symbol and updated the toast notification

- Stop usage polling and countdown timers while auth is required

- Reuse the configured poll interval to watch credential file metadata instead of polling the API

- Auto-recover when credentials change, while still supporting manual refresh and restart flows

Updated translations
2026-04-19 15:36:20 +10:00
Craig Constable
b5ae662084 Merge pull request #15 from itskolbyk/fix/token-expired-notification 2026-04-19 13:55:46 +10:00
Craig Constable
3bc9be442e v1.3.3
feat: add Traditional Chinese localisation

- Thanks to @owovouo for the translation work in PR #13
2026-04-19 13:46:08 +10:00
Craig Constable
b0fcd92af4 v1.3.2
fix: resolve taskbar positioning deadlock

- Thanks to @owovouo and @aa333 for surfacing and working on this in PR #13 and PR #14
2026-04-19 12:58:50 +10:00
Kolby Kallweit
1d5c46fd99 fix: show balloon notification when OAuth token is fully expired 2026-04-18 11:41:56 -05:00
u_naro
a37d9632c2 feat: localize "Show Widget" and session/weekly window labels
- Add `show_widget` field to Strings struct and all 6 language files
- Replace hardcoded "Show Widget" in window.rs with strings.show_widget
- Translate session_window ("5시간") and weekly_window ("7일") for Korean

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 12:55:05 +09:00
u_naro
830f6f4c9b feat: add Korean (한국어) localization
Add Korean language support with full UI translations including
menu items, update messages, and time format suffixes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 12:46:56 +09:00
Craig Constable
643cc0a8b6 v1.3.0
- Added a native system tray icon that shows current 5-hour usage as a percentage badge.

- Added tray icon tooltip support showing both 5h and 7d countdown/usage values.

- Added tray icon interactions: left-click toggles the taskbar widget, right-click opens the context menu.

- Anchored widget to the bottom of the taskbar

- Added embedded app icon loading so tray fallback uses the app's own icon.

- Updated countdown timer logic to stop cases where 61m is shown

- Updated README.md
2026-03-31 09:30:35 +10:00
Craig Constable
77bd36d3e0 Prepare 1.2.11 changes on pr-6 2026-03-31 08:00:25 +10:00
usamaiqb
5587905329 source code 2026-03-27 17:19:33 +05:00
Craig Constable
7ef75f4c0b v1.2.9
- Improved vertical placement
2026-03-27 22:01:49 +10:00
Craig Constable
65cf2b5d16 v1.2.8
- Fixed update process for portable vs WinGet installs
2026-03-26 09:35:15 +10:00
Craig Constable
f527e82928 v1.2.6
- Added --diagnose parameter for troubleshooting startup issues
2026-03-25 13:22:30 +10:00
Craig Constable
110ae4ac58 v1.2.5
- Added update dialog after manual check for updates when an update is found
2026-03-23 19:52:33 +10:00
Craig
81a26eaf61
v1.2.4
Merge pull request #4 from jacobdwyer16/fix/wsl-timeout
- Added timeout to WSL credential lookups
2026-03-21 08:39:32 +10:00
Jacob Dwyer
e517eb948b add timeout to WSL credential lookups
wsl.exe -l -q can hang indefinitely on some systems (e.g. WSL
installed but not fully configured), which blocks the poll thread
forever and prevents any usage data from loading.

Adds a run_with_timeout helper (5s deadline) and uses it for both
list_wsl_distros and read_wsl_credentials. The refresh paths
already had timeouts — these two were missed.
2026-03-20 08:17:23 -05:00
Craig Constable
6d03532d50 v1.2.2
- Split localization into seperate files for easy management and contributions
2026-03-19 11:57:34 +10:00
Craig Constable
e28bc51ab1 v1.2.1
- Added WinGet support
2026-03-18 19:30:41 +10:00
Craig Constable
832e70fd72 v1.2.0
- Added check for updates and ability to self-update
2026-03-18 14:53:30 +10:00
Craig Constable
d6ea143f05 v1.1.0
- Added Windows-aware UI localisation with language override
2026-03-18 11:15:07 +10:00
Craig Constable
ec4177f7f6 v1.0.15
- Added support for WSL2
2026-03-15 21:57:43 +10:00
Craig Constable
7960ae9218 v1.0.14
- Added metadata to help improve trust

- Updated file version handling to keep version information synced
2026-03-15 09:56:53 +10:00
Craig Constable
50d656bd53 v1.0.13
- Fixed console window flash during refreshing token
2026-03-15 08:45:06 +10:00
Craig Constable
97ca8f8468 v1.0.12
- Added support for Windows High DPI Scaling
2026-03-11 15:35:10 +10:00
Craig Constable
4de95f0bde v1.0.11
- Hide the Claude CLI token refresh window so it does not flash on screen
2026-03-07 16:13:34 +10:00
Craig Constable
a68f801812 v1.0.10
- Added an icon to the application
2026-03-06 16:55:31 +10:00
Craig Constable
c8bd9683dd v1.0.9
- Fallback to previous method of retrieving usage details if failure occurs
2026-03-06 16:48:40 +10:00
Craig Constable
ad4467e814 v1.0.8
- Switched to using /api/oauth/usage thanks @Blimp-Labs

- Fixed versioning in app
2026-03-05 17:25:43 +10:00
Craig Constable
55d3a88b16 v1.0.7
- Added ability to drag widget to desired position

- Using C:\Users\CraigConstable\AppData\Roaming\ClaudeCodeUsageMonitor\settings.json to store position and update frequency

- Updated README.md
2026-03-05 09:01:31 +10:00
Craig Constable
9941c9a46d v1.0.6
- Added new function to find the claude CLI

- Using `claude -p .` to force OAuth refresh as `claude auth status` did not work

- Fixed handling of 'Start with Windows'

- Widened text display to fit values like '80% . 44m' (thank you @wangsu)
2026-03-05 08:22:59 +10:00
Craig Constable
fcad7fb848 v1.0.5
- Removed custom OAuth token refresh logic that was inadvertently invalidating Claude Code's refresh token via token rotation

- Removed hardcoded OAuth constants (token URL, client ID, scopes) no longer needed

- Removed in-memory token cache (CachedTokens, TOKEN_CACHE) no longer needed

- Delegate token refresh to the Claude CLI (claude auth status) so it manages its own credentials and writes updated tokens to disk

- Re-read credentials file after CLI refresh to pick up the fresh access token

- Simplified Credentials struct by removing unused refresh_token field
2026-03-01 14:53:27 +10:00
Craig Constable
6a3275517e v1.0.4
- Cache refreshed OAuth tokens in memory to survive across poll cycles
2026-03-01 14:41:29 +10:00
Craig Constable
187d12250c v1.0.3
- Adjusted row spacing - changed from 5px/7px/8px (top/gap/bottom) to 5px/10px/5px for even vertical centering
2026-02-27 08:04:29 +10:00
Craig Constable
266b8d5fb5 v1.0.2
- Seconds countdown below 61s - shows 1m at 61s, then 60, 59... 0 counting down each second, then now when reset time passes

- Fast polling at reset - when either timer shows now, polls the API every 5s to pick up fresh rate limit data

- Auto-restores normal polling - stops the 5s fast poll as soon as fresh data comes back with a new reset time
2026-02-27 07:56:00 +10:00
Craig Constable
d8d15dcdba v1.0.1
- Token auto-refresh - when the OAuth token is expired, the app uses the refresh token to get a new access token in-memory (no disk writes)

- Show '...' on error - any poll failure shows the refresh indicator instead of cryptic error text

- Exponential backoff retry - on failure, retries at 30s, 60s, 120s... up to the poll interval, then restores normal interval on success

- Countdown guard - the countdown timer no longer overwrites '...' with stale cached data during error state

- Cleaned up error handling - removed Display impl, error message formatting, extract_error_message, and simplified try_model to return Option<UsageData>
2026-02-27 07:12:00 +10:00
Craig Constable
a432004680 v1.0.0
Add taskbar widget for monitoring Claude Code API usage
2026-02-26 22:33:22 +10:00