Skip to content

Persist dashboard chat history across refreshes #464

@iamagenius00

Description

@iamagenius00

Problem

The dashboard chat UI does not persist conversation history. Three concrete issues:

  1. History is lost on refresh — reloading the dashboard clears the current conversation.
  2. History bleeds across models — switching between models can show the wrong conversation, since history isn't isolated per model.
  3. UI gets stuck mid-generation — if the page is refreshed while a response is streaming, messages remain frozen in a thinking / generating / waiting state with no way to recover.

Proposal

Persist chat messages to the browser's localStorage, keyed by model name:

  • Save messages per modelName (storage key scoped to the active model).
  • Restore the current model's history automatically on load.
  • Isolate history per model, so switching models never mixes conversations.
  • On restore, normalize any unfinished waiting / thinking / generating message back to done, so a refresh during generation doesn't leave the UI stuck.

This is a client-only change in the dashboard frontend (src/frontend/src/services/chat.tsx) — no backend or API changes.

Status

Implemented locally; a PR will follow. Happy to adjust the storage key scheme, versioning, or eviction policy based on maintainer preference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions