feat: add user feedback form with DB persistence and email notifications #81

Merged
chihlasm merged 16 commits from feat/feedback-form into main 2026-02-19 00:04:20 +00:00
chihlasm commented 2026-02-18 23:07:30 +00:00 (Migrated from github.com)

Summary

  • Adds a feedback form page (/feedback) where logged-in users can submit bug reports, feature requests, usability issues, documentation feedback, or general feedback
  • Submissions are persisted to a feedback database table and emailed to a configurable FEEDBACK_EMAIL address via Resend
  • Submitters receive a confirmation email with a preview of their feedback
  • Custom dropdown selector with helper text descriptions for each feedback type
  • Accessible from sidebar nav (all roles) and account settings link card

What's included

  • Backend: Pydantic schema, Feedback SQLAlchemy model + Alembic migration, FEEDBACK_EMAIL config setting, two EmailService methods (admin notification + user confirmation), POST /feedback endpoint with rate limiting (1/min)
  • Frontend: FeedbackPage.tsx with custom type selector, feedbackApi client, sidebar nav item, account settings link card, /feedback route
  • Tests: 6 new backend tests (all passing, 557 total suite passing)

Configuration

Add FEEDBACK_EMAIL=your-email@example.com to backend .env (Railway env var for production)

Test plan

  • Verify feedback form loads at /feedback with email pre-filled
  • Verify custom dropdown shows descriptions for each feedback type
  • Submit feedback and verify success state
  • Check admin notification email arrives with reply-to set
  • Check submitter confirmation email arrives
  • Verify feedback row in feedback table
  • Verify sidebar nav item visible in collapsed and expanded states
  • Verify account settings "Send Feedback" link card
  • Test 503 response when FEEDBACK_EMAIL is not configured

🤖 Generated with Claude Code

## Summary - Adds a feedback form page (`/feedback`) where logged-in users can submit bug reports, feature requests, usability issues, documentation feedback, or general feedback - Submissions are persisted to a `feedback` database table and emailed to a configurable `FEEDBACK_EMAIL` address via Resend - Submitters receive a confirmation email with a preview of their feedback - Custom dropdown selector with helper text descriptions for each feedback type - Accessible from sidebar nav (all roles) and account settings link card ## What's included - **Backend:** Pydantic schema, `Feedback` SQLAlchemy model + Alembic migration, `FEEDBACK_EMAIL` config setting, two `EmailService` methods (admin notification + user confirmation), `POST /feedback` endpoint with rate limiting (1/min) - **Frontend:** `FeedbackPage.tsx` with custom type selector, `feedbackApi` client, sidebar nav item, account settings link card, `/feedback` route - **Tests:** 6 new backend tests (all passing, 557 total suite passing) ## Configuration Add `FEEDBACK_EMAIL=your-email@example.com` to backend `.env` (Railway env var for production) ## Test plan - [ ] Verify feedback form loads at `/feedback` with email pre-filled - [ ] Verify custom dropdown shows descriptions for each feedback type - [ ] Submit feedback and verify success state - [ ] Check admin notification email arrives with reply-to set - [ ] Check submitter confirmation email arrives - [ ] Verify feedback row in `feedback` table - [ ] Verify sidebar nav item visible in collapsed and expanded states - [ ] Verify account settings "Send Feedback" link card - [ ] Test 503 response when `FEEDBACK_EMAIL` is not configured 🤖 Generated with [Claude Code](https://claude.com/claude-code)
railway-app[bot] commented 2026-02-18 23:07:48 +00:00 (Migrated from github.com)

🚅 Deployed to the patherly-pr-81 environment in selfless-grace

Service Status Web Updated (UTC)
hopeful-liberation Success (View Logs) Web Feb 19, 2026 at 12:00 am
patherly Success (View Logs) Web Feb 18, 2026 at 11:59 pm
<!-- railway-bot-comment-version=2 --> <!-- railway-project-id="22b9b58c-271b-42e5-a10e-6fdec8d00134" railway-project-name="selfless-grace" --> 🚅 Deployed to the [patherly-pr-81](https://railway.com/project/22b9b58c-271b-42e5-a10e-6fdec8d00134?environmentId=66797616-002f-4ff8-9f94-992c5f26c973) environment in **[selfless-grace](https://railway.com/project/22b9b58c-271b-42e5-a10e-6fdec8d00134)** | **Service** | **Status** | **Web** | **Updated** (UTC) | | :--- | :--- | :--- | :--- | | hopeful-liberation | ✅ Success ([View Logs](https://railway.com/project/22b9b58c-271b-42e5-a10e-6fdec8d00134/service/e1db2ee3-d241-4f45-abe4-c9c5fdf483d5?id=f140e829-8ba6-4763-8081-cf2667b5546b&environmentId=66797616-002f-4ff8-9f94-992c5f26c973)) | [Web](https://hopeful-liberation-patherly-pr-81.up.railway.app) | Feb 19, 2026 at 12:00 am | | patherly | ✅ Success ([View Logs](https://railway.com/project/22b9b58c-271b-42e5-a10e-6fdec8d00134/service/95f556ff-5264-4116-a0c2-618a2fc53ba4?id=0185d2d8-d6a3-494c-baef-c5ec908fe2e3&environmentId=66797616-002f-4ff8-9f94-992c5f26c973)) | [Web](https://patherly-patherly-pr-81.up.railway.app) | Feb 18, 2026 at 11:59 pm |
Sign in to join this conversation.