Files
hermes-agent/apps
kokhlo 80c0d1a2f4 fix(bots): key the Bot Chat history wait on paintable rows
A bot whose canonical Bot Chat session has message_count > 0 but zero
paintable rows can never be opened from the roster: the click demands a
painted transcript (expectHistory), no read mode serves active = 0,
compacted = 0 rows, so the open burns the full 60s hydration budget and
fails closed, and the fail-closed registry guard then refuses to mint a
replacement either.

Report the paintable size next to the denormalized total:

- session.list title lookups and profiles.list canonical/last_session rows
  now carry live_message_count — the count of display-set rows
  (active = 1 OR compacted = 1) a stored-transcript read actually paints,
  distinct display groups counted once.
- the desktop keys expectHistory off live_message_count when present,
  falling back to message_count for older gateways, so the count and the
  paint gate can no longer disagree. An all-folded chat opens as
  expected-empty instead of wedging for the whole budget.

(cherry picked from commit ddee47676f5f0669f7cb84681dc2f6c4a72ee4c6)
2026-09-30 09:57:04 -05:00
..