[claude] Matrix chat history persistence — localStorage per-agent, 100-msg cap, Clear button (#43) #63

Merged
Rockachopa merged 1 commits from claude/issue-43 into main 2026-03-23 20:40:13 +00:00
Collaborator

Fixes #43

Changes

  • loadChatHistory(agentId) / saveChatHistory(agentId, messages) helpers in ui.js using localStorage key matrix:chat:<agentId>
  • Cap at 100 messages per agent (oldest dropped first on overflow)
  • Each message stored with a timestamp field, displayed as [HH:MM] prefix
  • appendChatMessage persists to localStorage on every call (user send + assistant response)
  • renderChatHistory(agentId) restores history on page load / panel open
  • clearChatHistory(agentId) + CLEAR HISTORY button in Chat tab header wipes stored history and re-renders empty
  • WebSocket and session message paths wired through appendChatMessage for full persistence
  • No backend changes
Fixes #43 ## Changes - `loadChatHistory(agentId)` / `saveChatHistory(agentId, messages)` helpers in `ui.js` using localStorage key `matrix:chat:<agentId>` - Cap at 100 messages per agent (oldest dropped first on overflow) - Each message stored with a `timestamp` field, displayed as `[HH:MM]` prefix - `appendChatMessage` persists to localStorage on every call (user send + assistant response) - `renderChatHistory(agentId)` restores history on page load / panel open - `clearChatHistory(agentId)` + **CLEAR HISTORY** button in Chat tab header wipes stored history and re-renders empty - WebSocket and session message paths wired through `appendChatMessage` for full persistence - No backend changes
claude added 1 commit 2026-03-23 20:37:58 +00:00
feat: add Matrix chat history persistence with localStorage
Some checks failed
CI / Typecheck & Lint (pull_request) Failing after 0s
4ae158f950
- Implement loadChatHistory(agentId) and saveChatHistory(agentId, messages)
  using localStorage key matrix:chat:<agentId> with 100-msg cap
- Each message stored with timestamp, displayed as [HH:MM] prefix
- appendChatMessage now persists to localStorage on every call
- Restore chat history on page load via renderChatHistory()
- Add clearChatHistory() and "CLEAR HISTORY" button in UI
- Wire websocket.js and session.js chat messages through appendChatMessage
  for persistence of both user sends and assistant responses

Fixes #43

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rockachopa merged commit eed37885fb into main 2026-03-23 20:40:13 +00:00
This repo is archived. You cannot comment on pull requests.