feat(feedback): What's Working positive-feedback surface - #575
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)
ProductFeedbackmodel (product_feedbackcollection, sentimentpositive|idea), registered in Beanie init.feedback_adminrouter at/api/feedback/admin, support/admin-gated like/support/stats./positiveunifies three sources — chat thumbs-up with a comment,ExtractionQualityRecord≥4★, andProductFeedback— plus a/statsrollup (thumbs-up rate, last-7-days count).SupportCenter.tsx.Phase 2 — symmetric capture in chat
handleSubmitCommentcarries 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/productwritesProductFeedbackand never creates a ticket (negative sentiment coerced out). A "Something working well?" affordance +PraiseViewin the support panel; ticket-form copy reframed off bug-only.Verification
tsc --noEmit+eslint(changed files): cleanruff(changed files): clean;import app.main: OKtests/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