Skip to content

Per-response and general feedback in the chat widget #282

Description

@neuromechanist

Add a feedback channel to the OSA chat widget and surface it to community admins.

Scope

  • Per-response thumbs up/down under each assistant reply (records sentiment, keyed to a new per-response request_id).
  • A general free-text feedback entry point (Send feedback link in the widget footer) for feedback not tied to a single reply.
  • Backend: anonymous POST /feedback (the Cloudflare worker already proxies to it), persisted to a new feedback_log table in the existing metrics.db (durable on the osa-data volume).
  • Admin: GET /metrics/feedback (per-community scoped key) plus a Feedback panel on the status dashboard (status.osc.earth/osa/).

Test plan

  • Unit tests for the feedback_log table, write_feedback, and the summary/entries queries.
  • API tests for POST /feedback (valid up/down/general, unknown community, missing sentiment/comment, oversized comment, non-http page_url) and GET /metrics/feedback scoping (community key sees only its own; admin sees all).

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or enhancementwidgetRelated to frontend widget

    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