Commit Graph
171 Commits
Author SHA1 Message Date
tiennm99 0be69275b1 docs: record the review outcome and open decisions 2026-10-23 03:51:20 +07:00
tiennm99 17ffc8098d fix: close the queued-poll race and skip missing refresh CLIs on Windows 2026-10-23 03:51:13 +07:00
tiennm99 1f753361c9 docs: describe the refresh runs' working folder and Codex flags, and add the full-project review 2026-10-23 03:42:57 +07:00
tiennm99 30446570c9 Merge branch 'worktree-wf_093aad93-ad0-7' into review-fixes 2026-10-23 03:41:26 +07:00
tiennm99 70e121c3c3 Merge branch 'worktree-wf_093aad93-ad0-6' into review-fixes 2026-10-23 03:41:26 +07:00
tiennm99 8766e656cb Merge branch 'worktree-wf_093aad93-ad0-5' into review-fixes 2026-10-23 03:41:26 +07:00
tiennm99 4b11a31756 Merge branch 'worktree-wf_093aad93-ad0-4' into review-fixes 2026-10-23 03:41:26 +07:00
tiennm99 4f14efe953 Merge branch 'worktree-wf_093aad93-ad0-3' into review-fixes 2026-10-23 03:41:26 +07:00
tiennm99 995173c48f Merge branch 'worktree-wf_093aad93-ad0-2' into review-fixes 2026-10-23 03:41:26 +07:00
tiennm99 e518a96e46 docs: drop unimplemented working-directory and sandbox claims for token-refresh runs 2026-10-23 03:38:41 +07:00
tiennm99 d583e173d2 fix(ui): resize on Ctrl+wheel only after 100 px of gesture travel
A new gesture, including one started by a change of direction, used to
send a full step at once, so a few px of reversed jitter in a touchpad
pinch shrank and grew the bubble back and forth. A new gesture now starts
from its own travel and steps only once that reaches 100 px.
2026-10-23 03:37:38 +07:00
tiennm99 194609732e docs: tell AppImage users to re-enable start at login after upgrading
Releases up to v0.6.0 wrote the AppImage path into the autostart entry
unquoted, so an entry made by them never starts when the path contains a
space, while the menu item still shows it as on. Turning the item off and
on rewrites the entry with the quoted path.
2026-10-23 03:36:27 +07:00
tiennm99 400dc4a550 docs: describe update checks, token-refresh runs and full menu
The README now says the app checks GitHub Releases at first launch and hourly by default, which CLI runs it starts to refresh an expired token, the claude CLI requirement for that refresh, and the Show widget, Restart and Reset position items, plus the stored widget visibility and update check interval.
2026-10-23 03:27:54 +07:00
tiennm99 d6eb773248 fix: show the menu-only tray click hint on Linux
AppIndicator never delivers tray clicks, so the Controls hint on Linux now says a tray click opens the menu instead of toggling the bubble.
2026-10-23 03:27:54 +07:00
tiennm99 a4f8011b26 fix(ui): accumulate Ctrl+wheel travel before resizing the bubble
Every wheel event used to send one resize step, so a touchpad's stream
of small deltas jumped straight to the smallest or largest size. Wheel
travel is now normalised to px and accumulated: the first event of a
gesture gives one step, then each further 100 px gives another. A
200 ms pause or a change of direction starts a new gesture, so one
mouse notch still resizes by exactly one step.
2026-10-23 03:25:37 +07:00
tiennm99 c4ad23236e fix(ui): reserve the weekly percent column at its semibold weight
The tail percent is drawn at weight 600 but its column was measured at
400, so "100%" was clipped at larger bubble sizes. The layout now asks
the measure callback for the weight the text is drawn in.
2026-10-23 03:25:28 +07:00
tiennm99 8328b147d7 fix: keep the diagnose log private in the user's state directory
On Unix the --diagnose log moves from a world-readable file in the temp directory to $XDG_STATE_HOME/usage-monitor/usage-monitor.log (falling back to the cache, then temp, directory), in a 0700 folder owned by the user, with the file at 0600. Windows keeps %TEMP%.
2026-10-23 03:24:27 +07:00
tiennm99 ab81dfd7e2 fix: quote the executable path in the Linux start-at-login entry
The autostart plugin wrote the AppImage path into Exec unquoted, so a path with spaces never started while the menu still showed the item checked. Linux now writes ~/.config/autostart/UsageMonitor.desktop itself, quoting and escaping the path for both desktop-entry layers, and keeps the file name so existing entries still read as enabled.
2026-10-23 03:24:27 +07:00
tiennm99 9d479c822b fix(scheduler): retry failed update checks and follow the wall clock
A failed update check is no longer stamped as the last check. The
scheduler retries it after a delay that starts at a minute, doubles per
failure and is capped at the check interval; a success resets it.

The update deadline is now a unix timestamp, so it is not pushed back by
a sleep. The thread wakes at least once a minute, and when the wall clock
ran more than 30 s ahead of Instant it treats the gap as a resume: it
polls at once and re-arms the poll interval.
2026-10-23 03:22:40 +07:00
tiennm99 37ae0030cb fix(poll): run a follow-up poll for requests made during a poll
A poll asked for while one is running, such as after enabling a provider,
was dropped and left the new bubble empty. It is now queued, and the
worker polls once more before it finishes; repeated requests fold into one
follow-up poll.
2026-10-23 03:22:40 +07:00
tiennm99 0ce64eaa70 fix(alerts): alert again when a new session window crosses a threshold
A stored session window whose reset time has passed, or whose reset time
the provider moved forward by more than a minute, counts as replaced, so
usage in the new window climbs from zero. Small reset-time jitter within
one window still does not re-alert, and the cooldown is unchanged.
2026-10-23 03:22:33 +07:00
tiennm99 7939fa89ff fix(settings): keep valid keys when one value has the wrong type
A wrongly typed value no longer resets every setting: the valid keys are
kept and only the bad ones fall back to their defaults. A file that is not
JSON at all is copied to settings.json.bak before a save can replace it.
2026-10-23 03:22:20 +07:00
tiennm99 d1f48dfb2f fix: keep bubbles and the panel on their own monitor and follow the Linux theme
- Place the details panel inside the work area of the bubble's monitor
  instead of the union of all monitors, so it flips above the bubble
  rather than landing over the taskbar or off-screen in mixed layouts.
- Clamp bubbles into their monitor's work area after a resize and update
  the saved position of bubbles that already have one.
- Snap to the taskbar only when it borders the bubble's work area, so the
  primary monitor's taskbar no longer pulls bubbles on other monitors.
- Follow live theme changes on Linux through the desktop portal's
  SettingChanged signal, since tao's ThemeChanged never reaches a window.
2026-10-23 03:12:45 +07:00
tiennm99 13810a6004 test(usage): cover the provider HTTP paths against a loopback server
The Claude and Codex fetches now take their endpoint URLs as arguments,
with poll supplying the real ones, so tests can point them at the local
one-shot server. The tests pin the current behaviour: usage auth
failures stop before the Messages fallback, server errors and unparsable
bodies fall back to Messages, partial bodies get their reset times
merged, Messages auth failures and missing rate-limit headers are
reported, Codex 401 and 500 map to auth-required and bad-response, and
the account header is sent only when an account id is set.
2026-10-23 03:09:40 +07:00
tiennm99 100cd59194 fix(refresh): run the refresh CLIs from the temp directory
A GUI app starts with its working directory at the home folder, / or
System32, and `codex exec .` refuses to run there because it is not a
trusted directory or repository. Both CLIs now start from the temp
directory so neither runs inside a project or loads its instructions and
hooks, and Codex runs with --skip-git-repo-check in a read-only sandbox.

The orchestrator takes its spawn step as an argument internally, so its
refreshed, timeout and missing-CLI outcomes are now tested with a fake
credential source, along with the locator's source order and the Claude
credential file signature.
2026-10-23 03:09:40 +07:00
tiennm99 9a7cb5afc2 ci(release-legacy): refuse a version not above the live release
Before building, compare the requested version with the tag /releases/latest returns and fail unless it sorts strictly after it. With no published release yet, any version passes.
2026-10-23 03:07:15 +07:00
tiennm99 f7c00893b0 ci(release): run the full CI on the tag before building a release
ci.yml is now callable with a ref to test. The release workflow calls it on the prepared tag and both build jobs wait for it, so a tag whose sources fail tests, lint or the build publishes nothing. A called run gets its own concurrency group and is never cancelled. The release steps now push main and wait for green CI before pushing the tag.
2026-10-23 03:07:15 +07:00
tiennm99 e7031011f3 fix(release): sign the AppImage in its own step, away from the bundler
The AppImage bundler downloads and runs unpinned linuxdeploy tools, so the updater signing key and its password no longer reach the bundle step. A separate step signs the renamed AppImage with tauri signer sign, as the Windows job signs the exe.
2026-10-23 03:07:06 +07:00
tiennm99 452ba60ea5 chore: release v0.6.0 v0.6.0 2026-10-22 17:57:50 +07:00
tiennm99 68d4f84b3e docs: update the TODO for the merge into main 2026-10-22 17:56:54 +07:00
tiennm99 6f3e038d72 docs: drop the finished release dry run from the TODO 2026-10-22 17:42:26 +07:00
tiennm99 09dbf319c3 docs: record that the updater signing secrets are set 2026-10-22 17:32:59 +07:00
tiennm99 687dd41d47 feat: add the updater public key 2026-10-22 17:32:01 +07:00
tiennm99 7e446b6bda feat: keep settings.json next to the portable exe and AppImage
The Windows exe and the AppImage now read and write settings.json in
their own folder, so a copied or moved folder keeps its settings. A .deb
install still uses the user's config folder, because it lives in a
read-only system folder.
2026-10-22 17:05:04 +07:00
tiennm99 6afd603d5e refactor: rename the project to usage-monitor
Rename the crate, binary, product name, identifier, settings folder, log
file, autostart entry, user agent, updater endpoint and release assets.
Legacy Win32 clients still update: they fall back to the first .exe asset,
and the legacy rollback workflow reads the package name from the ref it
builds. Upgraded installs start with default settings.
2026-10-22 16:59:32 +07:00
tiennm99 88d39feeb1 docs: add the remaining release steps for the Tauri port 2026-10-21 21:28:18 +07:00
tiennm99 909013789b fix: keep updater plugin debug logs, which include the proxy URL, out of the diagnostic log 2026-10-21 19:38:59 +07:00
tiennm99 65d667b5e1 fix: accept CRLF checkouts when patching the legacy release lockfile version
Git for Windows checks Cargo.lock out with CRLF endings on the windows-latest runner, so the whole-line sed and grep anchors matched nothing and the rollback build stopped at its own check. The patterns now allow a trailing CR and keep it, and the check runs on a CR-stripped copy.
2026-10-21 19:30:07 +07:00
tiennm99 747de03eb2 fix: send update checks and downloads through a SOCKS environment proxy
The updater left an environment proxy to the plugin's reqwest, which was
built without SOCKS support, so a SOCKS ALL_PROXY broke updates and, on
Windows, displaced a working system proxy. Enable reqwest's socks feature
and pass the chosen environment or system proxy to the plugin explicitly.
2026-10-21 19:22:02 +07:00
tiennm99 2e13618837 docs: add the cross-platform framework research and final port review reports 2026-10-21 19:10:54 +07:00
tiennm99 c7ddf71797 docs: plan the usage-monitor rename and sync the Tauri port plan status
The rename is decided, so it moves from ROADMAP.md to its own plan. The port
plan now marks phases whose code is done but await manual checks or user
actions as in-progress, and records the Windows autostart and update-apply
deviations.
2026-10-21 19:10:54 +07:00
tiennm99 1afb0f6981 ci: keep checkout tokens off disk in release builds and patch the legacy lockfile instead of re-resolving it
The release build jobs run npm install scripts, so their checkouts no longer persist the token in .git/config. The legacy rollback sets the new version on the package's own Cargo.lock entry instead of running cargo update, so the --locked build resolves nothing and fails if the lockfile differs in anything else.
2026-10-21 19:02:49 +07:00
tiennm99 2c1d10c47f fix: route SOCKS environment proxies through ureq's socks-proxy support
Clash and v2ray set ALL_PROXY=socks5h://..., which ureq reads before
HTTPS_PROXY. Enable the socks-proxy feature so that entry is used instead
of skipped, and cover a socks5h tunnel with a fake SOCKS5 server.
2026-10-21 18:50:57 +07:00
tiennm99 6407e49499 docs: say only the Tauri release workflow checks the updater public key 2026-10-21 18:10:50 +07:00
tiennm99 fa889c176a docs: pin the release dry run to a branch carrying the Tauri workflow 2026-10-21 18:00:29 +07:00
tiennm99 08e61e6755 docs: refresh Cargo.lock in the release dry-run steps 2026-10-21 17:52:56 +07:00
tiennm99 13fae90fd8 docs: record the cleanup and docs status and the open parity checks 2026-10-21 17:45:00 +07:00
tiennm99 2671d5d89e docs: cover the version source, signing-key custody, dry run and legacy rollback in the release process 2026-10-21 17:45:00 +07:00
tiennm99 37aa3cd2be docs: document Linux support, the WebView2 requirement and the Tauri build in the README 2026-10-21 17:45:00 +07:00
tiennm99 fdf30ac005 docs: describe the credentials path for every OS in the local credentials reader 2026-10-21 17:45:00 +07:00