[HIGH] Chat history is in-memory only — lost on server restart #46

Closed
opened 2026-03-14 18:46:46 +00:00 by kimi · 0 comments
Collaborator

Problem

The chat history in dashboard.store.message_log is in-memory only and is lost when the server restarts:

class MessageLog:
    """In-memory chat history for the lifetime of the server process."""
    def __init__(self) -> None:
        self._entries: list[Message] = []

Impact

  • Users lose conversation context on server restart
  • Briefings generated from empty history
  • Cannot review past conversations after restart
  • Issue #38: Thinking engine rumination loop
  • Issue #12: Session handoff persistence

Acceptance Criteria

  • Store chat history in SQLite (timmy.db or memory.db)
  • Load history on server startup
  • Implement retention policy (e.g., last 100 messages or 7 days)
  • Add /api/chat/history endpoint to retrieve persisted history
  • Maintain backward compatibility with existing message_log singleton
  • Tests for persistence and retrieval

Priority: HIGH 🟡

## Problem The chat history in `dashboard.store.message_log` is **in-memory only** and is lost when the server restarts: ```python class MessageLog: """In-memory chat history for the lifetime of the server process.""" def __init__(self) -> None: self._entries: list[Message] = [] ``` ## Impact - Users lose conversation context on server restart - Briefings generated from empty history - Cannot review past conversations after restart ## Related - Issue #38: Thinking engine rumination loop - Issue #12: Session handoff persistence ## Acceptance Criteria - [ ] Store chat history in SQLite (timmy.db or memory.db) - [ ] Load history on server startup - [ ] Implement retention policy (e.g., last 100 messages or 7 days) - [ ] Add `/api/chat/history` endpoint to retrieve persisted history - [ ] Maintain backward compatibility with existing `message_log` singleton - [ ] Tests for persistence and retrieval ## Priority: HIGH 🟡
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#46