Skip to content

Support session stars and pinned messages in PostgreSQL / pg serve dashboards #484

@lisiyuan656

Description

@lisiyuan656

Feature request

Please support session stars and pinned messages when running AgentsView from PostgreSQL via agentsview pg serve.

Use case

I’m using AgentsView as a shared dashboard across multiple devices:

  • each device runs agentsview pg push
  • a hub runs PostgreSQL
  • the dashboard runs with agentsview pg serve

This works well for viewing sessions across machines, but session stars and pinned messages do not work on the hub dashboard.

Current behavior

In pg serve mode, the dashboard is read-only. The PostgreSQL store returns db.ErrReadOnly for:

  • StarSession
  • UnstarSession
  • BulkStarSessions
  • PinMessage
  • UnpinMessage

The API returns 501 / "not available in remote mode", and the frontend mostly appears as if the action silently did not persist.

Also, ListStarredSessionIDs and ListPinnedMessages return empty results in the PostgreSQL store, so existing stars/pins are not visible on the hub dashboard.

Expected behavior

Stars and pinned messages should work in PostgreSQL-backed dashboards, ideally as shared metadata stored in PostgreSQL.

Expected behavior:

  • starring a session in the hub dashboard persists
  • pinning a message in the hub dashboard persists
  • stars/pins survive dashboard refreshes
  • stars/pins are visible from other devices using the same hub
  • optional: pg push can sync local SQLite stars/pins into PostgreSQL

Why this matters

In a multi-device setup, the hub dashboard is the main place where I inspect sessions. Stars and pinned messages are especially useful for marking important sessions/
messages across devices, so losing those features makes the shared dashboard less useful.

Possible implementation

A possible approach:

  • Add PostgreSQL equivalents of starred_sessions and pinned_messages.
  • Implement the star/pin methods on internal/postgres.Store instead of returning db.ErrReadOnly.
  • Make the PostgreSQL list methods read from those tables.
  • Optionally sync local SQLite stars/pins during agentsview pg push.

If full write support is not desired for pg serve, another improvement would be to disable/hide the star and pin controls in remote mode and show a clear message instead
of failing silently.

Environment

  • AgentsView Docker image: ghcr.io/wesm/agentsview:latest
  • Deployment style: hub PostgreSQL + agentsview pg serve, with multiple agentsview pg push devices

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions