Skip to content

feat(feedback): What's Working positive-feedback surface - #575

Merged
ViaJables merged 1 commit into
mainfrom
feat/positive-feedback-surface
Jul 28, 2026
Merged

feat(feedback): What's Working positive-feedback surface#575
ViaJables merged 1 commit into
mainfrom
feat/positive-feedback-surface

Conversation

@ViaJables

Copy link
Copy Markdown
Collaborator

Why

Vandalizer only listened for pain. Chat thumbs-down probed for a comment and could trigger a KB optimization run; thumbs-up and high extraction star ratings were stored write-only with no reader and no follow-up. The only place that ever invited "what works well" was a one-shot end-of-trial survey field. This gives positive/idea feedback a real home — while keeping problems on the support-ticket rails where they belong.

Design rule

Positives ride off-ticket; only problems create tickets. Praise and ideas must never enter the triage queue or fire the ticket email/Teams fan-out (a compliment can't "close"). Future feedback work should preserve this split.

What's in it

Phase 1 — positive signal gets a home (the keystone)

  • New ProductFeedback model (product_feedback collection, sentiment positive|idea), registered in Beanie init.
  • New feedback_admin router at /api/feedback/admin, support/admin-gated like /support/stats. /positive unifies three sources — chat thumbs-up with a comment, ExtractionQualityRecord ≥4★, and ProductFeedback — plus a /stats rollup (thumbs-up rate, last-7-days count).
  • "What's Working" tab in SupportCenter.tsx.

Phase 2 — symmetric capture in chat

  • Thumbs-up now opens the comment box too ("What worked well?"); handleSubmitComment carries the actual rating instead of a hardcoded 'down'. No backend change — the endpoint already accepted comments on up-votes.

Phase 3 — off-ticket praise

  • POST /api/feedback/product writes ProductFeedback and never creates a ticket (negative sentiment coerced out). A "Something working well?" affordance + PraiseView in the support panel; ticket-form copy reframed off bug-only.

Verification

  • frontend tsc --noEmit + eslint (changed files): clean
  • backend ruff (changed files): clean; import app.main: OK
  • tests/test_feedback_routes.py: 4/4 pass (admin-gating 403s + product write / sentiment coercion)

Scope held deliberately

Read-surface only (no weekly digest/notification wiring) and no gamification — the audience is professionals.

🤖 Generated with Claude Code

Positive signal was write-only: chat thumbs-up and high extraction star
ratings landed in Mongo with no reader, and only thumbs-down drove any
downstream action (KB optimization). This gives positive/idea feedback a
home while keeping problems on the support-ticket rails.

- ProductFeedback model + /api/feedback/admin read router (support-gated)
  unifying three sources: chat thumbs-up w/ comment, extraction >=4 stars,
  and ProductFeedback. Surfaced as a "What's Working" tab in SupportCenter.
- Symmetric chat capture: thumbs-up now opens the comment box too and
  submits with the actual rating (was hardcoded 'down').
- Off-ticket praise: POST /api/feedback/product (never creates a ticket,
  negatives coerced out) + a "Something working well?" affordance in the
  support panel; ticket-form copy reframed off bug-only.
- Tests: admin-gating 403s + product write / sentiment coercion.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ViaJables
ViaJables merged commit c00f1b7 into main Jul 28, 2026
10 checks passed
@ViaJables
ViaJables deleted the feat/positive-feedback-surface branch July 28, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant