hermes-agent/ui-tui/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
..
slash fmt(js): npm run fix on merge (#72411) 2026-07-27 02:52:53 +00:00
createGatewayEventHandler.ts fix(tui): paint the OSC-10 default foreground on quantizing terminals 2026-07-27 01:59:51 -05:00
createSlashHandler.ts refactor: drop the shared subpath export, keeping package.json untouched 2026-07-28 03:54:49 -05:00
delegationStore.ts feat(tui): subagent spawn observability overlay 2026-04-22 10:38:17 -05:00
gatewayContext.tsx
gatewayRecovery.ts fix(tui): auto-recover session on unexpected gateway death (+ persist lifecycle breadcrumbs) (#35893) 2026-05-31 10:36:57 -05:00
inputSelectionStore.ts fix(tui): mouse + keyboard text selection in the composer (#16732) 2026-04-27 16:43:48 -07:00
interfaces.ts fix(tui): show the invocation for a skill send, not the skill body 2026-07-28 03:44:31 -05:00
overlayStore.ts feat(ui-tui): ambient widget mode — registry-driven slash catalog + in-flow dock 2026-07-21 20:59:53 -05:00
petFlashStore.ts refactor(tui): drive the vibe heart from the core reaction event 2026-07-10 05:42:08 -05:00
scroll.ts fix(tui): refresh scroll height at cached bottom 2026-05-07 05:48:19 -07:00
setupHandoff.ts feat(tui): /model and /setup slash commands with in-place CLI handoff 2026-04-17 10:58:18 -05:00
spawnHistoryStore.ts fix(tui): handle timeout/error subagent statuses in /agents (#26687) 2026-05-15 20:19:02 -05:00
submissionCore.ts fix(tui): show the invocation for a skill send, not the skill body 2026-07-28 03:44:31 -05:00
turnController.ts fix(credits): reintroduce grant_spent, gated on an in-session crossing (#73634) 2026-07-28 21:36:23 +00:00
turnStore.ts chore(tui): remove dead branch cleanup code 2026-04-26 21:54:24 -05:00
uiStore.ts feat(cli): /focus — reduced-output view with hidden-line recovery and status indicator 2026-07-26 18:10:34 -07:00
useBatteryPoll.ts feat(status-bar): add /battery toggle for a color-coded battery read-out 2026-07-21 13:54:11 -05:00
useComposerState.ts fix(cli): restore fallback paste collapse + handle long single-line pastes (#32447) 2026-05-25 23:49:01 -07:00
useConfigSync.ts feat(cli): /focus — reduced-output view with hidden-line recovery and status indicator 2026-07-26 18:10:34 -07:00
useInputHandlers.ts fix(tui): offer skill completions for a slash typed mid-message 2026-07-25 21:19:23 -05:00
useLongRunToolCharms.ts chore(tui): clean live progress lint 2026-04-26 15:42:07 -05:00
useMainApp.ts fix(tui): keep the Apple Terminal dim fallback inside the active palette 2026-07-25 23:00:03 -05:00
usePet.ts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
useSessionLifecycle.ts fix(tui): redraw dashboard after new session (#65239) 2026-07-15 21:23:08 -04:00
useSubmission.test.ts fix(cli,tui): recall real paste content on up-arrow 2026-07-20 23:23:40 -05:00
useSubmission.ts fix(tui): show the invocation for a skill send, not the skill body 2026-07-28 03:44:31 -05:00