Skip to content

feat: implement structured feedback modal and integrate feedback service#186

Merged
ToxicBiohazard merged 5 commits into
mainfrom
TECHOPS-247-hackster-discord-feedback
Jun 24, 2026
Merged

feat: implement structured feedback modal and integrate feedback service#186
ToxicBiohazard merged 5 commits into
mainfrom
TECHOPS-247-hackster-discord-feedback

Conversation

@ToxicBiohazard

Copy link
Copy Markdown
Member

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply.

  • Bugfix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality not to work as expected).
  • Documentation Update (if none of the other choices applies).

Proposed changes

  • 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.

Checklist

Put an x in the boxes that apply.

  • I have read and followed the CONTRIBUTING.md
    doc.
  • Lint and unit tests pass locally with my changes.
  • I have added the necessary documentation (if appropriate).

- 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

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.15842% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.74%. Comparing base (b9b84c3) to head (78a20e9).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/cmds/core/other.py 75.75% 16 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dimoschi dimoschi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread src/helpers/feedback_service.py Outdated
Comment thread src/helpers/feedback_service.py
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>
@ToxicBiohazard

Copy link
Copy Markdown
Member Author

@dimoschi Good catch on the silent drop — addressed in e6f8a47.

ingest_discord_feedback now returns bool (True on HTTP 202). The modal only short-circuits on success; if the service is configured but the POST fails, it falls through to the existing Slack path. Also dropped the redundant bool() wrapper in is_configured().

Kept the is_configured() guard inside ingest_discord_feedback so the helper stays safe when called directly (returns False instead of attempting a request with empty settings).

Resolve config.py conflict: keep feedback service settings and adopt
main's ROOT: Path | None typing.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 FeedbackModal fields for summary/details/product and wired /feedback to require kind + platform choices.
  • Implemented src/helpers/feedback_service.py to 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.

Comment thread src/helpers/feedback_service.py Outdated
Comment thread src/cmds/core/other.py Outdated
Comment thread src/constants/feedback.py
ToxicBiohazard and others added 2 commits June 23, 2026 16:10
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>
@ToxicBiohazard ToxicBiohazard merged commit 1abfd4b into main Jun 24, 2026
4 checks passed
@ToxicBiohazard ToxicBiohazard deleted the TECHOPS-247-hackster-discord-feedback branch June 24, 2026 12:53
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