Commit graph

2016 commits

Author SHA1 Message Date
Resham Joshi
5ffd4a7200
Merge pull request #1228 from getagentseal/feat/windows-capacity-dock
feat(windows): Capacity Dock, an edge-docked quota rail
2026-09-03 05:24:38 -07:00
iamtoruk
378062ebc2 Merge remote-tracking branch 'origin/main' into feat/windows-capacity-dock 2026-09-03 05:16:32 -07:00
iamtoruk
972e3b8a3d docs: stop three telemetry disclosures contradicting themselves
The onboarding screen, the privacy settings and the README each said the
daily report includes the names of the models, tools, skills and MCP
servers in use, and then in the next breath that it never includes
anything identifying. A server named after an employer is identifying,
so the second half was not true. All three now use the wording the tray
notice already had, which names what is withheld rather than claiming
more than the product does: never your prompts, your code, or your
project and file names.
2026-09-03 04:52:31 -07:00
iamtoruk
9640cdd9c7 fix(app): remember a pending restart across a desktop app restart
The reboot-pending flag lived in memory with a comment claiming the
restart it waits for also clears it. Quitting the desktop app and
opening it again cleared it too, and that is not the restart being
waited for, so the next launch started the old tray binary under the new
version's name, which is the confusion the flag exists to prevent.

It is saved as a timestamp now and read back by comparing it against
when Windows last booted, so only a real restart clears it. The test
that asserted the old behaviour crossed the boundary by restarting the
app; it now moves the boot time, and a second test covers restarting the
app without restarting Windows.
2026-09-03 04:52:31 -07:00
iamtoruk
7b2a6df333 fix(quota): guard both exits, and outlast the request being guarded
Two doors still skipped the credential drain. A closed pipe, which is
how `codeburn quota | head` ends, exited straight from the stdout error
handler; it drains first now, and resolves immediately for every command
with nothing outstanding. A throw from any provider left through the
same door as success without draining at all; the drain moved into a
finally, so one provider failing cannot strand another's rotation.

The drain also waited fifteen seconds for a request allowed thirty, so a
grant answering at twenty was abandoned by the very guard built for it.
The wait is now derived from the request timeout plus a margin, so the
two cannot drift, and giving up says so on stderr instead of leaving the
user to discover it the next time that provider asks them to sign in.
2026-09-03 04:52:31 -07:00
iamtoruk
ff2ba5c94a fix(app): typed IPC patches, the staged-msi flag, and honest consent copy
- Tray preference patches from the window were used with `in` before
  any type check; every patch handler now refuses anything that is not
  a plain object.
- The tray install passes `--staged-msi <path>` to the CLI instead of
  an environment variable.
- A timeout or a missing CLI no longer counts as a declined install,
  so it is retried at the next launch; only a cancelled prompt is
  remembered. After msiexec reports a pending restart the old binary is
  not launched, and the sidebar says a restart finishes the install.
- The telemetry opt-in event fired before the toggle was applied and
  could never be sent; it fires after a successful write.
- The ARM64 installer carries the x64-named tray, since the CLI accepts
  only that asset name; the distribution notes say so plainly.
- The README, the onboarding screen and the privacy settings say that
  the daily report includes the names of the models, tools, skills and
  MCP servers in use, and the renderer's fallback builder reports zero
  turns as zero.
2026-09-03 03:06:13 -07:00
iamtoruk
d84769edfe fix(cli): drain credential writes before exit, a staged-msi flag, a zero bucket
- codeburn quota could still exit with a rotated Codex token in flight:
  the command ended with process.exit and the per-provider abort could
  cut the grant after the server had rotated. The refresh stays, since
  the usage endpoint rejects an expired access token, and every rotation
  registers itself; the command awaits outstanding credential writes,
  bounded to fifteen seconds, before it exits. Tests abort mid-grant and
  time the provider out and still find the new token on disk.
- CODEBURN_MENUBAR_MSI let one environment variable send msiexec at any
  file whose checksum the same party wrote. It is replaced by
  `codeburn menubar --staged-msi <path>`, which must be absolute,
  resolved, named as the release asset, inside a resources\menubar
  directory whose grandparent holds CodeBurn.exe, a regular file with a
  regular .sha256 beside it; the variable is refused with the reason.
- countBucket(0) reported one to ten turns for a model with none. Zero
  is its own bucket.
2026-09-03 03:06:13 -07:00
iamtoruk
d7f24d6cba fix(windows): the dock lands where it was dropped and never fails open
- A rail dropped while expanded reappeared elsewhere: the drop
  normalised against the live rail's travel while layout denormalised
  against the resting one, 71 px of drift at four rows on this work
  area. The drop now walks back to the resting start the rail grew
  from and normalises over the resting travel; a test drops an
  expanded rail and asserts it lands exactly where it was released.
- The click-through state was set before the call that applies it and
  a failure was discarded, so one failed call left an always-on-top
  window hit-testable forever. The state records only a successful
  call and the next tick retries; the same fail-open in begin_drag is
  fixed.
- Any button held anywhere on the desktop pinned the poll at 62 Hz;
  only a press that began on the rail counts now.
- The dock state file the desktop app also writes is replaced through
  a temp file and rename.
- The consent notice and the settings hint say that the daily report
  includes the names of the models, tools, skills and MCP servers in
  use, as the owner decided, and no longer claim more than that.
2026-09-03 03:06:12 -07:00
iamtoruk
c79a25715c fix(windows): tray telemetry off the UI thread, bounded, and Linux-clean
- The non-Windows random fill read /dev/urandom with fs::read, which
  never returns on a character device, and had a borrow error beside it
  that failed clippy on the ubuntu leg. It opens the device and reads
  exactly sixteen bytes, keeping the fallback; the reader is compiled
  for tests on Windows too, and the Linux target was checked from an
  extracted copy with clippy against x86_64-unknown-linux-gnu.
- The telemetry commands were synchronous and every tracked event
  rewrote the whole queue file. They are async now and the save is
  debounced by two seconds, with a save before each flush and on quit.
- The queue is capped by bytes as well as count, drops events older
  than seven days on load, backs off exponentially with jitter from
  five to thirty minutes while the endpoint fails, and keeps an
  in-flight batch in the file until it lands so app_close can no
  longer overwrite it.
- One reqwest client for the process, a 0600 queue temp file on Unix,
  the hidden window station warning in the release log, and
  open_terminal_command limited to a named read-only subcommand.
2026-09-03 03:06:12 -07:00
iamtoruk
91706484d6 feat(windows): consent-gated telemetry from the tray app and the Capacity Dock
The tray had no telemetry. It now sends the same envelope as the desktop
app to the same endpoint, with app name codeburn-menubar. Consent comes
from the desktop app's telemetry state file when that app is installed,
so one decision covers both apps and events share one anonymous id;
otherwise the tray asks once, defaulting off for EU, EEA, UK and Swiss
locales and for an unknown locale, and keeps its own toggle under
Settings, General, Privacy. Switching off rotates the id.

Events, all name-only or bucketed: app_open, app_close with session
minutes, popover_open, settings_open with the pane, update_click with
the action, glance_open, dock_enabled and dock_disabled with the edge
and a scale bucket, dock_provider_switch, dock_drag_end with the edge,
and the CLI's usage_snapshot once a day, skipped when the desktop app is
the consent source so nothing is counted twice. The queue persists under
the app's local data directory, capped at two hundred events, and flushes
every five minutes and on quit; a 4xx drops the batch, anything else
keeps it. Debug builds never send.
2026-09-03 01:18:23 -07:00
iamtoruk
2b06a3a5e4 feat(app): send the CLI's telemetry snapshot and a few interaction events
The daily usage_snapshot event now carries the payload's
telemetrySnapshot verbatim, with the old renderer builder kept as the
fallback for an older CLI. Five name-only events join it: optimize_apply
with the fix kind, plan_set with the provider, export with the format,
compare_view with the two models, and settings_change with the setting
and its enum or boolean value.

The props sanitizer had allowed one level of arrays of flat objects and
would have stripped the snapshot's nested model and task rows; it walks
plain objects recursively now, five levels deep at most and a thousand
leaves per event, leaves still short strings, finite numbers and
booleans only. The README gains a Telemetry section listing every event
and field and how to turn it off.
2026-09-03 01:18:23 -07:00
iamtoruk
e3dd333949 feat(cli): an anonymised daily telemetry snapshot inside the menubar payload
The desktop app and the Windows tray both send a once-a-day usage
aggregate when the person has opted in. Each built its own, which meant
two schemas to keep honest. The CLI now computes one snapshot at the end
of the menubar payload and both apps send it verbatim.

Everything is bucketed and name-only: cost and count buckets, up to
eight models each with its top six task categories and their share of
turns, twelve categories with their top models, providers, MCP servers,
skills and tools by identifier with call buckets, a session count and
median length bucket, and cache hit and retry tax shares to two
decimals. Nothing derived from paths, project or branch names, or
message text can enter it; the builder only emits primitives and capped
containers. The raw model by task cross rides in through the options
bag and never lands in the payload itself.
2026-09-03 01:18:22 -07:00
Resham Joshi
3517f7c928
Merge pull request #1245 from getagentseal/fix/parity-idle-seconds
test(menubar): ignore idleSeconds in the payload parity check
2026-09-03 00:43:23 -07:00
iamtoruk
058bd57808 build(app): an ARM64 Windows installer that actually contains the program
7-Zip compresses ARM64 executables with its ARM64 branch filter by
default. The decoder inside the NSIS installer predates that filter, so
extraction dropped every .exe and .dll while the data files landed, and
the installer exited zero with no program in the directory. A new
package:win:arm64 script pins the BCJ filter through the electron-builder
override, and the distribution notes say why.
2026-09-03 00:01:35 -07:00
iamtoruk
7d4c86bc82 fix(app): seed launch at login again after reinstalling the tray
The Run value was seeded once per machine. Uninstalling the desktop app
removes the tray and, with it, the Run value; reinstalling put the tray
back but the seeded flag survived in the companion settings, so launch
at login was silently off afterwards. A tray app the current launch has
just installed now seeds the value as a first run does.
2026-09-03 00:01:34 -07:00
iamtoruk
f03a3133e2 build(app): allow a slow Electron start in the CLI staging smoke test 2026-09-03 00:01:34 -07:00
iamtoruk
9eafaefbfa fix(app): the desktop uninstaller really removes the tray it installed
Two faults in the uninstall hook, found by running it for the first time:

- NSIS has no doubled-quote escape, so the '' written for PowerShell's
  single quotes ended the NSIS string at the first one. The plugin got a
  truncated command PowerShell could not parse, and the hook silently
  did nothing: uninstalling the desktop app left the tray, its Run value
  and its marker behind. Each inner quote is now the NSIS escape.
- An upgrade runs the previous version's uninstaller first, with the
  updated flag, and the hook removed the tray there too, so every desktop
  upgrade uninstalled the tray and reinstalled it with an elevation
  prompt. The hook now leaves the tray alone during an upgrade.
2026-09-03 00:01:34 -07:00
iamtoruk
25a778cef2 test(menubar): ignore idleSeconds in the payload parity check
The parity test builds the payload twice over the same warm cache and
expects the two to match. Since liveSessions landed, each session
carries idleSeconds, whole seconds since its last activity, so two
builds that straddle a second boundary differ by one and the test
fails at random. Seen on the macOS runner. stableShape now zeroes it
the way it already blanks the generated stamp.
2026-09-02 23:18:34 -07:00
iamtoruk
8c8783c442 test(menubar): ignore idleSeconds in the payload parity check
The parity test builds the payload twice over the same warm cache and
expects the two to match. Since liveSessions landed, each session
carries idleSeconds, whole seconds since its last activity, so two
builds that straddle a second boundary differ by one and the test
fails at random. Seen on the macOS runner. stableShape now zeroes it
the way it already blanks the generated stamp.
2026-09-02 23:18:21 -07:00
iamtoruk
7e0d1eca6e docs: the Microsoft Store is the Windows install, GitHub builds are a preview
The Store package is signed at submission and updates itself. The tray
.msi under windows-v* and the desktop setup exe are a developer preview:
unsigned, SmartScreen warns on first run, and they do not update
themselves; the tray app reports a newer version and links to it. Said
in the README, the distribution notes, the tray development notes and
the release body.
2026-09-02 23:09:36 -07:00
iamtoruk
00403c9152 feat(windows): report updates and point at GitHub instead of installing them
Outside a Store package the tray app no longer runs `npm install -g
codeburn@latest --force` and `codeburn menubar --force` on one click.
The MSI is unsigned and its checksum is published in the same release,
so an automated install has nothing to verify; a manual install at
least passes through SmartScreen. The check still runs and reports a
newer version, the badge and About now open the windows-v* release
page, and the manual command is shown as copyable text. Inside a Store
package the checker stands down as before. One-click install returns
once the MSI is signed and the installer verifies the signature.
2026-09-02 23:09:36 -07:00
iamtoruk
d9020a66e8 test(app): let the CLI launcher suite pass off Windows
companionDataDir only honoured LOCALAPPDATA when it began with a drive
letter, so the POSIX sandbox path the test hands it fell through to the
home fallback on Linux and macOS. It now takes any absolute path in the
Windows sense, which a drive path and a rooted path both are. The
launcher expectations join with the host separator instead of spelling
out backslashes, so the same assertions hold on every runner.
2026-09-02 22:20:51 -07:00
iamtoruk
902253e18b chore(app): tidy a comment in the Codex quota reader 2026-09-02 22:11:49 -07:00
iamtoruk
5b15718058 fix(app): the tray companion works with only the desktop app installed
- The tray resolves codeburn from PATH and the npm locations and never
  saw the CLI the desktop app bundles, so a machine with only the
  desktop app had a tray with nothing to run. The desktop app now writes
  a launcher that runs its bundled CLI through its own executable,
  records the path in the tray settings, and the tray's resolver takes
  it after PATH and before giving up; a global codeburn still wins. The
  first launch also gets CODEBURN_BIN in its environment.
- Four IPC handlers for tray preferences and launch at login had no
  platform check and would have touched Windows files or reg.exe on a
  Mac; they return neutral values off Windows.
- The install probe ran on every launch and a declined UAC prompt came
  back at the next one. A declined or failed staged version is recorded
  and not retried until the version changes or the user flips the
  switch, and a matching installed version skips the probe.
- Launch at login in the Store build is managed by Windows through the
  package's startup task; the switch said otherwise and did nothing.
  That build now says so and opens the Startup Apps page.
- Settings files the tray reads were truncated and rewritten in place;
  they are written to a temp file and renamed over.
- DISTRIBUTION.md records that the installer's staged tray and the
  windows-v* release asset at the same version are separate builds.
2026-09-02 22:10:37 -07:00
iamtoruk
22218b12ea fix(app): keep the sidebar links on macOS and Linux
The tray switches took the sidebar corner on Windows and the social
links moved to About, but the switches render nothing off Windows, so
Mac and Linux users lost the row and gained nothing. The links are back
there on every platform but Windows.
2026-09-02 22:10:37 -07:00
iamtoruk
e01a15a515 fix(app): actually kill the CLI process tree on Windows
taskkill only ran for children spawned through the .cmd shim, and the
shipped desktop build runs the bundled CLI through Electron's node, so
it never ran at all and provider subprocesses were orphaned on every
stop. On the shim route it was also fire-and-forget followed by killing
the top of the tree, which reparents the children before taskkill can
find them. Every Windows child now goes through taskkill /T /F from
System32 and the handle is only ended if taskkill fails.
2026-09-02 22:10:37 -07:00
iamtoruk
ae1b2d797c fix(app): persist a rotated Codex refresh token in the desktop quota reader
The desktop app's Codex quota reader is a copy of the CLI's and carried
the same fault: two await points between parsing the token grant and
writing auth.json, a rotated refresh token dropped when the grant had no
access token or the file could not be re-read, a silent failed write,
and the caller's abort passed into the grant request. Ported the CLI
fix so the two files match apart from import specifiers.
2026-09-02 22:10:37 -07:00
iamtoruk
e95ea95769 fix(windows): private key files, a real log, and a clean uninstall
- On Linux provider keys were written under the plain umask despite a
  comment promising owner-only permissions. The directory is created
  0700 and the file 0600, the temp file before the rename too, and the
  plain-text fallback is stated where it lives, including in the
  settings pane copy.
- A release build has no console, so every eprintln wrote into nothing.
  A small logger appends timestamped lines to codeburn.log under the
  app's local data directory, rolls at 256 KB, and keeps stderr in
  debug builds. All call sites use it.
- Uninstall left the launch-at-login Run value pointing at a deleted
  exe, so Windows errored at every login. A WiX fragment removes that
  one value on a real uninstall, not on upgrade. User data under the
  config directory is kept on purpose and the fragment says why.
- The webview CSP allowed a host nothing in the page contacts.
- The updater's verification site now states its trust boundary: the
  hash and the MSI come from the same release, so the check proves
  transfer integrity only. Signing is a release decision.
2026-09-02 15:16:06 -07:00
iamtoruk
79b2d7731b fix(windows): the dock survives a fast toggle and never blocks clicks
Four dock bugs and one Linux gap:

- A fast off/on toggle destroyed the fresh window. Hiding bumped a
  dismiss generation but the page's close request ignored it, so the
  retract that finished after the next show tore down the reused window.
  The generation now travels through the dismiss handshake and a stale
  close is ignored; the page also replays its entrance on a new present.
- The pointer tracker could exit and never restart, and a reused or
  rebuilt window got none, leaving a transparent always-on-top window
  that swallowed every click. A running flag and a drop guard respawn
  it, a panic costs one tick, and the window is created click-through
  so no path leaves it hit-testable.
- A layout request during a drag snapped the rail out from under the
  pointer. Requests are kept and deferred until the drop settles.
- Pointer polling ran at 62 Hz whenever the dock was on. It now polls
  at 62 Hz only while engaged or within 120 px, 25 Hz to 600 px, and
  8 Hz beyond, about an 87 percent cut at an idle desktop.
- On Linux the dock could be switched on and produce a window nothing
  ever made click-through. It is unavailable there now and reports off.

Error output in these files goes through the tray's log file instead
of a stderr a release build does not have.
2026-09-02 15:16:06 -07:00
iamtoruk
6998c5ac07 fix: keep macOS and Linux path behaviour exact in guard flags and Hermes
Two of today's Windows fixes changed POSIX results. Guard flags counted
a backslash as a directory boundary on every platform, where it is an
ordinary filename character off Windows; it now counts only on win32,
while a forward slash counts everywhere so POSIX-shaped provider paths
still match on a Windows host. Hermes accepted drive-letter paths as
real workspaces on every host on the theory that a state.db can be read
on another machine; discovery is strictly local and the ledger contract
rules out restored databases, so that acceptance is Windows-only again.
2026-09-02 15:11:01 -07:00
iamtoruk
a6005df140 fix(quota): persist a rotated Codex refresh token before anything can exit
The quota command races every provider read against a five second
timeout and exits as soon as output is written. The Codex read refreshes
the OAuth grant, and between parsing the grant and writing auth.json
there were two await points, so a timeout or the exit could land with
the old refresh token already retired server-side and the new one only
in memory, signing the user out of Codex. A rotated token was also
dropped when the re-read of auth.json failed or when the grant carried
no access token, and a failed write looked like a network error.

The persist path is now synchronous from the parsed grant to the atomic
rename, keeps the credential file's own private mode, falls back to the
in-memory document when auth.json cannot be re-read, persists a rotated
refresh token even without an access token, reports a failed write on
stderr, and the grant request no longer honours the caller's abort so a
rotation the server has committed cannot be cancelled mid-response.
2026-09-02 15:11:01 -07:00
iamtoruk
dc802f545d fix(windows): make codeburn menubar safe beside the desktop app
Three gaps in the Windows route of `codeburn menubar`:

- A Microsoft Store install of the desktop app carries the tray inside
  its package and never appears in the uninstall registry, so the CLI
  downloaded and installed a second copy into Program Files. The Store
  package is now detected first (Get-AppxPackage, bounded to five
  seconds, any failure reads as "not a Store install") and its packaged
  exe is launched instead; --force still installs the MSI and says the
  Store copy is left in place.
- msiexec ran over a running tray. Windows Installer defers the file
  swap to the next reboot in that case, so the post-install launch woke
  the old process. The running tray is now asked to quit through its
  own single-instance protocol, waited for, and killed only as a last
  resort, before msiexec runs.
- The ownership marker was written only on the desktop route, so a
  hand-installed tray could later be credited to the desktop app and
  removed by its uninstaller. The CLI route now records "manual", and
  an existing verdict is never rewritten.
2026-09-02 15:08:52 -07:00
iamtoruk
2e62206bf5 ci: rebuild the Windows installers on tray changes and tag the Store build
Both installer workflows ship the tray app now, so a change under
windows/ must rebuild them. The Store workflow also runs on a desktop-v*
tag, so the NSIS installer and the Store package for a version come from
the same commit.
2026-09-02 14:54:18 -07:00
iamtoruk
c503e1a089 ci: run the CLI suite on macOS and Windows as well as Linux
The CLI ships to macOS and Windows users and the Windows tray app
depends on it, yet the suite only ever ran on ubuntu-latest in CI. One
job per platform on the newest Node 22, without the Linux-tuned serial
lock step. The Windows run uses three workers because the suite spawns
the CLI through tsx often and a runner falls over under the default
worker count.
2026-09-02 14:50:34 -07:00
iamtoruk
1fdd8eb43c fix(app): stage the MSI a local Tauri build actually writes
Tauri names the bundle after productName, so `tauri build` leaves
`CodeBurn Menubar_<version>_x64_en-US.msi` with a space. GitHub rewrites
that space to a dot on release upload, which is the form the CLI
installer, the Electron side and the tray updater all match. The staging
script only knew the dot form, so the installer workflow built the tray
and then failed with "no CodeBurn.Menubar_<version>_x64_en-US.msi".

It now accepts both and stages the dot form, so a local build and a
downloaded release produce the same shape.
2026-09-02 14:40:41 -07:00
iamtoruk
f3b98263e6 ci: build the tray app before packaging the Windows installers
The NSIS and Store workflows stage the Tauri tray into the desktop
package, but nothing in those workflows built it, so staging failed with
"no source directory" on every run. Both now install the Rust toolchain
and build the tray first: the installer needs the MSI bundle, the Store
package only the exe.
2026-09-02 14:28:08 -07:00
iamtoruk
d1d922e741 test(quota): write credential fixtures with private permissions
readSecureFile rejects a login file with group or world bits on POSIX,
which is right for a real login. The Grok and Z.ai fixtures were written
with default permissions, so on Linux the product refused them and six
assertions saw transientFailure or disconnected. Windows has no mode bits
to check, which is why the branch only ever passed there.
2026-09-02 14:28:08 -07:00
iamtoruk
0560d5a5bd fix(windows): clear the clippy errors that fail the tray CI on both platforms
The DPAPI calls took `&mut input` for a blob they only read, the dock's
payload command has one argument more than clippy's default limit, and
the Linux leg compiles the Windows-only dock, session and tray-status
code without calling it, which tripped 25 dead-code lints under
`-D warnings`. Dead-code lints now apply on Windows only, where every
function is reachable.
2026-09-02 14:28:08 -07:00
iamtoruk
62cb4f8630 test: isolate the real home on Windows and make the CLI suite pass there
os.homedir() reads USERPROFILE on Windows and never HOME, so the
isolation setup and every test that moved home were still resolving the
developer's real home directory. Fixtures came back empty, real sessions
leaked into counts, and the code under test wrote plans, receipts and a
sync ledger into the real ~/.config/codeburn during a run.

USERPROFILE now joins the redirected variables and a shared setHome()
helper moves HOME and USERPROFILE together; every spawn env carries both.
The remaining Windows-only failures were POSIX-shaped fixtures: chmod
tricks that only toggle a read-only attribute on NTFS, pid 1 as an
always-alive lock holder, splitting paths on '/', bare tar, mode-bit
expectations, and per-file timeouts too short for the cost of a tsx spawn.
Each gets a platform-aware equivalent so nothing is skipped on Windows and
the POSIX branches stay byte-for-byte what they were.

Full run on Windows: 267 files passed, 2 skipped, 3592 tests passed.
2026-09-02 13:43:57 -07:00
iamtoruk
673d7f2b21 fix(windows): nine Windows path and process bugs the CLI tests exposed
Making the CLI suite honest on Windows turned up product bugs that
POSIX never reaches:

- plugins: a bare `tar` resolves to Git for Windows' GNU tar, which reads
  a drive letter as a remote host and fails on every absolute path. The
  installer now prefers the bsdtar Windows ships in System32.
- antigravity statusline: the hook command was written with POSIX
  backslash escapes, which cmd.exe does not understand, so the installed
  path was broken for real Windows users.
- act undo: renaming a directory over an existing one raises EPERM on
  Windows, not ENOTEMPTY, so the snapshotted-destination retry never ran.
- parser: a worktree's main repository path was sliced from the
  slash-normalized copy of the gitdir, so it never matched session cwds.
- dashboard: home-relative project labels compared a slash-normalized
  path against an unnormalized homedir(), so no Windows path shortened.
- guard flags: a POSIX-shaped flag path from provider data never matched
  a subdirectory because the boundary check used the host separator only.
- claude desktop sessions: the discovery memo omitted homedir() from its
  key and served the previous home's paths once home moved.
- copilot: a JetBrains file:///C:/... URL kept its URL slash ahead of the
  drive letter, so the project's .git walk never resolved.
- hermes: a state.db written on another platform records that platform's
  path shape, so both absolute forms now count on every host.
2026-09-02 13:43:57 -07:00
Resham Joshi
500412aa88
Merge pull request #1235 from avs-io/codex/provider-reconciliation-races
Some checks are pending
CI / semgrep (push) Waiting to run
macOS Menubar CI / test (push) Waiting to run
Tests / test (22) (push) Waiting to run
Tests / test (22.13.0) (push) Waiting to run
Tests / desktop (push) Waiting to run
Join provider refreshes and prevent scoped false zeros
2026-09-02 11:51:30 -07:00
Resham Joshi
3376d764e6
Merge pull request #1234 from avs-io/codex/provider-core-contract-repair
Repair provider usage and Hermes cost contracts
2026-09-02 11:50:56 -07:00
Resham Joshi
0cfcccc10f
Merge pull request #1241 from getagentseal/fix/1239-model-grouping
fix(models): group Trend rows and the models command by the same display name
2026-09-02 11:49:23 -07:00
Resham Joshi
5a3484c25d
Merge pull request #1240 from getagentseal/fix/wordmark-shimmer-vanish
fix(menubar): keep the wordmark filled under the shimmer and slow the sweep
2026-09-02 11:49:17 -07:00
iamtoruk
3b60b724fe fix(models): group Trend rows and the models command by the same display name (#1239) 2026-09-02 10:40:39 -07:00
iamtoruk
f0f0ed8874 fix(menubar): keep the wordmark filled under the shimmer and slow the sweep
The letters were only visible through the animated gradient's mask, so any
frame where the mask or gradient was not laid out yet blanked the name at
random. The text now carries a static flame fill under the sweep, which can
only brighten it, and the sweep runs 4 s each way instead of 1.5 s.
2026-09-02 10:34:11 -07:00
iamtoruk
9e2f140c91 fix(windows): a second launch no longer hangs the tray app or its callers
The single-instance plugin hands a second launch over with a synchronous
SendMessage, so that launch sits inside it until the running app's callback
returns. When the message landed while the first launch was still in setup,
the callback showed the dock from inside a nested message pump, waited on an
event loop that was not running yet, and never returned; every launch after
it, the desktop app's --quit included, blocked behind the same message and
piled up as processes with no windows.

The callback now only records the request and carries it out from the event
loop. The desktop companion also waits, briefly, for a quit it has just sent
to finish before starting the tray app again, because a launch that arrives
while the old process is still going hands its request to that process and
exits with it.
2026-09-02 10:01:57 -07:00
iamtoruk
c131309090 feat(windows): the Capacity Dock hover panel becomes a glance
Port of 53c5c7b3 onto the Windows dock. The panel was a list of quota
bars; it is now a glance, in the mac's blocks and in its order: a
provider header, the sessions running right now as pills with their
context gauges, a Today strip, and a row of quota-window percentages,
separated by hairlines. The connection states, the Connect button and
the footer lines the CLI can still answer honestly stay where they were.

A percentage is its own gauge now rather than a bar beside a label: dim
glyphs with the value's severity colour filling them left to right and
wiped off on a slant. The mac solves that edge in points against a
measured text box, so the run gets a box of its own here and the clip is
written as a share of its width plus the slant in pixels; a run centred
in a wider column would otherwise be wiped from the column's edge and
read as fully coloured at half its value. The glance ramps at 70, 80 and
90 rather than the rail's 50, 75, 90, so a healthy row reads as text
rather than as a wall of colour.

Every block carries its own padding and an explicit content height, all
whole pixels at any detail scale, because the window Rust sizes around
the card is measured from what the page drew. Hairlines are overlays for
the same reason: a rule must not add a pixel the measurement did not
reserve. Whichever block ends the card carries the closing inset, which
is the rule the mac's own windowsHeight bakes in.

Three deliberate differences from the Swift, all noted where they are:
the connection lines take the same side inset as every other block
rather than sitting flush to the bubble edge; a disconnected provider
keeps the sign-in guidance the existing bubble had, which the mac's
glance drops; and the footer stays, since the mac reads freshness off
its own adapters and `codeburn quota --format json` does not carry it.
2026-09-02 08:44:43 -07:00
iamtoruk
1b33c9c474 feat(windows): cache the Capacity Dock's glance data in Rust
The dock's hover bubble is about to draw the sessions running right now
and today's totals, both of which live in the menubar payload. The dock
is a window with no payload of its own, and the popover's fetch_payload
already runs the CLI for the same answer, so a second spawn on the dock's
own timer would double the cost of every refresh for one bubble nobody
may be looking at.

So the slice the bubble needs is kept in AppState as each payload goes
past: the liveSessions block passed through untouched, and today's
totals from the one request key whose current block really is today's
(today, all providers, local scope, no day pick). A week's numbers under
a heading that says Today would be a lie, which is why the key is
checked rather than the period alone.

Only a glance that actually moved is broadcast on codeburn://glance, so
a poll that found the same sessions costs the dock no render, and a
payload that carries no liveSessions block never blanks one already
held: absence there means the CLI is older than the block, not that
nothing is running. dock_glance answers with the snapshot, or None when
nothing has been fetched yet, which is the dock's cue to ask once itself.
2026-09-02 08:16:48 -07:00
iamtoruk
d27b489328 Merge remote-tracking branch 'origin/main' into feat/windows-capacity-dock 2026-09-02 08:01:44 -07:00