mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-07-19 06:00:46 +00:00
06842f6e9f
The new CLI/gateway insights pass counted ALL state.db sessions, but WebUI-native sessions are persisted to state.db with source='webui' AND already counted from the sidecar _index.json first pass — double-counting them in totals, model breakdown, and daily charts. Add `AND COALESCE(source, '') != 'webui'` so only CLI/gateway/cron/tui rows are added by the second pass. Adds regression tests proving (a) CLI + Telegram sessions appear in totals and (b) a webui-source state.db row is not double-counted against its _index.json entry. Co-authored-by: wind-chant <wind-chant@users.noreply.github.com>