Commit Graph
149 Commits
Author SHA1 Message Date
tiennm99 995173c48f Merge branch 'worktree-wf_093aad93-ad0-2' into review-fixes 2026-10-23 03:41:26 +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
tiennm99 9a9b01ff07 ci: scope the updater signing key to signing steps and split the legacy publish job
The signing key moves from job-level to step-level env, so npm install scripts, setup actions and crate build scripts never see it. Linux compiles without the key and signs in a separate tauri bundle step. The legacy rollback builds and signs under a read-only, unpersisted token with the locked Tauri CLI, and a separate job holds the write token to publish.
2026-10-21 17:29:56 +07:00
tiennm99 81f29f2e4f ci: publish only plain vX.Y.Z tags so suffixed dry-run tags stay drafts 2026-10-21 17:19:23 +07:00
tiennm99 e712978ff6 docs: record the release pipeline status and legacy-client checks 2026-10-21 17:11:57 +07:00
tiennm99 6c7771e04c docs: describe the release assets, their name contract and the residual update risk 2026-10-21 17:06:21 +07:00
tiennm99 94019a13a3 ci: add a Windows-only legacy release workflow for rollback 2026-10-21 17:06:05 +07:00
tiennm99 435797ad91 ci: release a signed Windows exe, Linux AppImage and deb with latest.json 2026-10-21 17:06:05 +07:00
tiennm99 14bdf95bc0 ci: add a yamllint config for the workflow files 2026-10-21 17:06:04 +07:00
tiennm99 51d20b16b1 build: generate the updater latest.json and guard the release asset set 2026-10-21 16:58:48 +07:00
tiennm99 94722f2741 ci: refuse a release while the updater public key is empty 2026-10-21 16:45:27 +07:00
tiennm99 4918a5e3bd docs: note the green CI run for the updater 2026-10-21 16:35:20 +07:00
tiennm99 2397d48682 docs: record the updater status and decisions 2026-10-21 16:27:07 +07:00
tiennm99 31cca4cdda build: refuse a signed build that lacks the updater public key
With TAURI_SIGNING_PRIVATE_KEY set, the build script now requires a
non-empty plugins.updater.pubkey (from tauri.conf.json or a --config
override). A release without it could never verify, and so never install,
a later update.
2026-10-21 16:24:35 +07:00
tiennm99 d5fe3d8f27 feat: check and apply updates through the Tauri updater plugin
The plugin fetches latest.json and downloads the platform entry, verifying
its minisign signature. The suffix-ignoring version comparison moves to
core::version and drives the plugin comparator; a manifest without an entry
for this platform counts as up to date. The Windows portable exe swaps
itself in with self_replace, an AppImage goes through the plugin install,
and both relaunch with --updated-to. A package-manager install keeps
checking but greys the apply item.

The GitHub API lookup, the WinHTTP download and the --apply-update helper
are gone, along with the sha2 dependency they needed.
2026-10-21 16:24:32 +07:00
tiennm99 43e0d825a7 docs: record the fullscreen auto-hide status and decisions 2026-10-21 16:02:18 +07:00
tiennm99 8d7a07b237 feat: hide the bubbles while another app is fullscreen
A 1.5 s thread asks the platform whether the foreground window is a
fullscreen window of another process and feeds the result through the
visibility state machine. Windows keeps the proven evaluation with an
own-process check in place of the bubble class check; Linux reads the
EWMH active window state over X11; native Wayland and macOS report false.
2026-10-21 15:58:02 +07:00
tiennm99 9c7ade8ea3 fix: reload the panel for browser keys only after its first page load 2026-10-21 15:44:00 +07:00
tiennm99 388305de04 docs: record the details panel status and decisions 2026-10-21 15:34:01 +07:00
tiennm99 2180efaf85 feat: draw the details panel from the payload and suppress webview shortcuts 2026-10-21 15:29:26 +07:00
tiennm99 768fb1e4ab feat: toggle a details panel window from bubble clicks with focus dismissal and live refresh 2026-10-21 15:29:26 +07:00
tiennm99 e805f8de8f fix: keep the dark default on Linux when the portal states no theme preference 2026-10-21 15:12:40 +07:00
tiennm99 1370c15048 fix: size reset bubbles for the primary monitor before placing them 2026-10-21 14:57:42 +07:00
tiennm99 0d35c87d1e docs: record the bubble window and UI status and decisions 2026-10-21 14:44:04 +07:00