hermes-agent/ui-tui/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
..
__tests__ fmt(js): npm run fix on merge (#73552) 2026-07-28 18:30:19 +00:00
app fix(credits): reintroduce grant_spent, gated on an in-session crossing (#73634) 2026-07-28 21:36:23 +00:00
components fix(models): match bare Kimi Coding k3 when searching kimi 2026-07-26 21:22:40 -07:00
config fix(tui): coalesce drag-resize reflow + harden resize-burst heal coverage 2026-06-30 16:47:39 -07:00
content feat: add TUI session orchestrator 2026-05-26 20:51:59 -07:00
domain fix(tui,cli): render a resumed interrupted turn as an event 2026-07-28 03:54:25 -05:00
hooks fix(tui): offer skill completions for a slash typed mid-message 2026-07-25 21:19:23 -05:00
lib fix(tui): show the invocation for a skill send, not the skill body 2026-07-28 03:44:31 -05:00
protocol refactor(tui): /clean pass across ui-tui — 49 files, −217 LOC 2026-04-16 22:32:53 -05:00
sdk refactor(ui-tui): host placement router + grid-test width-floor fix 2026-07-21 20:59:55 -05:00
types fix(tui): keep the Apple Terminal dim fallback inside the active palette 2026-07-25 23:00:03 -05:00
app.tsx fix(tui): apply ui-tui fix pass and restore type-check 2026-04-25 14:08:54 -05:00
banner.ts feat(tui): responsive banner tiers 2026-05-23 17:37:51 -05:00
entry.tsx perf(tui): skin switches stay hot — MCP gating, pooled reload, swap repaint 2026-07-21 16:36:57 -05:00
gatewayClient.ts fix(tui): defer buffered gateway events to stop dashboard chat #301 (#36658) 2026-06-28 14:18:47 +05:30
gatewayTypes.ts fix(tui): show the invocation for a skill send, not the skill body 2026-07-28 03:44:31 -05:00
theme.ts fix(tui): paint the OSC-10 default foreground on quantizing terminals 2026-07-27 01:59:51 -05:00
types.ts fix(tui): keep MoA reference blocks visible when the thinking section is hidden 2026-07-23 18:11:57 -07:00