Skip to content

Add ModuleHistory tracking with overlay session snapshots#65

Draft
rdbtCVS wants to merge 2 commits into
mainfrom
codex/add-persistent-module-history-tracking
Draft

Add ModuleHistory tracking with overlay session snapshots#65
rdbtCVS wants to merge 2 commits into
mainfrom
codex/add-persistent-module-history-tracking

Conversation

@rdbtCVS

@rdbtCVS rdbtCVS commented Jun 8, 2026

Copy link
Copy Markdown
Member

Motivation

  • Introduce persistent session tracking for modules to record enable/disable events, periodic samples, durations, and overlay snapshots for later analysis.
  • Ensure sessions active across restarts are recovered and closed with a clear end reason and timestamp.
  • Wire session lifecycle into overlay and module lifecycle so overlay state and tracked values can be captured when modules start and stop.

Description

  • Add utils/ModuleHistory.js which implements ModuleHistory to start/end sessions, sample active sessions every minute, persist to module_history.json, recover stale sessions on load, and end all sessions on gameUnload.
  • Integrate history hooks into utils/ModuleBase.js by calling ModuleHistory.startSession(...) on enable and ModuleHistory.endSession(...) on disable, including a getOverlayData callback to capture overlay snapshots.
  • Add getSessionSnapshot and import ModuleHistory usage to gui/OverlayUtils.js to produce overlay section data and tracked values for snapshotting, and call ModuleHistory.endAllSessions('game_unload') from resetAll to ensure clean shutdown handling.
  • Update utils/Config.js manifest to generate a new module_history.json with initial structure so history is persisted by the config system.

Testing

  • No automated tests were added or executed as part of this change.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant