2.6 KiB
Feedback Form — Design Document
Date: 2026-02-18
Overview
A feedback form page where logged-in users can submit bug reports, feature requests, and general feedback. Submissions are emailed to a configurable address via the existing Resend infrastructure. No database storage.
Feedback Types
- Bug Report
- Feature Request
- Usability Issue
- Documentation
- General Feedback
Email Format
Subject:
[ResolutionFlow Feedback] Bug Report — 2026-02-18 — ACC-7X3K
Where ACC-7X3K is the user's account display code.
Body:
Feedback Type: Bug Report
Submitted By: engineer@example.com
Account: Contoso IT Services (ACC-7X3K)
Date: February 18, 2026
---
User's written feedback text goes here...
Reply-to is set to the submitter's email for direct replies.
Frontend
Page
FeedbackPage.tsx — form page inside the app shell.
Access Points
- Sidebar nav item (icon + "Feedback" label) — visible to all roles
- Link card on
AccountSettingsPage
Route
/feedback — top-level app shell route (not nested under /account).
Form Fields
| Field | Details |
|---|---|
| Auto-filled from logged-in user, editable | |
| Feedback Type | Dropdown select (5 types) |
| Message | Textarea, required, min 10 chars |
| Submit | bg-gradient-brand, disabled while submitting |
UX Flow
- Form loads with email pre-filled
- User selects type, writes message, submits
- Button shows loading state during submission
- On success: success message, form resets
- On error: inline error, form stays populated for retry
Styling
Standard page layout — container mx-auto, bg-card border border-border rounded-xl form card, max-w-2xl width.
API Client
feedbackApi.submitFeedback() in a new api/feedback.ts module.
Backend
Endpoint
POST /feedback in endpoints/feedback.py
Schema
FeedbackSubmission in schemas/feedback.py:
email: str— validated as emailfeedback_type: str— enum-validated against the 5 typesmessage: str— min 10 chars
Auth
Requires get_current_active_user. Account display code pulled from user's account relationship server-side.
Config
FEEDBACK_EMAIL: Optional[str] = None in config.py. Endpoint returns 503 if not configured.
Email Service
New EmailService.send_feedback_email() static method:
- Uses existing Resend client
- Sets
reply_toto submitter's email - Dark-themed HTML matching existing email templates
Rate Limiting
One submission per minute per user.
Not Included (YAGNI)
- No DB persistence
- No admin view
- No file attachments
- No public (unauthenticated) access