Skip to content

feat(public-chat): chat history dropdown for logged-in users #587

Closed

Description

@vybe

Summary

When a logged-in user opens a public agent chat link, they currently see only a fresh session with no way to return to prior conversations. Add a dropdown (or sidebar panel) that lists the user's previous chat sessions with that agent, so they can resume or review past interactions without losing context.

Context

The backend already persists chat sessions and messages in `chat_sessions` / `chat_messages` tables and exposes them via:

  • `GET /api/agents/{name}/chat/sessions` — list sessions for an agent
  • `GET /api/agents/{name}/chat/sessions/{id}` — session detail with messages

The public link chat page (`PublicChat.vue`) currently authenticates the user via JWT (if logged in) but does not surface historical sessions. This feature closes the gap between the data model and the UI.

Acceptance Criteria

  • When the user is not logged in, the public chat page is unchanged (no history UI shown)
  • When the user is logged in, a dropdown or collapsible panel appears (e.g. near the header) listing their previous sessions with that agent, ordered by most-recent first
  • Each session entry shows a preview: date, first/last message snippet, and message count
  • Selecting a session loads its messages into the chat view (read-only or resumable, TBD)
  • A "New Chat" button or option is always available to start a fresh session
  • The list is paginated or limited (e.g. last 20 sessions) to avoid performance issues
  • Access control is respected — users only see their own sessions (backend already enforces this)

Technical Notes

  • Public chat page: `src/frontend/src/views/PublicChat.vue`
  • Session list endpoint: `GET /api/agents/{name}/chat/sessions`
  • Session detail endpoint: `GET /api/agents/{name}/chat/sessions/{id}`
  • Auth store: `src/frontend/src/stores/auth.js` — use `isAuthenticated` guard before rendering the history UI
  • Session messages are already returned in persistent history format by the backend

Activity

  1. added
    priority-p2
    type-feature
    on Apr 29, 2026
  2. vybe commented on Apr 29, 2026

    @vybe
    ContributorAuthor

    /claim

  3. added
    status-in-progress
    on Apr 29, 2026
  4. github-actions commented on Apr 29, 2026

    @github-actions

    Claimed by @vybe. Label status-in-progress added.

    Next steps:

    1. Create branch: feature/587-<short-slug>
    2. Implement the feature
    3. Open a PR with Fixes #587
  5. added
    status-in-dev
    and removed
    status-in-progress
    on Apr 29, 2026
  6. vybe commented on Jun 1, 2026

    @vybe
    ContributorAuthor

    Shipped in v0.6.0 (released via #998).

  7. added
    complexity-low
    theme-ui-ux
    and removed
    status-in-dev
    on Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

complexity-lowpriority-p2theme-ui-uxtype-feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions