hermes-agent/apps/desktop/src
Siddharth Balyan 3cedac00b7
fix(credits): reintroduce grant_spent, gated on an in-session crossing (#73634)
* Revert "fix(credits): remove the 'Grant spent · $X top-up left' notice"

This reverts commit 5dc6a14c14.

* fix(credits): reintroduce grant_spent behind an in-session crossing gate

The removed notice nagged because its condition is a steady state for
accounts living on top-up, the latch is per-session, and the cold-start seed
runs the policy at every session open — every session re-announced
'Grant spent · $X top-up left'. Reintroduce it gated so only a session that
WATCHES the grant run out announces:

- seen_grant_unspent crossing gate, mirroring seen_below_90: opens when the
  session observes the grant meaningfully unspent (>= GRANT_UNSPENT_MIN_MICROS,
  1 cent — portal-seeded states derive micros from float dollars and can carry
  sub-cent residue where headers report exactly spent). Seeds never prime it.
- The gate guards only the show branch and is consumed by the announcement —
  one announcement per crossing. Header flicker (used_fraction None and back)
  clears the sticky line but cannot re-announce; a renewal re-opens the gate.
- new_credits_latch() centralizes the latch shape (agent build, lazy re-init,
  and the policy test helper all build through it).
- Tests: steady-state-open stays silent (seed + policy seams), live crossing
  announces once, flicker/renewal/residual cases locked; the rendering test
  primes the gate and asserts its leg count so a gate regression cannot
  silently shrink coverage.
2026-07-28 21:36:23 +00:00
..
app fix(credits): reintroduce grant_spent, gated on an in-session crossing (#73634) 2026-07-28 21:36:23 +00:00
assets/tiers
…
components fix(desktop): upload Windows attachments to Linux backends 2026-07-28 12:36:01 -07:00
contrib
…
debug fmt(js): `npm run fix` on merge (#72532) 2026-07-27 07:16:27 +00:00
fonts
…
hooks perf(desktop): share one ResizeObserver instead of one per consumer 2026-07-26 19:56:55 -05:00
i18n test+i18n: follow-up for salvaged PR #68969 2026-07-28 10:49:14 -07:00
lib fix(desktop): route streaming TTS through the active profile backend 2026-07-28 11:58:03 -07:00
plugins
…
sdk feat(sdk): expose FloatingAnchor to plugins 2026-07-28 01:11:12 -05:00
store fix(credits): reintroduce grant_spent, gated on an in-session crossing (#73634) 2026-07-28 21:36:23 +00:00
themes
…
types fix(desktop): preserve local model provider endpoint 2026-07-28 14:17:27 -07:00
global.d.ts feat(desktop): make attachment data-URL size limit configurable (#73221) 2026-07-28 09:10:21 -04:00
hermes-cron-scope.test.ts
…
hermes-parity.test.ts
…
hermes-profile-scope.test.ts style: eslint padding fix in profile-scope test (salvage follow-up) 2026-07-28 11:58:03 -07:00
hermes.test.ts [verified] fix(desktop): scope TTS requests to active profile 2026-07-28 11:58:03 -07:00
hermes.ts fix(desktop): route streaming TTS through the active profile backend 2026-07-28 11:58:03 -07:00
main.tsx feat(desktop): confirm before quitting with a turn in flight 2026-07-27 15:47:57 -05:00
styles.css Merge pull request #73220 from NousResearch/bb/subagent-runs 2026-07-28 03:22:43 -05:00
vite-env.d.ts
…
webhooks-rest.test.ts feat(desktop): add Webhooks page for subscription CRUD (#69687) 2026-07-24 14:06:10 -04:00