Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle DC Chat Feedback Submission #226

Merged
merged 2 commits into from
Jul 2, 2024
Merged

Handle DC Chat Feedback Submission #226

merged 2 commits into from
Jul 2, 2024

Conversation

kdid
Copy link
Contributor

@kdid kdid commented Jun 26, 2024

Summary

Handle DC chat feedback submission.

  • Saves response to S3
    • Files can be overwritten in the case of a initial 👍 / 👎 followed by a more detailed response
  • Sends notification/email to subscribers of topic

Steps to Test

  • Fetch the branch and clean/build
  • Deploy a development branch: Deploy Development Branch
  • Go into the AWS SNS staging console and subscribe to the topic that was created, which should be named `{your-dev-env}-chat-feedback)
    • Look for the subscription confirmation in your email inbox and follow instuctions
  • Visit the https://your-dev-branch-name.rdc-staging.library.northwestern.edu/api/v2/chat-feedback route (You can use the Postan POST chat feedback endpoint (screenshot below))
  • You should receive validation errors for invalid JSON
  • You should receive a success message/200 from the API when the form is submitted
  • You should receive an email notifying you of the response (screenshot below)
  • Find the {your-dev-env}-chat-feedback bucket and look for the response with a key of {sentiment}/{ref}.json
Screenshot 2024-07-01 at 9 14 25 AM Screenshot 2024-07-01 at 9 14 45 AM

@kdid kdid force-pushed the 4073-feedback branch 9 times, most recently from b0ebabb to 2b0df30 Compare June 28, 2024 20:33
@kdid kdid changed the title 4073 feedback Handle DC Chat Feedback Submission Jul 1, 2024
@kdid kdid marked this pull request as ready for review July 1, 2024 16:17
@kdid kdid force-pushed the 4073-feedback branch 4 times, most recently from 35dccef to 0fb5f72 Compare July 1, 2024 16:39
Copy link
Contributor

@mbklein mbklein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working great as written. I think we should backtrack very slightly and change the chat-endpoint and chat-feedback routes to chat/endpoint and chat/feedback just to keep things organized. They're both undocumented private API routes, so it wouldn't be a major-version breaking change, and I really like the idea of keeping the routing table better segmented by function. (This will also make it a lot easier to split things up when we get around to #4518.)

It'll require a small simultaneous front-end update, but I very much think it's worth it.

Copy link
Member

@mathewjordan mathewjordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems great to me. The one thing I saw is that it looks like you can send in the body without a context.ref, context.question, and/or a context.answer. Not sure if we want to bulletproof that more.

@kdid
Copy link
Contributor Author

kdid commented Jul 1, 2024

@mbklein and @mathewjordan - Addressed both of your comments. Thank you!

@kdid kdid self-assigned this Jul 1, 2024
@mathewjordan mathewjordan self-requested a review July 1, 2024 23:49
Copy link
Member

@mathewjordan mathewjordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@kdid kdid merged commit eb8143f into deploy/staging Jul 2, 2024
1 check passed
@kdid kdid deleted the 4073-feedback branch July 2, 2024 12:47
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.

4 participants