feat: give admin CSAT its own db key + metric#9787
Open
bookwormsuf wants to merge 4 commits into
Open
Conversation
Own key for the new 1-5 CSAT measure; legacy `rating` relaxed to optional so old thumbs rows and new stars never share a field. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Wire keeps sending `rating`; controller maps it to the `csat` key. Renames the .rating.v2 metric to formsg.users.feedback.csat, keeping the transitional .rating emit. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Assert new rows store csat (not rating) and that formsg.users.feedback.csat is emitted. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Tick the box to add this pull request to the merge queue (same as
|
rating is now optional (new rows use csat), so drop the 'rating required' assertion and add csat 1-5 / reject 0 & 6 coverage. Co-Authored-By: Claude Opus 4.8 <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.
Problem
The new admin satisfaction measure (1-5 stars) is stored in the same
ratingfield as legacy thumbs feedback (0/1), and reported via a temporary
.rating.v2metric. Old and new data share one field, and the metric name doesn't say what
it measures.
Solution
Give the new measure its own
csatkey so it never mixes with legacyratingdata, and name the metric for what it is (CSAT).
Improvements:
csat(1-5) field to the admin feedback schema; relax legacyratingto optional (kept for historical thumbs rows).csatonly;ratingis no longer written..rating.v2→formsg.users.feedback.csat; keep thetransitional
formsg.users.feedback.ratingemit so the current report cardkeeps working.
ratingand is mapped tocsatin thecontroller, so no frontend change and no overlap with the star-UI PR.
Follow-up to the admin satisfaction revamp stack:
Breaking Changes
No.
csatandratingare both optional; legacy rows keep theirrating. Thewire contract is unchanged (still accepts
rating). New rows returncsatinstead of
rating; the workspace UI only reads_idfrom the response, sonothing breaks.
Tests
pnpm buildpassescsat: 3, noratingformsg.users.feedback.csatfires on create (tagcsat); transitionalformsg.users.feedback.ratingstill firescsatupdated andratingChanged: trueratingChangedstays falsecsat)Automated: service spec 13/13, feedback route spec 13/13, typecheck no new errors, lint clean.
🤖 Generated with Claude Code