feat: implement structured feedback modal and integrate feedback service#186
Conversation
- Added a new FeedbackModal to collect structured feedback from users. - Integrated feedback submission to a new feedback service API, with fallbacks to Slack if the service is not configured. - Introduced constants for feedback kinds and platforms to align with the feedback service schema. - Updated configuration to include feedback service URL and API key. - Added tests for feedback modal functionality and feedback service integration.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #186 +/- ##
==========================================
+ Coverage 65.36% 66.74% +1.38%
==========================================
Files 52 54 +2
Lines 3069 3209 +140
==========================================
+ Hits 2006 2142 +136
- Misses 1063 1067 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
dimoschi
left a comment
There was a problem hiding this comment.
Solid and well-tested. One thing worth addressing, feedback is silently dropped if the service is configured but down. When is_configured() is true, ingest_discord_feedback swallows every exception (except Exception: logger.exception(...)) and returns None. The user already saw "your feedback has been recorded," but nothing was stored and there's no Slack fallback on failure, only when not configured. The PR title says "fallbacks to Slack if the service is not configured," so this is by design, but the failure mode means a Nexus/service outage = lost feedback with a success message. Consider falling back to Slack on a failed POST (return a bool from ingest_discord_feedback and branch on it), or at minimum don't claim success.
Return a bool from ingest_discord_feedback so the modal can route to Slack on non-202 responses or request errors, avoiding silent feedback loss. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@dimoschi Good catch on the silent drop — addressed in e6f8a47.
Kept the |
Resolve config.py conflict: keep feedback service settings and adopt main's ROOT: Path | None typing. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
This PR adds a structured Discord feedback modal, routes submissions to a new feedback ingest service (with Slack webhook fallback), and introduces aligned constants/config plus tests to validate the new flow.
Changes:
- Added
FeedbackModalfields for summary/details/product and wired/feedbackto require kind + platform choices. - Implemented
src/helpers/feedback_service.pyto POST Discord feedback payloads to the feedback service ingest endpoint. - Added constants/tests to keep Discord choices aligned with the feedback service schema; updated settings and test env.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/cmds/core/other.py |
Adds structured feedback modal, builds ingest payload, and preserves Slack fallback behavior. |
src/helpers/feedback_service.py |
New helper to send feedback payloads to the feedback service over HTTP. |
src/constants/feedback.py |
Defines feedback kind/platform choice catalogs aligned to ingest schema. |
src/core/config.py |
Adds config entries for feedback service URL + API key. |
.test.env |
Documents test env vars for feedback ingest configuration. |
tests/src/cmds/core/test_other.py |
Adds tests for ingest-first behavior and Slack fallback paths. |
tests/src/helpers/test_feedback_service.py |
Adds unit tests for ingest helper success/failure/config handling. |
tests/src/constants/test_feedback.py |
Ensures constants/choices expose correct ingest slugs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Types of changes
What types of changes does your code introduce?
Put an
xin the boxes that apply.Proposed changes
Checklist
Put an
xin the boxes that apply.doc.