hermes-agent/apps/desktop/src/app
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
..
agents
…
artifacts desktop: open sessions where they already are 2026-07-28 01:13:30 -05:00
chat fix(desktop): upload Windows attachments to Linux backends 2026-07-28 12:36:01 -07:00
command-center
…
command-palette fmt(js): `npm run fix` on merge (#73155) 2026-07-28 06:29:04 +00:00
contrib fix(credits): reintroduce grant_spent, gated on an in-session crossing (#73634) 2026-07-28 21:36:23 +00:00
cron feat(desktop): right-click parity for every panel list row 2026-07-27 20:56:48 -05:00
gateway/hooks fix(desktop): give ⌘T session tabs a live gateway so slash completions load 2026-07-25 20:30:55 -05:00
hooks desktop: open sessions where they already are 2026-07-28 01:13:30 -05:00
learning
…
messaging
…
overlays fmt(js): `npm run fix` on merge (#73096) 2026-07-28 03:43:07 +00:00
pet-generate refactor(desktop): name the overlay z-index ladder 2026-07-27 15:48:09 -05:00
pet-overlay fix(desktop): suspend decorative work when inactive 2026-07-26 21:05:55 -05:00
profiles feat(desktop): right-click parity for every panel list row 2026-07-27 20:56:48 -05:00
quick-entry feat(desktop): quick-entry window — global hotkey capture to any session 2026-07-26 17:48:19 -07:00
right-sidebar fix(desktop): honor gitignore across Windows path casing 2026-07-28 12:36:35 -07:00
session fix(desktop): upload Windows attachments to Linux backends 2026-07-28 12:36:01 -07:00
settings fix(desktop): preserve local model provider endpoint 2026-07-28 14:17:27 -07:00
shell fmt(js): `npm run fix` on merge (#73552) 2026-07-28 18:30:19 +00:00
skills feat(desktop): cache slash completions and list skills on a bare / 2026-07-28 03:19:51 -05:00
starmap lint(desktop): ban atom-mirrored refs via no-restricted-syntax eslint rule 2026-07-25 18:12:48 -07:00
webhooks feat(desktop): right-click parity for every panel list row 2026-07-27 20:56:48 -05:00
floating-hud.ts
…
index.tsx
…
layout-constants.ts
…
master-detail.tsx fix(desktop): strip Close-X tips and statusbar tip lectures 2026-07-27 22:03:37 -05:00
model-picker-overlay.tsx perf(desktop): stop the model-picker overlay re-rendering per streaming token 2026-07-26 21:05:55 -05:00
model-visibility-overlay.tsx
…
open-session.test.ts desktop: shared openSession door for focus-or-route 2026-07-28 01:13:30 -05:00
open-session.ts fmt(js): `npm run fix` on merge (#73155) 2026-07-28 06:29:04 +00:00
page-search-shell.tsx
…
routes.test.ts fix(desktop): close cross-session leak windows in composer + session refs (#59305) 2026-07-24 16:04:12 -07:00
routes.ts fix(desktop): front the workspace pane from the router location 2026-07-27 12:54:45 -05:00
routes.workspace-reveal.test.ts test(desktop): cover the workspace-page reveal bug class 2026-07-27 12:54:49 -05:00
session-picker-overlay.tsx
…
session-switcher.tsx desktop: open sessions where they already are 2026-07-28 01:13:30 -05:00
types.ts fix(desktop): render a skill send as its invocation everywhere it surfaces 2026-07-28 03:44:31 -05:00
updates-overlay.tsx
…